From 026b9db8830c1cebfda297cd9fdb22d5aa60dea3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 12 Sep 1996 01:13:33 +0100 Subject: [PATCH] dpkg (1.4.0) unstable; urgency=low (HIGH for new source format) * Corrected buffer overrun when dpkg-deb generates filename. (Bug#4467.) * dpkg-shlibdeps works with DEBIAN/shlibs (thanks Heiko Schlittermann). * Added libm.so.5 to shlibs.default for i386/m68k. * Split binary package into two: dpkg and dpkg-dev. * dpkg-source(1) documents mode and ownership setting during extraction. * dpkg-scanpackages moved to /usr/bin. * Include /usr/bin/dpkg-deb, not dpkg-deb.dist; don't rename in scripts. * Copyright file changed slightly. * debian-changelog-mode uses magic key substitution strings. (Bug#4419.) * Changed email address in control file to . * Manuals and own Standards-Version: updated to 2.1.1.0. -- Ian Jackson Thu, 12 Sep 1996 01:13:33 +0100 --- Makefile.in | 2 +- debian/changelog | 18 +++++++ debian/control | 30 ++++++++--- debian/copyright | 8 +-- debian/dev-README | 2 + debian/postinst | 4 +- debian/prerm | 3 +- debian/rules | 91 +++++++++++++++++++------------- debian/shlibs.default.i386 | 1 + doc/changelog | 16 ++++++ doc/manuals-version | 4 +- doc/policy.sgml | 64 ++++++++++++++++------ doc/programmer.sgml | 26 ++++++--- dpkg-deb/build.c | 4 +- lib/Makefile.in | 2 +- scripts/Makefile.in | 5 +- scripts/debian-changelog-mode.el | 6 +-- scripts/dpkg-shlibdeps.pl | 5 +- scripts/dpkg-source.1 | 8 +++ version.h | 2 +- 20 files changed, 213 insertions(+), 88 deletions(-) create mode 100644 debian/dev-README mode change 100644 => 100755 debian/prerm diff --git a/Makefile.in b/Makefile.in index 062c5bd6..b69f3fcb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ prefix = @prefix@ exec_prefix = $(prefix) docdir = $(prefix)/doc devdocdir = $(docdir)/dpkg -copyingfile = $(docdir)/copyright/dpkg +copyingfile = $(docdir)/dpkg/copyright infodir = $(prefix)/info bindir = $(exec_prefix)/bin sbindir = $(exec_prefix)/sbin diff --git a/debian/changelog b/debian/changelog index 3de33656..c0ccf5fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +dpkg (1.4.0) unstable; urgency=low (HIGH for new source format) + + * Corrected buffer overrun when dpkg-deb generates filename. (Bug#4467.) + * dpkg-shlibdeps works with DEBIAN/shlibs (thanks Heiko Schlittermann). + * Added libm.so.5 to shlibs.default for i386/m68k. + + * Split binary package into two: dpkg and dpkg-dev. + * dpkg-source(1) documents mode and ownership setting during extraction. + + * dpkg-scanpackages moved to /usr/bin. + * Include /usr/bin/dpkg-deb, not dpkg-deb.dist; don't rename in scripts. + * Copyright file changed slightly. + * debian-changelog-mode uses magic key substitution strings. (Bug#4419.) + * Changed email address in control file to . + * Manuals and own Standards-Version: updated to 2.1.1.0. + + -- Ian Jackson Thu, 12 Sep 1996 01:13:33 +0100 + dpkg (1.3.14) unstable; urgency=low * dpkg-buildpackage new -tc (clean source tree) option. diff --git a/debian/control b/debian/control index e6da27bc..fdc01ef7 100644 --- a/debian/control +++ b/debian/control @@ -1,16 +1,13 @@ Source: dpkg Section: base Priority: required -Maintainer: Ian Jackson -Standards-Version: 2.0.1.0 +Maintainer: Ian Jackson +Standards-Version: 2.1.0.0 Package: dpkg Architecture: any Essential: yes Pre-Depends: ${shlibs:Pre-Depends} -Suggests: cpio (>= 2.4.2-2), patch -Conflicts: dpkgname -Replaces: dpkgname Description: Package maintenance system for Debian Linux This package contains the programs which handle the installation and removal of packages on your system. @@ -19,5 +16,24 @@ Description: Package maintenance system for Debian Linux a more low-level and less user-friendly interface is available in the form of the `dpkg' command. . - In order to manipulate source packages using `dpkg-source' you will - need to install the `cpio' and `patch' packages. + In order to unpack and build Debian source packages you will need to + install the developers' package `dpkg-dev' as well as this one. + +Package: dpkg-dev +Section: devel +Priority: important +Architecture: all +Recommends: cpio (>= 2.4.2-2), patch +Conflicts: dpkgname +Replaces: dpkgname, dpkg (<< 1.4.0) +Description: Package building tools for Debian Linux + This package contains the tools (including dpkg-source) required to + unpack, build and upload Debian source packages. It also contains + the programmers' and Debian policy manuals, which are the + documentation for package developers. + . + `cpio' and `patch' are also required to manipulate source packages. + Some older cpios are insufficient - use at least 2.4.2-2. + . + Most Debian source packages will require additional tools to build - + for example, most packages need the `make' and the C compiler `gcc'. diff --git a/debian/copyright b/debian/copyright index 6f29f516..fe0baf1e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,9 +1,11 @@ This is Debian Linux's package maintenance system. -For an example of how to construct packages see the `hello' package -which is part of Debian. +To build your own packages install the `dpkg-dev' package and read the +manuals which it installs in /usr/doc/dpkg and look at the `hello' +example package. -Copyright (C) 1994,1995,1996 Ian Jackson + +Copyright (C) 1994,1995,1996 Ian Jackson Copyright (C) 1995,1996 Erick Branderhorst Copyright (C) 1996 Miquel van Smoorenburg Copyright (C) 1996 Kim-Minh Kaplan diff --git a/debian/dev-README b/debian/dev-README new file mode 100644 index 00000000..9c9df842 --- /dev/null +++ b/debian/dev-README @@ -0,0 +1,2 @@ +All dpkg documentation in /usr/doc, including the developers' +information which comes in the dpkg-dev package, is in /usr/doc/dpkg. diff --git a/debian/postinst b/debian/postinst index 545c24b9..ff256692 100755 --- a/debian/postinst +++ b/debian/postinst @@ -116,9 +116,7 @@ then touch diversions fi -cd /usr/bin -if test dpkg-deb.dist -ef dpkg-deb; then rm dpkg-deb.dist; fi -if test -f dpkg-deb.dist; then mv dpkg-deb.dist dpkg-deb; fi +rm -f /usr/bin/dpkg-deb.dist if test -d /DEBIAN then diff --git a/debian/prerm b/debian/prerm old mode 100644 new mode 100755 index 59a60677..0da7a2d1 --- a/debian/prerm +++ b/debian/prerm @@ -1,9 +1,8 @@ -#!/bin/sh - +#!/bin/sh set -e cd /usr/bin -test -f dpkg-deb.dist || ln dpkg-deb dpkg-deb.dist install-info --quiet --remove /usr/info/Guidelines install-info --quiet --remove /usr/info/debian-guidelines diff --git a/debian/rules b/debian/rules index 6774a7f0..82ab3d3a 100755 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,7 @@ DIR:=$(shell pwd) arch=$(shell dpkg --print-architecture) -cidir=debian/tmp/DEBIAN +mcidir=debian/tmp-main/DEBIAN build: $(checkdir) @@ -21,57 +21,74 @@ clean: binary: binary-arch binary-indep -binary-indep: build +binary-trees: checkroot build $(checkdir) - set -e -x; cd doc; for f in policy programmer; do \ - debiandoc2ps -pa4 -O $$f.sgml | gzip -9v >../../$$f.ps.gz; \ - dpkg-distaddfile -f../debian/files $$f.ps.gz byhand -; \ - GZIP=-9v tar zcf ../../$$f.html.tar.gz $$f.html; \ - dpkg-distaddfile -f../debian/files $$f.html.tar.gz byhand -; \ - done - -binary-arch: checkroot build - $(checkdir) - -rm -rf debian/tmp - install -d debian/tmp debian/tmp/DEBIAN debian/tmp/etc/dpkg - install -d debian/tmp/usr/doc/{copyright,dpkg} + -rm -rf debian/tmp-{main,dev} + install -d debian/tmp-{main,dev}/{DEBIAN,etc/dpkg,usr/doc/dpkg} + install -d debian/tmp-dev/usr/{lib/dpkg,doc/dpkg-dev,man/man1,man/man8,sbin,bin} set -e; if [ $(arch) = i386 ]; then \ - sed -e 's/^# i386elf: //' $(cidir)/preinst ; \ + sed -e 's/^# i386elf: //' $(mcidir)/preinst ; \ else \ - sed -e '/^# i386elf: /d' debian/preinst >$(cidir)/preinst ; \ + sed -e '/^# i386elf: /d' debian/preinst >$(mcidir)/preinst ; \ fi set -e; if [ -f debian/shlibs.default.$(arch) ]; then \ - echo /etc/dpkg/shlibs.default >$(cidir)/conffiles ; \ - cp debian/shlibs.default.$(arch) debian/tmp/etc/dpkg/shlibs.default ; \ + echo /etc/dpkg/shlibs.default >debian/tmp-dev/DEBIAN/conffiles ; \ + cp debian/shlibs.default.$(arch) \ + debian/tmp-dev/etc/dpkg/shlibs.default ; \ fi - cp debian/{prerm,postinst} $(cidir)/. - chmod +x $(cidir)/{postinst,prerm,preinst} - $(MAKE) prefix=$(DIR)/debian/tmp/usr \ - datadir=$(DIR)/debian/tmp/var/lib/dpkg \ - etcdir=$(DIR)/debian/tmp/etc \ + cp debian/{prerm,postinst} $(mcidir)/. + chmod +x $(mcidir)/{postinst,prerm,preinst} + $(MAKE) prefix=$(DIR)/debian/tmp-main/usr \ + datadir=$(DIR)/debian/tmp-main/var/lib/dpkg \ + etcdir=$(DIR)/debian/tmp-main/etc \ install - find debian/tmp/usr/man -type f | xargs gzip -9v + find debian/tmp-main/usr/man -type f | xargs gzip -9v set -e; for f in dpkg-buildpackage dpkg-gencontrol dpkg-distaddfile \ dpkg-parsechangelog dpkg-genchanges dpkg-shlibdeps; do \ - rm debian/tmp/usr/man/man1/$$f.1; \ - ln -s dpkg-source.1.gz debian/tmp/usr/man/man1/$$f.1.gz ; \ + rm debian/tmp-main/usr/man/man1/$$f.1; \ + ln -s dpkg-source.1.gz debian/tmp-main/usr/man/man1/$$f.1.gz ; \ done - gzip -9v debian/tmp/usr/doc/dpkg/changelog.* - cp debian/copyright debian/tmp/usr/doc/dpkg/copyright - cp TODO debian/tmp/usr/doc/dpkg/WISHLIST - touch debian/tmp/var/lib/dpkg/{status,available} + gzip -9v debian/tmp-main/usr/doc/dpkg/changelog.* + cp debian/copyright debian/tmp-main/usr/doc/dpkg/copyright + cp debian/copyright debian/tmp-dev/usr/doc/dpkg-dev/copyright + cp debian/dev-README debian/tmp-dev/usr/doc/dpkg-dev/README + cp TODO debian/tmp-dev/usr/doc/dpkg/WISHLIST + set -e; for f in \ + usr/doc/dpkg/{programmer.html,policy.html,developer-keys.pgp,changelog.manuals.gz} \ + usr/bin/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage,parsechangelog} \ + usr/bin/{dpkg-distaddfile,822-date,dpkg-scanpackages} \ + usr/man/man1/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage}.1.gz \ + usr/man/man1/{dpkg-parsechangelog,dpkg-distaddfile,822-date}.1.gz \ + usr/man/man5 usr/man/man8/dpkg-scanpackages.8.gz usr/lib/emacs \ + usr/lib/dpkg/parsechangelog usr/lib/dpkg/controllib.pl \ + ; do mv debian/tmp-main/$$f debian/tmp-dev/$$f; done + +binary-indep: checkroot build binary-trees + $(checkdir) + dpkg-gencontrol -pdpkg-dev -Pdebian/tmp-dev + chown -R root.root debian/tmp-dev + chmod -R g-ws,a+r,u+w debian/tmp-dev + dpkg-deb --build debian/tmp-dev .. + set -e -x; cd doc; for f in policy programmer; do \ + debiandoc2ps -pa4 -O $$f.sgml | gzip -9v >../../$$f.ps.gz; \ + dpkg-distaddfile -f../debian/files $$f.ps.gz byhand -; \ + GZIP=-9v tar zcf ../../$$f.html.tar.gz $$f.html; \ + dpkg-distaddfile -f../debian/files $$f.html.tar.gz byhand -; \ + done + +binary-arch: checkroot build binary-trees + touch debian/tmp-main/var/lib/dpkg/{status,available} dpkg-shlibdeps -dPre-Depends main/dpkg dselect/dselect - dpkg-gencontrol - chown -R root.root debian/tmp - chmod -R g-ws,a+r,u+w debian/tmp - set -e; cd debian/tmp; \ + dpkg-gencontrol -pdpkg -Pdebian/tmp-main + chown -R root.root debian/tmp-main + chmod -R g-ws,a+r,u+w debian/tmp-main + set -e; cd debian/tmp-main; \ version=`sed -n 's/^Version: //p' DEBIAN/control`; \ file=dpkg_$${version}_$(arch).nondebbin.tar; \ tar cf ../../../$${file} usr var && gzip -9vf ../../../$${file}; \ cd ../..; dpkg-distaddfile $${file}.gz byhand - - mv debian/tmp/usr/bin/dpkg-deb{,.dist} - rm debian/tmp/var/lib/dpkg/{status,available} - dpkg-deb --build debian/tmp .. + rm debian/tmp-main/var/lib/dpkg/{status,available} + dpkg-deb --build debian/tmp-main .. define checkdir test -f include/dpkg.h diff --git a/debian/shlibs.default.i386 b/debian/shlibs.default.i386 index ab18adb8..10591b27 100644 --- a/debian/shlibs.default.i386 +++ b/debian/shlibs.default.i386 @@ -1,4 +1,5 @@ libc 5 libc5 (>= 5.2.18) +libm 5 libc5 (>= 5.2.18) libncurses 3.0 ncurses3.0 libICE 6 elf-x11r6lib libPEX5 6 elf-x11r6lib diff --git a/doc/changelog b/doc/changelog index 221503fb..c16a1edb 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,19 @@ +debian-manuals (2.1.1.0) unstable; + + * Hard links are forbidden in source packages (they didn't work anyway, + and can't easily be made to work reliably). + * Do not use dpkg-divert or update-alternatives without consultation. + + * Do not need to declare dependencies on Essential packages. + * Restrictions on Pre-Depends stated in policy manual. + * debian/substvars file is now almost always auto-generated. + * Shared libraries must be installed stripped. + * Essential and Pre-Depends put together in policy manual. + + * Explained component-wise (file-wise) vs. package-wise dependencies. + + -- Ian Jackson Thu, 12 Sep 1996 01:00:41 +0100 + debian-manuals (2.1.0.0) unstable; * Upstream changelog must be installed too (was just recommended). diff --git a/doc/manuals-version b/doc/manuals-version index 2b48fbfc..1020fd06 100644 --- a/doc/manuals-version +++ b/doc/manuals-version @@ -1,2 +1,2 @@ - - + + diff --git a/doc/policy.sgml b/doc/policy.sgml index 8938f69a..112d51d3 100644 --- a/doc/policy.sgml +++ b/doc/policy.sgml @@ -224,11 +224,8 @@ having different forms of their name and address in different

Add a dependency for any shared libraries required by -dynamically-linked executable binaries in your package. Almost every -package containing compiled C code should therefore include a - All packages must use virtual package names where appropriate, and @@ -333,16 +330,30 @@ installing new packages (perhaps via a network).

Most of these packages should have The -The + +Usually, neither of these fields should not be used unless removing a +package really will completely hose the system, making it impossible +to recover by (re)installing packages with + + + +It is not necessary for other packages to declare any dependencies +they have on other packages which are marked Including Use of + +Do not use + +In order for Configuring and building the programs in the package Compilation options @@ -992,10 +1019,15 @@ install -s # (or use strip on the files in debian/tmp)

-Note that all installed binaries should be stripped, either by using -the debian/tmp but -before the tree is made into a package. +Note that all installed binaries and shared libraries should be +strippedShared libraries can function perfectly well when +stripped, since the symbols for dynamic linking are in a separate part +of the ELF object file.Under some circumstances +it may be useful to install a shared library unstripped, for example +when building a separate package to support debugging., +either by using the debian/tmp but before the tree is made into a package.

Make sure that you do not link with -The file may be a static part of the source archive, or generated and -modified dynamically by debian/rules targets. In the latter -case it must be removed by the debian/rules targets; in this case it must be removed by the + + + See for full details about source variable substitutions, including the format of debian/substvars. @@ -1158,9 +1160,12 @@ using Restrictions on objects in source packages

-The source package may not contain any device special files, sockets -or setuid or setgid files.Setgid directories are -allowed. +The source package may not contain any hard linksThis is not +currently detected when building source packages, but only when +extracting them.Hard links may be permitted at +some point in the future, but would require a fair amount of +work., device special files, sockets or setuid or setgid +files.Setgid directories are allowed.

The source packaging tools manage the changes between the original and @@ -2518,6 +2523,15 @@ version clause in the +When selecting which level of dependency to use you should consider +how important the depended-on package is to the functionality of the +one declaring the dependency. Some packages are composed of +components of varying degrees of importance. Such a package should +list using Dependencies on shared libraries

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index 61f3dd2a..277c2ebe 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -124,9 +124,9 @@ void do_build(const char *const *argv) { if (subdir) { versionstring= versiondescribe(&checkedinfo->available.version,vdew_never); - m= m_malloc(strlen(debar)+1+strlen(checkedinfo->name)+1+ - strlen(versionstring)+sizeof(DEBEXT)); arch= checkedinfo->available.architecture; if (!arch) arch= ""; + m= m_malloc(sizeof(DEBEXT)+1+strlen(debar)+1+strlen(checkedinfo->name)+ + strlen(versionstring)+1+strlen(arch)); sprintf(m,"%s/%s_%s%s%s" DEBEXT,debar,checkedinfo->name,versionstring, arch[0] ? "_" : "", arch); debar= m; diff --git a/lib/Makefile.in b/lib/Makefile.in index 076c1ae7..50d8dd5e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -19,7 +19,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ -copyingfile = $(prefix)/doc/copyright/dpkg +copyingfile = $(prefix)/doc/dpkg/copyright SRC = ehandle.c mlib.c parse.c parsehelp.c fields.c dump.c nfmalloc.c \ varbuf.c database.c myopt.c vercmp.c compat.c lock.c dbmodify.c \ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index fb60808d..cff87287 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -41,11 +41,12 @@ LSMAN = dpkg-source.$(man1) LSMANL= dpkg-gencontrol dpkg-genchanges dpkg-buildpackage \ dpkg-distaddfile dpkg-parsechangelog dpkg-shlibdeps EXC = dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol dpkg-shlibdeps \ - dpkg-buildpackage dpkg-parsechangelog dpkg-distaddfile 822-date + dpkg-buildpackage dpkg-parsechangelog dpkg-distaddfile 822-date \ + dpkg-scanpackages MAN8 = update-rc.d start-stop-daemon update-alternatives install-info \ dpkg-scanpackages SBIN = update-rc.d start-stop-daemon update-alternatives install-info \ - dpkg-scanpackages dpkg-divert cleanup-info + dpkg-divert cleanup-info LIB = controllib.pl ELISP = debian-changelog-mode.el CHGLGS= cl-debian diff --git a/scripts/debian-changelog-mode.el b/scripts/debian-changelog-mode.el index 9da6c890..33af1f1c 100644 --- a/scripts/debian-changelog-mode.el +++ b/scripts/debian-changelog-mode.el @@ -24,11 +24,11 @@ (defvar debian-changelog-urgencies '((?l."low") (?m."medium") (?h."HIGH")) - "alist of keystrokes vs. urgency values debian-changelog-urgency ^c^u.") + "alist of keystrokes vs. urgency values for debian-changelog-urgency \\[debian-changelog-urgency].") (defvar debian-changelog-distributions '((?s."stable") (?u."unstable") (?c."contrib") (?n."non-free") (?e."experimental")) - "alist of keystrokes vs. distribution values for debian-changelog-distribution ^c^d.") + "alist of keystrokes vs. distribution values for debian-changelog-distribution \\[debian-changelog-distribution].") (defvar debian-changelog-mode-map nil "Keymap for Debian changelog major mode.") @@ -49,7 +49,7 @@ "Add a new change entry to a debian-style changelog." (interactive) (if (eq (debian-changelog-finalised-p) t) - (error "most recent version has been finalised - use ^c^e or ^c^v")) + (error (substitute-command-keys "most recent version has been finalised - use \\[debian-changelog-unfinalise-last-version] or \\[debian-changelog-add-version]"))) (goto-char (point-min)) (re-search-forward "\n --") (backward-char 5) diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 97b2d587..c2e05b42 100644 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -105,7 +105,7 @@ while (

) { } close(P); $? && subprocerr("dpkg --search"); -for ($i=0;$i<=$#libname;$i++) { +LIB: for ($i=0;$i<=$#libname;$i++) { scanshlibsfile($shlibslocal,$libname[$i],$libsoname[$i],$libf[$i]) && next; scanshlibsfile($shlibsoverride,$libname[$i],$libsoname[$i],$libf[$i]) && next; if (!defined($pathpackages{$libpath[$i]})) { @@ -115,7 +115,8 @@ for ($i=0;$i<=$#libname;$i++) { @packages= split(/, /,$pathpackages{$libpath[$i]}); for $p (@packages) { scanshlibsfile("$shlibsppdir/$p$shlibsppext", - $libname[$i],$libsoname[$i],$libf[$i]) && next; + $libname[$i],$libsoname[$i],$libf[$i]) + && next LIB; } } scanshlibsfile($shlibsdefault,$libname[$i],$libsoname[$i],$libf[$i]) && next; diff --git a/scripts/dpkg-source.1 b/scripts/dpkg-source.1 index 1046ba23..5147e4dc 100644 --- a/scripts/dpkg-source.1 +++ b/scripts/dpkg-source.1 @@ -241,6 +241,14 @@ will read the names of the other file(s) making up the source package from the control file; they are assumed to be in the same directory as the .BR .dsc . + +The files in the extracted package will have their permissions and +ownerships set to those which would have been expected if the files +and directories had simply been created - directories and executable +files will be 0777 and plain files will be 0666, both modified by the +extractors' umask; if the parent directory is setgid then the +extracted directories will be too, and all the files and directories +will inherit its group ownership. .TP .B -b Build: pack up a source tree. One or two non-option arguments should diff --git a/version.h b/version.h index 05620543..a3eacf5b 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define DPKG_VERSION "1.3.14" /* This line modified by Makefile */ +#define DPKG_VERSION "1.4.0" /* This line modified by Makefile */ -- 2.39.5