From 9fab53b9401023186a5309c3fdcd4a8c174449b2 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sun, 26 May 2002 03:53:42 +0000 Subject: [PATCH] Merge 1.9 branch. --- ChangeLog | 18 ++++++ debian/changelog | 23 ++++++++ debian/control | 5 +- debian/dpkg.cfg | 5 ++ debian/dpkg.conffiles | 1 + debian/dpkg.postinst | 116 +++++++++++++++++++++++++++++++++++++- debian/dpkg.postrm | 10 ++++ debian/rules | 5 +- lib/mlib.c | 1 + main/dpkg.8 | 12 +++- main/processarc.c | 2 +- utils/start-stop-daemon.8 | 22 +++----- 12 files changed, 199 insertions(+), 21 deletions(-) create mode 100755 debian/dpkg.postrm diff --git a/ChangeLog b/ChangeLog index bc448dac..668bc60e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Sat May 25 22:45:06 CDT 2002 Adam Heath + + * Merge changes from 1.9.20 and 1.9.21. + * utils/start-stop-daemon.8: Fix some nroff formatting errors + ? po.ru.po: Fix mistranslation + * main/dpkg.8: document --force-confmiss, improve description for + --force-conf{old,new} + * lib/mlib.c: Detect truncated debs, and abort the unpack. + * debian/rules: install dpkg.cfg in docdir, install dpkg.postrm. Also + install dselect.cfg in /etc/dpkg. + * debian/dpkg.cfg: add force-overwrite + * debian/dpkg.postrm: new file + ? po/sv.po: Removed fuzzy translation. + ? po/sv.po: Fixed broken c-format escapes which would make some error + messages display incorrectly. + * debian/control: Fix build-depends on zlib1g-dev to >= 1:1.1.3-19.1. + * debian/changelog: The missing 1.9 entries. + Fri May 24 22:38:01 CDT 2002 Adam Heath * scripts/dpkg-scanpackages.8: Add dpkg-scansources to diff --git a/debian/changelog b/debian/changelog index 7b35b147..114b634f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -117,6 +117,29 @@ dpkg (1.10) unstable; urgency=low -- Wichert Akkerman Mon, 20 Aug 2001 14:54:38 +0200 +dpkg (1.9.21) unstable; urgency=low + + * Fix corrupt Swedish translations that would some error messages display + incorrectly. + * Enable --force-overwrite by default in /etc/dpkg/dpkg.cfg + * dpkg.cfg is now no longer a conffile. This means the installer can + change defaults depending on how an install is done + * Detect truncated debs, and abort the unpack. Closes: #138569. + * Improve dpkg(8) --force documentation + * Fix error in Russian dselect translation + + -- Wichert Akkerman Thu, 16 May 2002 19:42:29 +0200 + +dpkg (1.9.20) unstable; urgency=medium + + * Fix assertion when --auto-deconfigure is set. Closes: #137765. + * Fix segfault discovered by fixing the above. + * Fix segfault when getenv("PATH") returns null. Closes: #136349 + * Recompiled against updated zlib, to fix possible security issue. Also + bumped build-depends to match. Closes: #137931(grave) + + -- Adam Heath Sun, 17 Mar 2002 02:52:44 -0600 + dpkg (1.9.19) unstable; urgency=medium * install-info continues to read all data from a pipe, until EOF. diff --git a/debian/control b/debian/control index 2cbe829c..9d13b29d 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,9 @@ Maintainer: Dpkg Development Uploaders: Wichert Akkerman , Adam Heath Origin: debian Bugs: debbugs://bugs.debian.org -Standards-Version: 3.1.0 -Build-Depends: debiandoc-sgml, sgmltools-lite, libncurses-dev, gettext (>= 0.10.36), zlib1g-dev +Standards-Version: 3.5.4 +Build-Depends: debiandoc-sgml, sgmltools-lite, libncurses-dev, gettext (>= 0.10.36), zlib1g-dev (>= 1:1.1.3-19.1) +Uploaders: Wichert Akkerman , Adam Heath Package: dpkg Architecture: any diff --git a/debian/dpkg.cfg b/debian/dpkg.cfg index 47ca75e8..3533ff70 100644 --- a/debian/dpkg.cfg +++ b/debian/dpkg.cfg @@ -4,4 +4,9 @@ # options are allowed. Values can be specific by putting them after # the option, seperated by whitespace and/or an `=' sign. # +# Do not enable debsign by default; since Debian does not use embedded +# signature debsign would reject all packages. no-debsig +# +# Allow file overlaps between packages. +force-overwrite diff --git a/debian/dpkg.conffiles b/debian/dpkg.conffiles index 4e1ecd66..180c75b1 100644 --- a/debian/dpkg.conffiles +++ b/debian/dpkg.conffiles @@ -1,3 +1,4 @@ /etc/dpkg/dpkg.cfg +/etc/dpkg/dselect.cfg /etc/dpkg/origins/debian /etc/alternatives/README diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst index e1514284..46720a2f 100755 --- a/debian/dpkg.postinst +++ b/debian/dpkg.postinst @@ -2,8 +2,120 @@ set -e -if [ "$1" != "configure" ] ; then - exit 0 +dupdaemonhelp () { + cat </dev/null | awk '{print $1}'`" != \ + "`ls -Li $h 2>/dev/null | awk '{print $1}'`" ] + then + continue + fi + removes="$removes rc$f.d/$g" + done + done + if [ -n "$removes" ] + then + cd /etc + dupdaemonhelp + while [ -n "$removes" ] + do + echo -n 'y=remove, n=leave, l=list, h=help ? ' + read response + case "$response" in + [Yy]*) + echo "Removing duplicate K links ..." + rm -v $removes + removes="" + ;; + [Nn]*) + echo -e "OK, leaving them.\n" + removes="" + ;; + [Ll]*) + echo + echo $removes + echo + ;; + [Hh]*) + dupdaemonhelp + ;; + esac + done + fi + ;; + 1.1.6 | 1.1.6elf | 1.2.[0123] | 1.2.[0123]elf ) + response='' + while [ -z "$response" ]; do + echo -n ' +The version of dpkg you'\''re upgrading from had a problem with the +install-info program used to maintain the /usr/info/dir file. It may +have corrupted the file, for example by placing new entries for the +menu in it before the `* Menu'\'' line (thus making them ineffective) or +by creating several identical sections. + +I can try to sort these problems out, but beware that this process is +not guaranteed not to mess up a dir file which has things that look +like menu entries in the introductory paragraphs. The distributed dir +files do not do this, so if you haven'\''t edited /usr/info/dir it'\''s +almost certainly safe to say `yes'\'' to the next question. + +If you say `no'\'' you may wish to check and/or edit /usr/info/dir yourself. + +Try to check/repair /usr/info/dir automatically ? [y/n] ' + read response + case "$response" in + [Yy]* | '') response=yes ;; + [Nn]*) response=no ;; + *) response='' ;; + esac + done + if [ "$response" = yes ]; then + echo " +Checking/repairing /usr/info/dir ..." + cleanup-info --unsafe + echo + else + echo " +OK. +" + fi + ;; + esac fi if [ -d /usr/doc -a ! -e /usr/doc/dpkg -a -d /usr/share/doc/dpkg ] ; then diff --git a/debian/dpkg.postrm b/debian/dpkg.postrm new file mode 100755 index 00000000..83b81197 --- /dev/null +++ b/debian/dpkg.postrm @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ "$1" = "purge" ] ; then + rm -f /etc/dpkg/dpkg.cfg +fi + +exit 0 + diff --git a/debian/rules b/debian/rules index d8564c2e..95568c05 100755 --- a/debian/rules +++ b/debian/rules @@ -130,7 +130,7 @@ binary-dpkg-most binary-dpkg-static-most: binary-dpkg%-most: stamp-binary% done install -d -m 755 -o root -g root $(TMP_DPKG)/etc/dpkg - install -p -m 644 -o root -g root debian/dpkg.cfg \ + install -p -m 644 -o root -g root debian/dselect.cfg \ $(TMP_DPKG)/etc/dpkg/ # Now that dpkg has been installed, Debianize it @@ -146,6 +146,8 @@ binary-dpkg-most binary-dpkg-static-most: binary-dpkg%-most: stamp-binary% $(TMP_DPKG)/usr/share/doc/dpkg$(static)/changelog.Debian rm -f $(TMP_DPKG)/usr/share/doc/dpkg$(static)/copyright gzip -9 $(TMP_DPKG)/usr/share/doc/dpkg$(static)/* + install -p -m 644 -o root -g root debian/dpkg.cfg \ + $(TMP_DPKG)/usr/share/doc/dpkg$(static)/ install -p -m 644 -o root -g root debian/copyright \ $(TMP_DPKG)/usr/share/doc/dpkg$(static)/ @@ -155,6 +157,7 @@ binary-dpkg-most binary-dpkg-static-most: binary-dpkg%-most: stamp-binary% install -p -m 755 -o root -g root debian/dpkg.preinst $(TMP_DPKG)/DEBIAN/preinst install -p -m 755 -o root -g root debian/dpkg.prerm $(TMP_DPKG)/DEBIAN/prerm install -p -m 755 -o root -g root debian/dpkg.postinst $(TMP_DPKG)/DEBIAN/postinst + install -p -m 755 -o root -g root debian/dpkg.postrm $(TMP_DPKG)/DEBIAN/postrm dpkg-shlibdeps -dPre-Depends -Tdebian/dpkg$(static).substvars \ $(TMP_DPKG)/sbin/start-stop-daemon \ diff --git a/lib/mlib.c b/lib/mlib.c index dd7c47d9..6fc3cff6 100644 --- a/lib/mlib.c +++ b/lib/mlib.c @@ -335,6 +335,7 @@ ssize_t buffer_copy(buffer_data_t read_data, buffer_data_t write_data, ssize_t l } } if (bytesread<0 || byteswritten<0) ohshite(_("failed in buffer_copy (%s)"), desc); + if (limit > 0) ohshit(_("short read in buffer_copy (%s)"), desc); free(buf); return totalread; diff --git a/main/dpkg.8 b/main/dpkg.8 index 3eb47126..328d06f7 100644 --- a/main/dpkg.8 +++ b/main/dpkg.8 @@ -375,12 +375,20 @@ Don't care about versions when checking dependencies. Install, even if it conflicts with another package. This is dangerous, for it will usually cause overwriting of some files. +\fBconfmiss\fP: +Always install a missing configuration file. This is dangerous, +since it means not preserving a change (removing) made to the +file. + \fBconfnew\fP: If a conffile has been modified always install the new version without -prompting. +prompting, unless the \fB--force-confdef\fP is also specified, in +which case the default action is preferred. \fBconfold\fP: -If a conffile has been modified always keep the old version without prompting. +If a conffile has been modified always keep the old version without +prompting, unless the \fB--force-confdef\fP is also specified, in +which case the default action is preferred. \fBconfdef\fP: If a conffile has been modified always choose the default action. If diff --git a/main/processarc.c b/main/processarc.c index 926e7f13..20c4473a 100644 --- a/main/processarc.c +++ b/main/processarc.c @@ -197,7 +197,7 @@ void process_archive(const char *filename) { pkg->files->next= 0; pkg->files->name= pkg->files->msdosname= pkg->files->md5sum= 0; } - /* Always nfmalloc. Otherwise, we may overwrite some other field. */ + /* Always nfmalloc. Otherwise, we may overwrite some other field(like md5sum). */ pkg->files->size= nfmalloc(30); sprintf(pkg->files->size,"%lu",(unsigned long)stab.st_size); diff --git a/utils/start-stop-daemon.8 b/utils/start-stop-daemon.8 index fbc07e12..dd446751 100644 --- a/utils/start-stop-daemon.8 +++ b/utils/start-stop-daemon.8 @@ -44,8 +44,9 @@ Any arguments given after on the command line are passed unmodified to the program being started. If .B --retry -is specified then start-stop-daemon will check that the process(es) -have terminated. +is specified then +.B start-stop-daemon +will check that the process(es) have terminated. With .BR --stop , @@ -68,34 +69,29 @@ is specified). .TP \fB-x\fP|\fB--exec\fP \fIexecutable\fP Check for processes that are instances of this executable (according to -.B /proc/ -.I pid -.B /exe +.B /proc/\fIpid\fB/exe\fP ). .TP \fB-p\fP|\fB--pidfile\fP \fIpid-file\fP Check for processes whose process-id is specified in -.I pid-file. +.IR pid-file . .TP \fB-u\fP|\fB--user\fP \fIusername\fP|\fIuid\fP Check for processes owned by the user specified by .I username or -.I uid. +.IR uid . .TP \fB-n\fP|\fB--name\fP \fIprocess-name\fP Check for processes with the name .I process-name (according to -.B /proc/ -.I pid -.B /stat -). +.BR /proc/\fIpid\fB/stat\fP ). .TP \fB-s\fP|\fB--signal\fP \fIsignal\fP With -.BR --stop -, specifies the signal to send to processes being stopped (default 15). +.BR --stop , +specifies the signal to send to processes being stopped (default 15). .TP \fB-R\fP|\fB--retry\fP \fItimeout\fP|\fIschedule\fP With -- 2.39.5