From 0ddabc1c510b1f9cadd0ae90df38dbd6486ee80f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 30 Aug 1996 15:31:51 +0100 Subject: [PATCH] dpkg (1.3.12) unstable; urgency=medium * dpkg prints old version number when upgrading. * dpkg-deb tries to detect and flag corruption by ASCII download. * dpkg-genchanges and dpkg-buildpackage say what source is included. * dpkg-buildpackage passes +clearsig=on to PGP (or pgpcommand). * dpkg-source prints better error for cpio not honouring -0t. * control file Suggests cpio >= 2.4.2, rather than just cpio. -- Ian Jackson Fri, 30 Aug 1996 15:31:51 +0100 --- debian/changelog | 14 +++++++++++ debian/control | 2 +- doc/manuals-version | 2 +- dpkg-deb/extract.c | 9 ++++++++ main/processarc.c | 5 +++- scripts/dpkg-buildpackage.sh | 45 ++++++++++++++++++++++++++++-------- scripts/dpkg-genchanges.pl | 12 ++++++++++ scripts/dpkg-source.1 | 8 +++++++ scripts/dpkg-source.pl | 13 ++++++++--- version.h | 2 +- 10 files changed, 95 insertions(+), 17 deletions(-) mode change 100644 => 100755 scripts/dpkg-buildpackage.sh diff --git a/debian/changelog b/debian/changelog index 0dce69a6..5b75c0ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +dpkg (1.3.12) unstable; urgency=medium + + * dpkg prints old version number when upgrading. + * dpkg-deb tries to detect and flag corruption by ASCII download. + + * dpkg-genchanges and dpkg-buildpackage say what source is included. + + * dpkg-buildpackage passes +clearsig=on to PGP (or pgpcommand). + + * dpkg-source prints better error for cpio not honouring -0t. + * control file Suggests cpio >= 2.4.2, rather than just cpio. + + -- Ian Jackson Fri, 30 Aug 1996 15:31:51 +0100 + dpkg (1.3.11) unstable; urgency=low * EBUSY when dpkg removes a directory is only a warning. diff --git a/debian/control b/debian/control index cee28587..ee23d843 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Package: dpkg Architecture: any Essential: yes Pre-Depends: ${shlibs:Pre-Depends} -Suggests: cpio, patch +Suggests: cpio (>= 2.4.2-2), patch Conflicts: dpkgname Replaces: dpkgname Description: Package maintenance system for Debian Linux diff --git a/doc/manuals-version b/doc/manuals-version index e1b373c1..94ebd50a 100644 --- a/doc/manuals-version +++ b/doc/manuals-version @@ -1,2 +1,2 @@ - + diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index 8c9327fa..5b3f2b77 100644 --- a/dpkg-deb/extract.c +++ b/dpkg-deb/extract.c @@ -197,7 +197,16 @@ void extracthalf(const char *debar, const char *directory, readfail(ar,debar,"ctrlarea"); } else { + + if (!strncmp(versionbuf,"!",7)) { + if (fprintf(stderr, BACKEND + ": file looks like it might be an archive which has been\n" + BACKEND ": corrupted by being downloaded in ASCII mode\n") + == EOF) werr("stderr"); + } + ohshit("`%.255s' is not a debian format archive",debar); + } fflush(ar); diff --git a/main/processarc.c b/main/processarc.c index ca542793..e9bad04a 100644 --- a/main/processarc.c +++ b/main/processarc.c @@ -282,7 +282,10 @@ void process_archive(const char *filename) { filesdbinit(); if (pkg->status != stat_notinstalled && pkg->status != stat_configfiles) - printf("Preparing to replace %s (using %s) ...\n",pkg->name,pfilename); + printf("Preparing to replace %s %s (using %s) ...\n", + pkg->name, + versiondescribe(&pkg->installed.version,vdew_nonambig), + pfilename); else printf("Unpacking %s (from %s) ...\n",pkg->name,pfilename); diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh old mode 100644 new mode 100755 index a5ab6c59..2da88014 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -30,8 +30,8 @@ END rootcommand='' pgpcommand=pgp -signsource=signfile -signchanges=signfile +signsource='withecho signfile' +signchanges='withecho signfile' binarytarget=binary sourcestyle='' version='' @@ -80,23 +80,48 @@ pv="${package}_${version}" pva="${package}_${version}_${arch}" signfile () { - $pgpcommand -fast <"../$1" >"../$1.asc" + $pgpcommand +clearsig=on -fast <"../$1" >"../$1.asc" + echo mv -- "../$1.asc" "../$1" } +withecho () { + echo " $@" >&2 + "$@" +} + set -- $binaryonly if [ -n "$maint" ]; then set -- "$@" "-m$maint" ; fi if [ -n "$version" ]; then set -- "$@" "-v$version" ; fi if [ -n "$desc" ]; then set -- "$@" "-C$desc" ; fi -set -x - -$rootcommand debian/rules clean +withecho $rootcommand debian/rules clean if [ x$binaryonly = x ]; then - cd ..; dpkg-source -b "$dirn"; cd "$dirn" + cd ..; withecho dpkg-source -b "$dirn"; cd "$dirn" fi -debian/rules build -$rootcommand debian/rules $binarytarget +withecho debian/rules build +withecho $rootcommand debian/rules $binarytarget $signsource "$pv.dsc" -dpkg-genchanges $binaryonly $sourcestyle >../"$pva.changes" +chg=../"$pva.changes" +withecho dpkg-genchanges $binaryonly $sourcestyle >"$chg" + +fileomitted () { + set +e + test -z "`sed -n '/^Files:/,/^[^ ]/ s/'$1'$//p' <$chg`" + fir=$? + set -e + return $fir +} + +if fileomitted '\.dsc'; then + srcmsg='no source included in upload' +elif fileomitted '\.diff\.gz'; then + srcmsg='Debian-specific package; upload is full source' +elif fileomitted '\.orig\.tar\.gz'; then + srcmsg='diff-only upload (original source NOT included)' +else + srcmsg='full upload (original source is included)' +fi + $signchanges "$pva.changes" +echo "dpkg-buildpackage: $srcmsg" diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 3429f692..61e321bf 100644 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -9,6 +9,7 @@ $fileslistfile= 'debian/files'; $varlistfile= 'debian/substvars'; $uploadfilesdir= '..'; $sourcestyle= 'i'; +$quiet= 0; use POSIX; use POSIX qw(:errno_h :signal_h); @@ -35,6 +36,7 @@ Options: -b or -B (identical) binary-only build - no source files -si (default) src includes orig for debian-revision 0 or 1 -sa source includes orig src -sd source is diff and .dsc only + -q quiet - no informational messages on stderr -F force change log format -V= set a substitution variable -T read variables here, not debian/substvars @@ -54,6 +56,8 @@ while (@ARGV) { $binaryonly= 1; } elsif (m/^-s([iad])$/) { $sourcestyle= $1; + } elsif (m/^-q$/) { + $quiet= 1; } elsif (m/^-c/) { $controlfile= $'; } elsif (m/^-l/) { @@ -215,10 +219,18 @@ if (!$binaryonly) { if (($sourcestyle =~ m/i/ && $version !~ m/-[01]$/ || $sourcestyle =~ m/d/) && grep(m/\.diff\.gz$/,@sourcefiles)) { + $origsrcmsg= "not including original source code in upload"; @sourcefiles= grep(!m/\.orig\.tar\.gz$/,@sourcefiles); + } else { + $origsrcmsg= "including full source code in upload"; } +} else { + $origsrcmsg= "binary-only upload - not including any source code"; } +print(STDERR "$progname: $origsrcmsg\n") || + &syserr("write original source message") unless $quiet; + $f{'Format'}= $substvar{'Format'}; if (!length($f{'Date'})) { diff --git a/scripts/dpkg-source.1 b/scripts/dpkg-source.1 index 78f1037d..67f140c9 100644 --- a/scripts/dpkg-source.1 +++ b/scripts/dpkg-source.1 @@ -473,6 +473,14 @@ needs to find these files so that it can include their sizes and checksums in the .B .changes file). +.TP +.B -q +Usually +.B dpkg-genchanges +will produce informative messages on standard error, for example about +how many of the package's source files are being uploaded. +.B -q +suppresses these messages. .SH DPKG-BUILDPACKAGE OPTIONS .B dpkg-buildpackage does not take any non-option arguments. diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 7b4d3d53..5246a224 100644 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -666,9 +666,16 @@ sub checktarsane { file: while (defined($fn= )) { $fn =~ s/\0$//; $pname= $fn; $pname =~ y/ -~/?/c; - $fn =~ m/\n/ && - &error("tarfile \`$tarfileread' contains object with". - " newline in its name ($pname)"); + if ($fn =~ m/\n/) { + if (!@filesinarchive) { + &error("first output from cpio -0t (from \`$tarfileread') ". + "contains newline - you probably have an out of ". + "date version of cpio. 2.4.2-2 is known to work"); + } else { + &error("tarfile \`$tarfileread' contains object with". + " newline in its name ($pname)"); + } + } $slash= substr($fn,length($epfx),1); (($slash eq '/' || $slash eq '') && substr($fn,0,length($epfx)) eq $epfx) || diff --git a/version.h b/version.h index 71a0835f..a4451f45 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define DPKG_VERSION "1.3.10" /* This line modified by Makefile */ +#define DPKG_VERSION "1.3.12" /* This line modified by Makefile */ -- 2.39.5