From: Wichert Akkerman Date: Wed, 19 Jan 2000 16:17:23 +0000 (+0000) Subject: scripts/controllib.pl: add comment with description of global variables X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c95d38c8d09a248602e245f3f5ddd0f7558c79b3;p=dpkg scripts/controllib.pl: add comment with description of global variables scripts/dpkg-genchanges.pl: + add comment with description of global variables + Change Format number to 1.7 + `Maintainer' is now the actual maintainer as listed in control + add `Changed-By' field with maintainer as listed in changelog. Add -e flag to override this value scripts/dpkg-buildpackage.sh: pass -e on to dpkg-genchanges scripts/dpkg-source.1: document new -e option, update copyright --- diff --git a/ChangeLog b/ChangeLog index ee239c9f..046b057a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Wed Jan 19 16:41:04 CET 2000 Wichert Akkerman + + * scripts/controllib.pl: add comment with description of global variables + * scripts/dpkg-genchanges.pl: + + add comment with description of global variables + + Change Format number to 1.7 + + `Maintainer' is now the actual maintainer as listed in control + + add `Changed-By' field with maintainer as listed in changelog. Add -e + flag to override this value + * scripts/dpkg-buildpackage.sh: pass -e on to dpkg-genchanges + * scripts/dpkg-source.1: document new -e option, update copyright + Mon Jan 17 21:20:35 CET 2000 Wichert Akkerman * dselect/Makefile.in: not all shells support == for strings comparisons @@ -7,6 +19,11 @@ Mon Jan 17 21:20:35 CET 2000 Wichert Akkerman + use objdump instead of ldd + correct checks on shlibs.local +Sun Jan 16 22:07:12 CET 2000 Wichert Akkerman + + * main/dpkg.8: note that --force-overwrite is off by default + * po/.cvsignore: add all the .gmo files + Sat Jan 15 03:48:47 CET 2000 Wichert Akkerman * doc/ja/dpkg-deb.5: updated with patch from Hiroshi KISE diff --git a/main/dpkg.8 b/main/dpkg.8 index 38a20895..59beb798 100644 --- a/main/dpkg.8 +++ b/main/dpkg.8 @@ -377,10 +377,10 @@ If a conffile has been modified always choose the default action. If always default. If there is no default then we use the old or new version, depending on the option given. -\fBoverwrite\fP(*): +\fBoverwrite\fP: Overwrite one package's file with another's file. -\fBoverwrite-dir\fP +\fBoverwrite-dir\fP: Overwrite one package's directory with another's file. \fBoverwrite-diverted\fP: diff --git a/po/.cvsignore b/po/.cvsignore index ec92afa9..95a9ff2a 100644 --- a/po/.cvsignore +++ b/po/.cvsignore @@ -4,11 +4,11 @@ cat-id-tbl.c dpkg.pot stamp-cat-id POTFILES -sv.gmo -ru.gmo -pl.gmo -ja.gmo -es.gmo -en.gmo cs.gmo +en.gmo +es.gmo fr.gmo +ja.gmo +pl.gmo +ru.gmo +sv.gmo diff --git a/scripts/controllib.pl b/scripts/controllib.pl index 6f9cedd1..5af70435 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -1,4 +1,16 @@ +# Global variables: +# $v - value parameter to function +# $sourcepackage - name of sourcepackage +# %capit - map to get properly capitilized version of fields +# %fi - map of fields values. keys are of the form "S# key" +# where S is source (L is changelog, C is control) +# and # is an index +# %p2i - map from datafile+packagename to index in controlfile +# (used if multiple packages can be listed). Key is +# "S key" where S is the source and key is the packagename +# %substvar - map with substitution variables + $parsechangelog= 'dpkg-parsechangelog'; grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size @@ -6,7 +18,7 @@ grep($capit{lc $_}=$_, qw(Pre-Depends Standards-Version Installed-Size Build-Conflicts Build-Conflicts-Indep)); -$substvar{'Format'}= 1.6; +$substvar{'Format'}= 1.7; $substvar{'Newline'}= "\n"; $substvar{'Space'}= " "; $substvar{'Tab'}= "\t"; diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index 4ae72dab..5fb7e79d 100755 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -24,7 +24,8 @@ Options: -r -b binary-only, do not build source } also passed to -B binary-only, no arch-indep files } dpkg-genchanges -v changes since version } - -m maintainer for release is } only passed + -m maintainer for package is } + -e maintainer for release is } only passed -C changes are described in } to dpkg- -si (default) src includes orig for rev. 0 or 1 } genchanges -sa uploaded src always includes orig } @@ -82,6 +83,7 @@ do -B) binaryonly=-B; binarytarget=binary-arch ;; -v*) since="$value" ;; -m*) maint="$value" ;; + -e*) changedby="$value" ;; -C*) descfile="$value" ;; *) echo >&2 "$progname: unknown option or argument $1" usageversion; exit 2 ;; @@ -151,6 +153,7 @@ withecho () { set -- $binaryonly $sourcestyle if [ -n "$maint" ]; then set -- "$@" "-m$maint" ; fi +if [ -n "$changedby" ]; then set -- "$@" "-e$changedby" ; fi if [ -n "$since" ]; then set -- "$@" "-v$since" ; fi if [ -n "$desc" ]; then set -- "$@" "-C$desc" ; fi diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 33cd55c4..a184223f 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -11,6 +11,17 @@ $uploadfilesdir= '..'; $sourcestyle= 'i'; $quiet= 0; +# Other global variables used: +# %f2p - file to package map +# %p2f - package to file map +# has entries for both "packagename" and "packagename architecture" +# %p2ver - package to version map +# %f2sec - file to section map +# %f2pri - file to priority map +# %sourcedefault - default values as taken from source (used for Section, +# Priority and Maintainer) +# $changedby - person who created this package (as listed in changelog) + use POSIX; use POSIX qw(:errno_h :signal_h); @@ -19,9 +30,11 @@ require 'controllib.pl'; sub usageversion { print STDERR -"Debian GNU/Linux dpkg-genchanges $version. Copyright (C) 1996 -Ian Jackson. This is free software; see the GNU General Public Licence -version 2 or later for copying conditions. There is NO warranty. +"Debian GNU/Linux dpkg-genchanges $version. +Copyright (C) 1996 Ian Jackson. +Copyright (C) 2000 Wichert Akkerman. +This is free software; see the GNU General Public Licence version 2 or later +for copying conditions. There is NO warranty. Usage: dpkg-genchanges [options ...] @@ -32,7 +45,8 @@ Options: -b binary-only build - no source files -f get .deb files list from this file -v include all changes later than version -C use change description from this file - -m override changelog's maintainer value + -m override control's maintainer value + -e override changelog's maintainer value -u directory with files (default is \`..') -si (default) src includes orig for debian-revision 0 or 1 -sa source includes orig src @@ -78,6 +92,8 @@ while (@ARGV) { $varlistfile= $'; } elsif (m/^-m/) { $forcemaint= $'; + } elsif (m/^-e/) { + $forcechangedby= $'; } elsif (m/^-F([0-9a-z]+)$/) { $changelogformat=$1; } elsif (m/^-D([^\=:]+)[=:]/) { @@ -129,14 +145,13 @@ close(FL); for $_ (keys %fi) { $v= $fi{$_}; if (s/^C //) { -#print STDERR "G key >$_< value >$v<\n"; if (m/^Source$/) { &setsourcepackage; } - elsif (m/^Section$|^Priority$/) { $sourcedefault{$_}= $v; } + elsif (m/^Section$|^Priority$/i) { $sourcedefault{$_}= $v; } + elsif (m/^Maintainer$/i) { $f{$_}= $v; } elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; } - elsif (m/|^X[BS]+-|^Standards-Version$|^Maintainer$/i) { } + elsif (m/|^X[BS]+-|^Standards-Version$/i) { } else { &unknown('general section of control info file'); } } elsif (s/^C(\d+) //) { -#print STDERR "P key >$_< value >$v<\n"; $i=$1; $p=$fi{"C$i Package"}; $a=$fi{"C$i Architecture"}; if (!defined($p2f{$p})) { if ($a eq 'any' || ($a eq 'all' && !$archspecific) || @@ -170,10 +185,11 @@ for $_ (keys %fi) { } } } elsif (s/^L //) { -#print STDERR "L key >$_< value >$v<\n"; - if (m/^Source$/) { + if (m/^Source$/i) { &setsourcepackage; - } elsif (m/^(Version|Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) { + } elsif (m/^Maintainer$/i) { + $f{"Changed-By"}=$v; + } elsif (m/^(Version|Changes|Urgency|Distribution|Date|Closes)$/i) { $f{$_}= $v; } elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; @@ -288,6 +304,7 @@ for $f (@sourcefiles,@fileslistfiles) { $f{'Source'}= $sourcepackage; $f{'Maintainer'}= $forcemaint if length($forcemaint); +$f{'Changed-By'}= $forcechangedby if length($forcechangedby); for $f (qw(Version Distribution Maintainer Changes)) { defined($f{$f}) || &error("missing information for critical output field $f"); diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index e65b0028..d252935d 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -43,7 +43,7 @@ Options: -p print control file for package } $i=100;grep($fieldimps{$_}=$i--, - qw(Package Version Section Priority Architecture Essential + qw(Package Source-Version Section Priority Architecture Essential Pre-Depends Depends Recommends Suggests Enhances Optional Conflicts Replaces Provides Installed-Size Maintainer Source Description Build-Depends Build-Depends-Indep Build-Conflicts @@ -147,7 +147,7 @@ for $_ (keys %fi) { &setsourcepackage; } elsif (m/^Version$/) { $sourceversion= $v; - $f{$_}= $v unless length($forceversion); + $f{"Source-Version"}= $v unless length($forceversion); } elsif (m/^(Maintainer|Changes|Urgency|Distribution|Date|Closes)$/) { } elsif (s/^X[CS]*B[CS]*-//i) { $f{$_}= $v; @@ -159,14 +159,14 @@ for $_ (keys %fi) { } } -$f{'Version'}= $forceversion if length($forceversion); +$f{'Source-Version'}= $forceversion if length($forceversion); for $f (qw(Section Priority)) { $spvalue{$f}= $spdefault{$f} unless length($spvalue{$f}); $f{$f}= $spvalue{$f} if $spinclude{$f} && length($spvalue{$f}); } -for $f (qw(Package Version)) { +for $f (qw(Package Source-Version)) { defined($f{$f}) || &error("missing information for output field $f"); } for $f (qw(Maintainer Description Architecture)) { @@ -174,7 +174,7 @@ for $f (qw(Maintainer Description Architecture)) { } $oppackage= $f{'Package'}; -$verdiff= $f{'Version'} ne $sourceversion; +$verdiff= $f{'Source-Version'} ne $sourceversion; if ($oppackage ne $sourcepackage || $verdiff) { $f{'Source'}= $sourcepackage; $f{'Source'}.= " ($sourceversion)" if $verdiff; @@ -212,7 +212,7 @@ if (open(X,"< $fileslistfile")) { } elsif ($! != ENOENT) { &syserr("read old files list file"); } -$sversion=$f{'Version'}; +$sversion=$f{'Source-Version'}; $sversion =~ s/^\d+://; print(Y &substvars(sprintf("%s_%s_%s.deb %s %s\n", $oppackage,$sversion,$f{'Architecture'}, diff --git a/scripts/dpkg-source.1 b/scripts/dpkg-source.1 index a616a860..2058115b 100644 --- a/scripts/dpkg-source.1 +++ b/scripts/dpkg-source.1 @@ -1,6 +1,6 @@ .\" Hey, Emacs! This is an -*- nroff -*- source file. .\" Authors: Ian Jackson -.TH DPKG\-SOURCE 1 "7th August" "Debian Project" "Debian GNU/Linux manual" +.TH DPKG\-SOURCE 1 "Januari 2000" "Debian Project" "Debian GNU/Linux manual" .SH NAME dpkg\-source, dpkg\-gencontrol, dpkg\-shlibdeps, dpkg\-genchanges, dpkg\-buildpackage, dpkg\-distaddfile, dpkg\-parsechangelog @@ -119,6 +119,14 @@ file. This is understood by .BI -m maintaineraddress Use .I maintaineraddress +as the name and email address of the maintainer for this package, +rather than using the information from the source tree's control. +This is understood by +.BR dpkg-buildpackage " and " dpkg-genchanges . +.TP +.BI -e maintaineraddress +Use +.I maintaineraddress as the name and email address of the maintainer for this upload, rather than using the information from the source tree's changelog. This is understood by @@ -488,7 +496,7 @@ output, rather than being added to the substitution variables file .RB ( debian/substvars by default). .SH DPKG-GENCHANGES OPTIONS -.B dpkg-gencontrol +.B dpkg-genchanges does not take any non-option arguments. .TP .BI -u uploadfilesdir @@ -753,9 +761,12 @@ and initial arguments for .BR gpg (1), .BR pgp (1). .SH AUTHOR -The utilities and this manpage were written by Ian Jackson. They are -Copyright (C)1995-1996 by him and released under the GNU General -Public Licence; there is NO WARRANTY. See +The utilities and this manpage were written by Ian Jackson. +.SH COPYRIGHT +Copyright (C) 1995-1996 Ian Jackson +Copyright (C) 2000 Wichert Akkerman +This is free software; see the GNU General Public Licence version 2 or later +for copying conditions. There is NO WARRANTY. See .B /usr/share/doc/dpkg/copyright and .B /usr/share/common-licenses/GPL