From: Ben Collins Date: Fri, 22 Oct 1999 17:25:03 +0000 (+0000) Subject: * Fixed incorrect patch for --print-architecture (oops, oh well X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4335ac577ab5c160175120a6d3e01df69d2bfe8c;p=dpkg * Fixed incorrect patch for --print-architecture (oops, oh well it was already broken when there was no gcc anyway :) * Fixed missing mipseb that was supposed to be in the archtable * Better output in update-alternatives --config, now shows the current, and the prefered choices. * dpkg-name: ignore epoch when getting version * 50dpkg-dev.el: add it as a conffile for dpkg-dev * dpkg-shlibdeps: redirect STDERR to /dev/null for the dpkg fork so we don't see dpkg's errors * internals.sgml: Removed references to the versions of build tools, they date the document. * debian-changelog-mode.el: added hint for better log-email handling * Added recognition for new source-depends fields for policy referenced in bug #41232 * dpkg-buildpackage: add -ap option to force a pause prior to starting the sign process. This helps for people who don't keep their signatures on the filesystem (on a floppy perhaps, then mount as needed). * minor script corrections * dpkg-dev control: Change gcc to c-compiler in the recommends field, and move cpio, patch and make to the depends line --- diff --git a/ChangeLog b/ChangeLog index a8d8c4d7..edbcdbb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,24 @@ Thu Oct 21 12:57:31 EDT 1999 Ben Collins * Fixed incorrect patch for --print-architecture (oops, oh well it was already broken when there was no gcc anyway :) + * Fixed missing mipseb that was supposed to be in the archtable + * Better output in update-alternatives --config, now shows the + current, and the prefered choices. + * dpkg-name: ignore epoch when getting version + * 50dpkg-dev.el: add it as a conffile for dpkg-dev + * dpkg-shlibdeps: redirect STDERR to /dev/null for the dpkg fork so we + don't see dpkg's errors + * internals.sgml: Removed references to the versions of build tools, + they date the document. + * debian-changelog-mode.el: added hint for better log-email handling + * Added recognition for new source-depends fields for policy + referenced in bug #41232 + * dpkg-buildpackage: add -ap option to force a pause prior to starting + the sign process. This helps for people who don't keep their signatures + on the filesystem (on a floppy perhaps, then mount as needed). + * minor script corrections + * dpkg-dev control: Change gcc to c-compiler in the recommends field, and + move cpio, patch and make to the depends line Thu Oct 21 10:22:43 EDT 1999 Ben Collins diff --git a/archtable b/archtable index 91e4e489..4725b1da 100644 --- a/archtable +++ b/archtable @@ -32,3 +32,4 @@ ppc powerpc powerpc powerpc powerpc powerpc mips mips mips mipsel mipsel mipsel +mipseb mips mips diff --git a/debian/changelog b/debian/changelog index 6db599a0..28fa8e37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,24 @@ dpkg (1.4.1.18) unstable; urgency=low * Fixed incorrect patch for --print-architecture (oops, oh well it was already broken when there was no gcc anyway :) - + * Fixed missing mipseb that was supposed to be in the archtable + * Better output in update-alternatives --config, now shows the + current, and the prefered choices. + * dpkg-name: ignore epoch when getting version + * 50dpkg-dev.el: add it as a conffile for dpkg-dev + * dpkg-shlibdeps: redirect STDERR to /dev/null for the dpkg fork so we + don't see dpkg's errors + * internals.sgml: Removed references to the versions of build tools, + they date the document. + * debian-changelog-mode.el: added hint for better log-email handling + * Added recognition for new source-depends fields for policy + referenced in bug #41232 + * dpkg-buildpackage: add -ap option to force a pause prior to starting + the sign process. This helps for people who don't keep their signatures + on the filesystem (on a floppy perhaps, then mount as needed). + * minor script corrections + * dpkg-dev control: Change gcc to c-compiler in the recommends field, and + move cpio, patch and make to the depends line -- Wichert Akkerman UNRELEASED diff --git a/debian/control b/debian/control index 5b6f438d..e7ca0b02 100644 --- a/debian/control +++ b/debian/control @@ -24,8 +24,8 @@ Package: dpkg-dev Section: devel Priority: important Architecture: all -Depends: perl5 -Recommends: cpio (>= 2.4.2-2), patch (>= 2.2-1), gcc, make +Depends: perl5, cpio (>= 2.4.2-2), patch (>= 2.2-1), make +Recommends: c-compiler Suggests: gnupg, debian-keyring Conflicts: dpkgname Replaces: dpkgname, dpkg (<< 1.4.0), dpkg-doc-ja diff --git a/debian/rules b/debian/rules index e63b1acc..008c27a7 100755 --- a/debian/rules +++ b/debian/rules @@ -56,7 +56,7 @@ binary-trees: build sed -e '/^# i386elf: /d' debian/preinst >$(mcidir)/preinst ; \ fi set -e; if [ -f debian/shlibs.default.$(arch) ]; then \ - echo /etc/dpkg/shlibs.default >debian/tmp-dev/DEBIAN/conffiles ; \ + echo /etc/dpkg/shlibs.default >> debian/tmp-dev/DEBIAN/conffiles ; \ install -d debian/tmp-main/etc/dpkg; \ install -m644 debian/shlibs.default.$(arch) \ debian/tmp-dev/etc/dpkg/shlibs.default ; \ @@ -76,6 +76,7 @@ binary-trees: build install -m 755 debian/dev-prerm debian/tmp-dev/DEBIAN/prerm install -d debian/tmp-dev/etc/emacs/site-start.d install -m 644 debian/50dpkg-dev.el debian/tmp-dev/etc/emacs/site-start.d/. + echo '/etc/emacs/site-start.d/50dpkg-dev.el' >> debian/tmp-dev/DEBIAN/conffiles install -d debian/tmp-dev/usr/lib/emacsen-common/packages/{install,remove} install -m 755 debian/emacsen-common-remove \ debian/tmp-dev/usr/lib/emacsen-common/packages/remove/dpkg-dev diff --git a/doc/internals.sgml b/doc/internals.sgml index a8c920e8..c070a106 100644 --- a/doc/internals.sgml +++ b/doc/internals.sgml @@ -56,9 +56,7 @@ This chapter contains general notes about the conversion to should probably read all of this file first. You have been warned.

-The current version of automake used is version it supports emacs lisp properly @@ -71,10 +69,6 @@ The -ftp://ftp.cygnus.com/pub/tromey -

This doesn't affect anything other than rebuilding the ./configure

I have also customized the canonicalizing macros found in - -I also converted to libtool 0.7 (which can be found in the Debian +I also converted to libtool (which can be found in the Debian distribution now). Essentially, this means that all the dpkg tools can be compiled against a shared diff --git a/scripts/controllib.pl b/scripts/controllib.pl index 0a084fae..40e1552a 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -1,7 +1,10 @@ $parsechangelog= 'dpkg-parsechangelog'; -grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size)); +grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size + Build-Depends Build-Indep-Depends + Build-Conflicts Build-Indep-Conflicts)); + $substvar{'Format'}= 1.6; $substvar{'Newline'}= "\n"; @@ -36,8 +39,9 @@ if(!defined($getlogin)) { } if (defined ($ENV{'LOGNAME'})) { - if (!defined ($getlogin)) { - warn (sprintf ('no utmp entry available, using value of LOGNAME ("%s")', $ENV{'LOGNAME'})); + if (!defined ($getlogin)) { + # Hmmm, do we really need this? + # warn (sprintf ('no utmp entry available, using value of LOGNAME ("%s")', $ENV{'LOGNAME'})); } else { if ($getlogin ne $ENV{'LOGNAME'}) { warn (sprintf ('utmp entry ("%s") does not match value of LOGNAME ("%s"); using "%s"', diff --git a/scripts/debian-changelog-mode.el b/scripts/debian-changelog-mode.el index 23b72d80..d6b9fb38 100644 --- a/scripts/debian-changelog-mode.el +++ b/scripts/debian-changelog-mode.el @@ -218,7 +218,20 @@ Runs `debian-changelog-mode-hook' if it exists. Key bindings: -\\{debian-changelog-mode-map}" +\\{debian-changelog-mode-map} +Hint: If you want to use your debian.org email address for debian/changelog +entries without using it for the rest of your email, put + + (add-hook 'debian-changelog-mode-hook 'my-debian-changelog-mode-hook) + (defun my-debian-changelog-mode-hook () + (make-local-variable 'add-log-mailing-address) + (setq add-log-mailing-address \"myname@debian.org\")) + +in your ~/.emacs file. This is better than including a local setting +for add-log-mailing-address in the changelog itself both because you +only have to set it up once and because it works in the presense of +NMUs." + (interactive) (kill-all-local-variables) (text-mode) diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl index 3c51c4b2..9b05080c 100755 --- a/scripts/dpkg-architecture.pl +++ b/scripts/dpkg-architecture.pl @@ -54,7 +54,6 @@ require 'controllib.pl'; 'powerpc', 'powerpc-linux', 'mips', 'mips-linux', 'mipsel', 'mipsel-linux', - 'mipseb', 'mipseb-linux', 'hurd-i386', 'i386-gnu'); sub usageversion { diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index 8a8d12ee..d7bb2cc6 100755 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -30,7 +30,10 @@ Options: -r -sd uploaded src is diff and .dsc only } -nc do not clean source tree (implies -b) -tc clean source tree when finished + -ap add pause before starting signature process -h print this message + -i[] ignore diffs of files matching regex } only passed + to dpkg-source END } @@ -50,6 +53,7 @@ since='' maint='' desc='' noclean=false +usepause=false while [ $# != 0 ] do @@ -63,10 +67,12 @@ do -spgp) forcesigninterface=pgp ;; -us) signsource=: ;; -uc) signchanges=: ;; + -ap) usepause="true";; -a*) opt_a=1; arch="$value" ;; -si) sourcestyle=-si ;; -sa) sourcestyle=-sa ;; -sd) sourcestyle=-sd ;; + -i*) diffignore=$1;; -tc) cleansource=true ;; -t*) targetgnusystem="$value" ;; # Order DOES matter! -nc) noclean=true; binaryonly=-b ;; @@ -140,10 +146,16 @@ if [ x$noclean != xtrue ]; then withecho $rootcommand debian/rules clean $archlist fi if [ x$binaryonly = x ]; then - cd ..; withecho dpkg-source -b "$dirn"; cd "$dirn" + cd ..; withecho dpkg-source $diffignore -b "$dirn"; cd "$dirn" fi withecho debian/rules build $archlist withecho $rootcommand debian/rules $binarytarget $archlist + +if [ "$usepause" = "true" ] && [ x$binaryonly = x -o x$signchanges != x ] ; then + echo Press the return key to start signing process + read dummy_stuff +fi + if [ x$binaryonly = x ]; then $signsource "$pv.dsc" fi diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 3f296d1d..a0693608 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -45,7 +45,8 @@ Options: -p print control file for package $i=100;grep($fieldimps{$_}=$i--, qw(Package Version Section Priority Architecture Essential Pre-Depends Depends Recommends Suggests Optional Conflicts Replaces - Provides Installed-Size Maintainer Source Description)); + Provides Installed-Size Maintainer Source Description Build-Depends + Build-Indep-Depends Build-Conflicts Build-Indep-Conflicts)); while (@ARGV) { $_=shift(@ARGV); @@ -119,8 +120,8 @@ for $_ (keys %fi) { if (m/^Maintainer$/) { $f{$_}=$v; } elsif (m/^Source$/) { &setsourcepackage; } elsif (s/^X[CS]*B[CS]*-//i) { $f{$_}= $v; } - elsif (m/^X[CS]+-|^Standards-Version$/i) { } - elsif (m/^Section$|^Priority$/) { $spdefault{$_}= $v; } + elsif (m/^X[CS]+-|^Standards-Version$|^Build-(Indep-)?(Depends|Conflicts)$/i) { } + elsif (m/^Section$|^Priority$/) { $spdefault{$_}= $v; } else { &unknown('general section of control info file'); } } elsif (s/^C$myindex //) { #print STDERR "P key >$_< value >$v<\n"; @@ -211,9 +212,9 @@ chown(@fowner, "$fileslistfile.new") || &syserr("chown new files list file"); if (open(X,"< $fileslistfile")) { while () { - s/\n$//; + chomp; next if m/^([-+0-9a-z.]+)_[^_]+_(\w+)\.deb / - && ($1 eq $oppackage) && ($2 eq $arch); + && ($1 eq $oppackage) && ($2 eq $arch || $2 eq 'all'); print(Y "$_\n") || &syserr("copy old entry to new files list file"); } } elsif ($! != ENOENT) { diff --git a/scripts/dpkg-name.sh b/scripts/dpkg-name.sh index 54578965..fc4c2371 100755 --- a/scripts/dpkg-name.sh +++ b/scripts/dpkg-name.sh @@ -55,7 +55,7 @@ fileexists () { getname () { if p=`dpkg-deb -f -- "$1" package`; then - v=`dpkg-deb -f -- "$1" version`; + v=`dpkg-deb -f -- "$1" version | sed s,.*:,,`; r=`dpkg-deb -f -- "$1" revision`; if [ -z "$r" ]; then diff --git a/scripts/dpkg-parsechangelog.pl b/scripts/dpkg-parsechangelog.pl index f5eeb5ea..08eb0980 100755 --- a/scripts/dpkg-parsechangelog.pl +++ b/scripts/dpkg-parsechangelog.pl @@ -39,6 +39,7 @@ while (@ARGV) { push(@ap,$_); m/^--$/ && last; m/^-v/ && next; + if (m/^-h$/) { &usageversion; exit(0); } &usageerr("unknown option \`$_'"); } diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 91d92f52..76bf66b5 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl $dpkglibdir= "."; -$version= '1.3.6'; # This line modified by Makefile +$version= '1.3.7'; # This line modified by Makefile use POSIX; use POSIX qw(:errno_h :signal_h); @@ -115,9 +115,13 @@ for ($i=0;$i<=$#exec;$i++) { if ($#libpaths >= 0) { grep(s/\[\?\*/\\$&/g, @libpaths); defined($c= open(P,"-|")) || syserr("cannot fork for dpkg --search"); - if (!$c) { exec("dpkg","--search","--",@libpaths); syserr("cannot exec dpkg"); } + if (!$c) { + close STDERR; # we don't need to see dpkg's errors + open STDERR, "> /dev/null"; + exec("dpkg","--search","--",@libpaths); syserr("cannot exec dpkg"); + } while (

) { - s/\n$//; + chomp; if (m/^local diversion |^diversion by/) { &warn("diversions involved - output may be incorrect"); print(STDERR " $_\n") || syserr("write diversion info to stderr"); diff --git a/scripts/dpkg-source.1 b/scripts/dpkg-source.1 index ec9ae1f5..3b9b253d 100644 --- a/scripts/dpkg-source.1 +++ b/scripts/dpkg-source.1 @@ -265,6 +265,26 @@ or the original source directory or the empty string (no original source, and so no diff) depending on the arguments. .TP +.B -i[] +You may specify a perl regular expression to match files you want +filtered out of the list of files for the diff. (This list is +generated by a find command.) \fB-i\fR by itself enables the option, +with a default that will filter out CVS, RCS and libtool .deps +subdirectories, and all files within them, as well as ~ suffixed +backup files and DEAD_JOE's. + +This is very helpful in cutting out extraneous files that get included +in the .diff.gz, (eg: "debian/BUGS_TODO/*" or "debian/RCS/*,v"). For +instance, if you maintain a package that you track via remote CVS, +where you don't have access permissions for commiting the debian +control files and making tags for \fIcvs-buildpackage(1)\fR, it is +necessary to perform an extra checkout/update into a directory you +keep pristine, to generate the .orig.tar.gz from. That directory will +have CVS/Entries files in it that will contain timestamps that differ +from the ones in your working directory, thus causing them to be +unnecessarily included in every .diff.gz, unless you use the \fB-i\fR +switch. +.TP .BR -sa , -sp , -su , -sk , -sA , -sP , -sU , -sK , -ss " with " -b If .BR -sk " or " -sp @@ -557,6 +577,11 @@ Do not sign the source package or the changelog, respectively. Specify the Debian architecture we build for. The architecture of the machine we build on is determined automatically, and is also the default for the host machine. +.TP +.B -i[] +Passed unchanged to +.B dpkg-source +.TP .SH DPKG-DISTADDFILE ARGUMENTS .B dpkg-distaddfile does not take any non-common options. It takes three non-option diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 5544d734..4c7bde98 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -8,6 +8,8 @@ my %dirincluded; my %notfileobject; my $fn; +$diff_ignore_default_regexp = '^.*~$|DEAD_JOE|(?:/CVS|/RCS|/.deps)(?:$|/.*$)'; + $sourcestyle = 'X'; use POSIX; @@ -18,6 +20,9 @@ use strict 'refs'; push (@INC, $dpkglibdir); require 'controllib.pl'; +# Make sure patch doesn't get any funny ideas +undef $ENV{'POSIXLY_CORRECT'}; + sub usageversion { print STDERR "Debian GNU/Linux dpkg-source $version. Copyright (C) 1996 @@ -35,6 +40,8 @@ Build options: -c get control info from this file -D= override or add a .dsc field and value -U remove a field -sa auto select orig source (-sA is default) + -i[] filter out files to ignore diffs of. + Defaults to: '$diff_ignore_default_regexp' -sk use packed orig source (unpack & keep) -sp use packed orig source (unpack & remove) -su use unpacked orig source (pack & keep) @@ -51,7 +58,8 @@ General options: -h print this message $i = 100; grep ($fieldimps {$_} = $i--, - qw (Source Version Binary Maintainer Architecture Standards-Version)); + qw (Source Version Binary Maintainer Architecture Standards-Version + Build-Depends Build-Indep-Depends Build-Conflicts Build-Indep-Conflicts)); while (@ARGV && $ARGV[0] =~ m/^-/) { $_=shift(@ARGV); @@ -71,6 +79,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { $override{$1}= $'; } elsif (m/^-U([^\=:]+)$/) { $remove{$1}= 1; + } elsif (m/^-i(.*)$/) { + $diff_ignore_regexp = $1 ? $1 : $diff_ignore_default_regexp; } elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) { $substvar{$1}= $'; } elsif (m/^-T/) { @@ -112,6 +122,7 @@ if ($opmode eq 'build') { #print STDERR "G key >$_< value >$v<\n"; if (m/^Source$/) { &setsourcepackage; } elsif (m/^Standards-Version$|^Maintainer$/) { $f{$_}= $v; } + elsif (m/^Build-(Indep-)?(Depends|Conflicts)$/i) { $f{$_}= $v; } elsif (s/^X[BC]*S[BC]*-//i) { $f{$_}= $v; } elsif (m/^(Section|Priority|Files)$/ || m/^X[BC]+-/i) { } else { &unknown('general section of control info file'); } @@ -338,7 +349,9 @@ if ($opmode eq 'build') { file: while (defined($fn= )) { - $fn =~ s/\0$//; $fn =~ s,^\./,,; + $fn =~ s/\0$//; + next file if $fn =~ m/$diff_ignore_regexp/o; + $fn =~ s,^\./,,; lstat("$dir/$fn") || &syserr("cannot stat file $dir/$fn"); if (-l _) { $type{$fn}= 'symlink'; @@ -415,7 +428,9 @@ if ($opmode eq 'build') { } $/= "\0"; while (defined($fn= )) { - $fn =~ s/\0$//; $fn =~ s,^\./,,; + $fn =~ s/\0$//; + next if $fn =~ m/$diff_ignore_regexp/o; + $fn =~ s,^\./,,; next if defined($type{$fn}); lstat("$origdir/$fn") || &syserr("cannot check orig file $origdir/$fn"); if (-f _) { @@ -916,11 +931,19 @@ sub extracttar { opendir(D,"$dirchdir") || &syserr("Unable to open dir $dirchdir"); @dirchdirfiles = grep($_ ne "." && $_ ne "..",readdir(D)); closedir(D) || &syserr("Unable to close dir $dirchdir"); - (@dirchdirfiles==1 && -d "$dirchdir/$dirchdirfiles[0]") || - &error("$tarfileread extracted into >1 directory"); - rename("$dirchdir/$dirchdirfiles[0]", "$dirchdir/$newtopdir") || - &syserr("Unable to rename $dirchdir/$dirchdirfiles[0] to ". - "$dirchdir/$newtopdir"); + if (@dirchdirfiles==1 && -d "$dirchdir/$dirchdirfiles[0]") { + rename("$dirchdir/$dirchdirfiles[0]", "$dirchdir/$newtopdir") || + &syserr("Unable to rename $dirchdir/$dirchdirfiles[0] to ". + "$dirchdir/$newtopdir"); + } else { + mkdir("$dirchdir/$newtopdir", 0777) || + &syserr("Unable to mkdir $dirchdir/$newtopdir"); + for (@dirchdirfiles) { + rename("$dirchdir/$_", "$dirchdir/$newtopdir/$_") || + &syserr("Unable to rename $dirchdir/$_ to ". + "$dirchdir/$newtopdir/$_"); + } + } } sub cpiostderr { diff --git a/scripts/update-alternatives.pl b/scripts/update-alternatives.pl index cf948473..3acd071c 100755 --- a/scripts/update-alternatives.pl +++ b/scripts/update-alternatives.pl @@ -442,11 +442,10 @@ sub config_message { printf(STDOUT " Selection Command\n"); printf(STDOUT "-----------------------------------------------\n"); for ($i=0; $i<=$#versions; $i++) { - if ($best eq $versions[$i]) { - printf(STDOUT "* %s %s\n", $i+1, $versions[$i]); - } else { - printf(STDOUT " %s %s\n", $i+1, $versions[$i]); - } + printf(STDOUT "%s%s %s %s\n", + (readlink("$altdir/$name") eq $versions[$i]) ? '*' : ' ', + ($best eq $versions[$i]) ? '+' : ' ', + $i+1, $versions[$i]); } printf(STDOUT "\nEnter to keep the default[*], or type selection number: "); } @@ -461,6 +460,7 @@ sub config_alternatives { ($preferred =~ m/[0-9]*/); if ($preferred ne '') { $preferred--; + print STDOUT "Using \`$versions[$preferred]' to provide \`$name'.\n"; my $spath = $versions[$preferred]; symlink("$spath","$altdir/$name.dpkg-tmp") || &quit("unable to make $altdir/$name.dpkg-tmp a symlink to $spath: $!");