Kaynağa Gözat

Update to dpkg 1.4.1.5

Wichert Akkerman 27 yıl önce
ebeveyn
işleme
d02222589d

+ 34 - 0
ChangeLog

@@ -1,3 +1,37 @@
+dpkg (1.4.1.5) unstable; urgency=low
+
+  * Non-maintainer release.
+  * (dpkg-dev): Use emacsen-common for debian-changelog-mode.el
+    (closes:Bug#20776,#31030).
+  * Removed references to the packaging and policy manuals from debian/control.
+  * Put debian-changelog-mode.el in dpkg-dev and remove from dpkg (closes:Bug#29271).
+  * Fix paths in 50dpkg-dev.el using Roderick Schertler's patch
+    (closes:Bug#28270,#29702,#26876,#29184,and others).
+  * Note that bug number 17367 was fixed in 1.4.0.26.
+  * Add Zack Weinberg's install-info patch for GNU install-info
+    compatibility (closes:Bug#28965).
+  * Add dpkg-architecture stuff from Marcus Brinkmann.
+  * Remove debian-keyring suggests from dpkg.
+  * Add -k<keyid> flag to dpkg-buildpackage.
+  * --textmode works in gpg, remove kluge from dpkg-buildpackage.
+  * Cleanup configure.in slightly (stop using tl_ macros, fix gettext stuff).
+  * Attempt to make Debian source useful for non-Debian systems
+    (i.e. distclean tree instead of maintainer-clean tree).
+  * Sync with wichert's 1.4.1.4.
+  * Add my ltconfig-1.3.2.diff (RPATH workaround).
+  * Add dpkg-scansources program and man page.
+  * Man pages in /usr/share/man.
+
+ -- Joel Klecker <espy@debian.org>  Tue, 13 Jul 1999 18:12:15 -0700
+
+dpkg (1.4.1.4) unstable; urgency=low
+
+  * Also change developer-keyring to debian-keyring for dpkg-dev package
+  * Include spanish translation from Nicolás Lichtmaier <nick@debian.org>
+  * Depend on perl5 instead of perl
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Mon,  5 Jul 1999 00:04:14 +0200
+
 dpkg (1.4.1.3) unstable; urgency=low
 dpkg (1.4.1.3) unstable; urgency=low
 
 
   * Modify tarobject() so it does not complain if we are creating a
   * Modify tarobject() so it does not complain if we are creating a

+ 6 - 8
configure.in

@@ -5,17 +5,17 @@ AC_PREREQ([2.12])
 AC_INIT(include/dpkg.h.in)
 AC_INIT(include/dpkg.h.in)
 AM_CONFIG_HEADER(config.h)
 AM_CONFIG_HEADER(config.h)
 
 
-tl_CHECK_TOOL_PREFIX
+AC_CHECK_TOOL_PREFIX
 
 
-tl_PROG_CC
-tl_CANONICAL_SYSTEM
-tl_CHECK_TOOL_PREFIX
+AC_PROG_CC
+AC_CANONICAL_SYSTEM
+AC_CHECK_TOOL_PREFIX
 
 
-tl_PROG_CXX
+dnl tl_PROG_CXX
 AC_PROG_CXX
 AC_PROG_CXX
 AM_CONDITIONAL(HAVE_CPLUSPLUS, [test "$CXX" != ""])
 AM_CONDITIONAL(HAVE_CPLUSPLUS, [test "$CXX" != ""])
 
 
-tl_CHECK_TOOL(LD, ld, ld)
+AC_CHECK_TOOL(LD, ld, ld)
 
 
 AM_INIT_AUTOMAKE(dpkg,[`sed -n '1s/dpkg (\([0-9.]\+\)).*/\1/p' ${srcdir}/debian/changelog`])
 AM_INIT_AUTOMAKE(dpkg,[`sed -n '1s/dpkg (\([0-9.]\+\)).*/\1/p' ${srcdir}/debian/changelog`])
 ACLOCAL="$ACLOCAL -I automake"
 ACLOCAL="$ACLOCAL -I automake"
@@ -92,8 +92,6 @@ dnl gettext
 
 
 ALL_LINGUAS="en fr es"
 ALL_LINGUAS="en fr es"
 AM_GNU_GETTEXT
 AM_GNU_GETTEXT
-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
-AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
 
 
 dnl Other stuff
 dnl Other stuff
 
 

+ 7 - 1
debian/50dpkg-dev.el

@@ -4,5 +4,11 @@
 ;; Copyright (C) 1997, Klee Dienes <klee@mit.edu>
 ;; Copyright (C) 1997, Klee Dienes <klee@mit.edu>
 ;; I hereby release this progam into the public domain.
 ;; I hereby release this progam into the public domain.
 
 
-(autoload 'debian-changelog-mode "/usr/share/emacs/site-lisp/debian-changelog-mode.el"
+(autoload 'debian-changelog-mode "debian-changelog-mode"
         "Major mode for editing Debian-style change logs." t)
         "Major mode for editing Debian-style change logs." t)
+
+; Automatically set mode for debian/changelog and debian/rules files.
+(setq auto-mode-alist (cons '("/debian/changelog\\'" . debian-changelog-mode)
+			    auto-mode-alist)
+      interpreter-mode-alist (cons '("make" . makefile-mode)
+				   interpreter-mode-alist))

+ 26 - 0
debian/changelog

@@ -1,3 +1,29 @@
+dpkg (1.4.1.5) unstable; urgency=low
+
+  * Non-maintainer release.
+  * (dpkg-dev): Use emacsen-common for debian-changelog-mode.el
+    (closes:Bug#20776,#31030).
+  * Removed references to the packaging and policy manuals from debian/control.
+  * Put debian-changelog-mode.el in dpkg-dev and remove from dpkg (closes:Bug#29271).
+  * Fix paths in 50dpkg-dev.el using Roderick Schertler's patch
+    (closes:Bug#28270,#29702,#26876,#29184,and others).
+  * Note that bug number 17367 was fixed in 1.4.0.26.
+  * Add Zack Weinberg's install-info patch for GNU install-info
+    compatibility (closes:Bug#28965).
+  * Add dpkg-architecture stuff from Marcus Brinkmann.
+  * Remove debian-keyring suggests from dpkg.
+  * Add -k<keyid> flag to dpkg-buildpackage.
+  * --textmode works in gpg, remove kluge from dpkg-buildpackage.
+  * Cleanup configure.in slightly (stop using tl_ macros, fix gettext stuff).
+  * Attempt to make Debian source useful for non-Debian systems
+    (i.e. distclean tree instead of maintainer-clean tree).
+  * Sync with wichert's 1.4.1.4.
+  * Add my ltconfig-1.3.2.diff (RPATH workaround).
+  * Add dpkg-scansources program and man page.
+  * Man pages in /usr/share/man.
+
+ -- Joel Klecker <espy@debian.org>  Tue, 13 Jul 1999 18:12:15 -0700
+
 dpkg (1.4.1.4) unstable; urgency=low
 dpkg (1.4.1.4) unstable; urgency=low
 
 
   * Also change developer-keyring to debian-keyring for dpkg-dev package
   * Also change developer-keyring to debian-keyring for dpkg-dev package

+ 3 - 6
debian/control

@@ -8,8 +8,7 @@ Package: dpkg
 Architecture: any
 Architecture: any
 Essential: yes
 Essential: yes
 Pre-Depends: ${shlibs:Pre-Depends}
 Pre-Depends: ${shlibs:Pre-Depends}
-Suggests: debian-keyring
-Description: Package maintenance system for Debian Linux
+Description: Package maintenance system for Debian
  This package contains the programs which handle the installation and
  This package contains the programs which handle the installation and
  removal of packages on your system.
  removal of packages on your system.
  .
  .
@@ -29,11 +28,9 @@ Recommends: cpio (>= 2.4.2-2), patch (>= 2.2-1), gcc, make
 Suggests: gnupg, debian-keyring
 Suggests: gnupg, debian-keyring
 Conflicts: dpkgname
 Conflicts: dpkgname
 Replaces: dpkgname, dpkg (<< 1.4.0)
 Replaces: dpkgname, dpkg (<< 1.4.0)
-Description: Package building tools for Debian Linux
+Description: Package building tools for Debian
  This package contains the tools (including dpkg-source) required to
  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.
+ unpack, build and upload Debian source packages.
  .
  .
  `cpio' and `patch' are also required to manipulate source packages.
  `cpio' and `patch' are also required to manipulate source packages.
  Some older cpios are insufficient - use at least 2.4.2-2.
  Some older cpios are insufficient - use at least 2.4.2-2.

+ 35 - 50
debian/rules

@@ -11,63 +11,40 @@ arch=$(shell dpkg --print-architecture)
 mcidir=debian/tmp-main/DEBIAN
 mcidir=debian/tmp-main/DEBIAN
 
 
 
 
-Makefile.in: Makefile.am
+maintainer-configure: Makefile.am configure.in
 	$(checkdir)
 	$(checkdir)
-	$(RM) config.status
 	mkdir -p automake
 	mkdir -p automake
 	aclocal -I ./automake
 	aclocal -I ./automake
 	autoheader
 	autoheader
+	gettextize --copy --force
+	libtoolize --copy --force
+	patch -p0 < debian/ltconfig-1.3.2.diff
+	automake --copy --add-missing --foreign
 	autoconf
 	autoconf
-	gettextize --force
-	libtoolize --automake --copy --force
-	$(RM) config.sub config.guess 
-	ln -s /usr/share/automake/config.sub .
-	automake --add-missing
 
 
-$(BUILD)/Makefile: Makefile.in
+$(BUILD)/config.status:
 	$(checkdir)
 	$(checkdir)
 	$(RM) -r debian/build
 	$(RM) -r debian/build
 	install -d debian/build
 	install -d debian/build
 	cd $(BUILD) && ../../configure \
 	cd $(BUILD) && ../../configure \
-		--enable-shared --with-included-gettext \
+		--enable-shared \
 		--prefix=/usr \
 		--prefix=/usr \
 		--datadir=/usr/share \
 		--datadir=/usr/share \
+		--mandir=/usr/share/man \
 		--sysconfdir=/etc \
 		--sysconfdir=/etc \
 		--sharedstatedir=/var/lib \
 		--sharedstatedir=/var/lib \
 		--localstatedir=/var/lib
 		--localstatedir=/var/lib
-# libtool -rpath workaround based on a suggestion by Yann Dirson
-# <dirson@debian.org>
-#
-# It is supposed to be inserted in configure.in, but I didn't want
-# to re-run autoconf (since that bloats the Debian diff unnecessarily),
-# so I just patch libtool after running configure.  -- Richard Braakman
-# <dark@xs4all.nl>
-#
-# The version of libtool included with LessTif unfortunately insists on
-# linking with -rpath, i.e. hardwiring locations. This is not desirable.
-#
-# The dummy define is improbable enough not to conflict with anything; it is
-# just here to fool libtool by making it believe it gave some useful info to
-# gcc.
-	sed < $(BUILD)/libtool > $(BUILD)/libtool.foo \
-		's/^hardcode_libdir_flag_spec.*$$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
-	mv $(BUILD)/libtool.foo $(BUILD)/libtool
-# More hackery: this will also patch the generated libtool to explicitly
-# link libraries against the libraries they depend on.  (particularly libc)
-	sed < $(BUILD)/libtool > $(BUILD)/libtool.foo '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
-	mv $(BUILD)/libtool.foo $(BUILD)/libtool
-	chmod 755 $(BUILD)/libtool
 
 
-clean: $(BUILD)/Makefile
+clean:
 	$(checkdir)
 	$(checkdir)
-	$(MAKE) -C $(BUILD) -i maintainer-clean
+	-$(MAKE) -C $(BUILD) -i distclean
 	$(RM) -r debian/{build,files,substvars,tmp*}
 	$(RM) -r debian/{build,files,substvars,tmp*}
 	$(RM) $(BUILD)/dpkg-*.tar.gz
 	$(RM) $(BUILD)/dpkg-*.tar.gz
 	$(RM) po/*.gmo
 	$(RM) po/*.gmo
 	$(RM) config.log
 	$(RM) config.log
 	find . \( -name '*~' -o -name '#*#' \) -print0 | xargs -r0 $(RM) --
 	find . \( -name '*~' -o -name '#*#' \) -print0 | xargs -r0 $(RM) --
 
 
-build: $(BUILD)/Makefile
+build: $(BUILD)/config.status
 	$(checkdir)
 	$(checkdir)
 	$(MAKE) -C $(BUILD)
 	$(MAKE) -C $(BUILD)
 
 
@@ -77,7 +54,8 @@ binary-trees: build
 	$(checkdir)
 	$(checkdir)
 	-$(RM) -r debian/tmp-{main,dev}
 	-$(RM) -r debian/tmp-{main,dev}
 	install -d debian/tmp-{main,dev}/{DEBIAN,etc/dpkg,usr/doc/dpkg}
 	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}
+	install -d debian/tmp-dev/usr/{lib/dpkg,doc/dpkg-dev,share/man/man1,share/man/man8,sbin,bin}
+	install -d debian/tmp-dev/usr/share/emacs/site-lisp/dpkg-dev
 	install -d debian/tmp-main/sbin
 	install -d debian/tmp-main/sbin
 	set -e; if [ $(arch) = i386 ]; then \
 	set -e; if [ $(arch) = i386 ]; then \
 		sed -e 's/^# i386elf: //' <debian/preinst >$(mcidir)/preinst ; \
 		sed -e 's/^# i386elf: //' <debian/preinst >$(mcidir)/preinst ; \
@@ -90,28 +68,35 @@ binary-trees: build
 			debian/tmp-dev/etc/dpkg/shlibs.default ; \
 			debian/tmp-dev/etc/dpkg/shlibs.default ; \
 	fi
 	fi
 	cp debian/{prerm,postinst} $(mcidir)/.
 	cp debian/{prerm,postinst} $(mcidir)/.
-	install -d debian/tmp-dev/etc/emacs/site-start.d
-	install -p -m 644 debian/50dpkg-dev.el \
-		debian/tmp-dev/etc/emacs/site-start.d/
-	install -d debian/tmp-dev/etc/xemacs/site-start-19.d
-	install -p -m 644 debian/50dpkg-dev.el \
-		debian/tmp-dev/etc/xemacs/site-start-19.d/
-	chmod +x $(mcidir)/{postinst,prerm,preinst}
 	$(MAKE) -C $(BUILD) top_distdir=. dist 
 	$(MAKE) -C $(BUILD) top_distdir=. dist 
 	$(MAKE) -C $(BUILD) \
 	$(MAKE) -C $(BUILD) \
 		prefix=$(DIR)/debian/tmp-main/usr \
 		prefix=$(DIR)/debian/tmp-main/usr \
 		sysconfdir=$(DIR)/debian/tmp-main/etc \
 		sysconfdir=$(DIR)/debian/tmp-main/etc \
 		datadir=$(DIR)/debian/tmp-main/usr/share \
 		datadir=$(DIR)/debian/tmp-main/usr/share \
+		mandir=$(DIR)/debian/tmp-main/usr/share/man \
 		sharedstatedir=$(DIR)/debian/tmp-main/var/lib \
 		sharedstatedir=$(DIR)/debian/tmp-main/var/lib \
 		localstatedir=$(DIR)/debian/tmp-main/var/lib \
 		localstatedir=$(DIR)/debian/tmp-main/var/lib \
 		install
 		install
-	find debian/tmp-main/usr/man -type f | xargs gzip -9vf
+	install -m 755 debian/dev-postinst debian/tmp-dev/DEBIAN/postinst
+	install -m 755 debian/dev-prerm debian/tmp-dev/DEBIAN/prerm
+	install -d debian/tmp-dev/etc/emacs/site-start.d
+	install -c debian/50dpkg-dev.el debian/tmp-dev/etc/emacs/site-start.d/.
+	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
+	install -m 755 debian/emacsen-common-install \
+	debian/tmp-dev/usr/lib/emacsen-common/packages/install/dpkg-dev
+	cp scripts/debian-changelog-mode.el \
+	debian/tmp-dev/usr/share/emacs/site-lisp/dpkg-dev
+	rm -f debian/tmp-main/usr/share/{x,}emacs/site-lisp/debian-changelog-mode.el*
+	chmod +x $(mcidir)/{postinst,prerm,preinst}
+	find debian/tmp-main/usr/share/man -type f | xargs gzip -9vf
 	set -e; for f in dpkg-buildpackage dpkg-gencontrol dpkg-distaddfile \
 	set -e; for f in dpkg-buildpackage dpkg-gencontrol dpkg-distaddfile \
 		  dpkg-parsechangelog dpkg-genchanges dpkg-shlibdeps; do \
 		  dpkg-parsechangelog dpkg-genchanges dpkg-shlibdeps; do \
-		rm debian/tmp-main/usr/man/man1/$$f.1; \
-		ln -s dpkg-source.1.gz debian/tmp-main/usr/man/man1/$$f.1.gz ; \
+		rm debian/tmp-main/usr/share/man/man1/$$f.1; \
+		ln -s dpkg-source.1.gz debian/tmp-main/usr/share/man/man1/$$f.1.gz ; \
 	done
 	done
-	ln -s ../man7/undocumented.7.gz debian/tmp-main/usr/man/man1/dpkg-divert.1.gz
+	ln -s ../man7/undocumented.7.gz debian/tmp-main/usr/share/man/man1/dpkg-divert.1.gz
 	gzip -9vf debian/tmp-main/usr/doc/dpkg/changelog*
 	gzip -9vf debian/tmp-main/usr/doc/dpkg/changelog*
 	cp debian/copyright debian/tmp-main/usr/doc/dpkg/copyright
 	cp debian/copyright debian/tmp-main/usr/doc/dpkg/copyright
 	cp debian/copyright debian/tmp-dev/usr/doc/dpkg-dev/copyright
 	cp debian/copyright debian/tmp-dev/usr/doc/dpkg-dev/copyright
@@ -119,10 +104,10 @@ binary-trees: build
 	set -e; for f in \
 	set -e; for f in \
  usr/doc/dpkg/{internals.html,changelog.manuals.gz} \
  usr/doc/dpkg/{internals.html,changelog.manuals.gz} \
  usr/bin/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage,parsechangelog} \
  usr/bin/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage,parsechangelog} \
- usr/bin/{dpkg-distaddfile,822-date,dpkg-scanpackages,dpkg-name} \
- usr/man/man1/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage}.1.gz \
- usr/man/man1/{dpkg-parsechangelog,dpkg-distaddfile,822-date,dpkg-name}.1.gz \
- usr/man/man5 usr/man/man8/dpkg-scanpackages.8.gz \
+ usr/bin/{dpkg-distaddfile,822-date,dpkg-scanpackages,dpkg-name,dpkg-architecture} \
+ usr/share/man/man1/dpkg-{source,genchanges,gencontrol,shlibdeps,buildpackage,architecture}.1.gz \
+ usr/share/man/man1/{dpkg-parsechangelog,dpkg-distaddfile,822-date,dpkg-name}.1.gz \
+ usr/share/man/man5 usr/share/man/man8/dpkg-scanpackages.8.gz \
  usr/lib/dpkg/parsechangelog usr/lib/dpkg/controllib.pl \
  usr/lib/dpkg/parsechangelog usr/lib/dpkg/controllib.pl \
 		; do mv debian/tmp-main/$$f debian/tmp-dev/$$f; done
 		; do mv debian/tmp-main/$$f debian/tmp-dev/$$f; done
 
 

+ 2 - 2
doc/manuals-version

@@ -1,2 +1,2 @@
-<!entity manuals-version "1.4.1.3">
-<!entity dpkg-version "1.4.1.3">
+<!entity manuals-version "1.4.1.5">
+<!entity dpkg-version "1.4.1.5">

+ 1 - 1
po/en.po

@@ -6,7 +6,7 @@
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-06-01 00:29+0200\n"
+"POT-Creation-Date: 1999-07-06 16:05-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"

+ 1 - 1
po/fr.po

@@ -17,7 +17,7 @@
 msgid ""
 msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: Debian dpkg 1.4.0.14\n"
 "Project-Id-Version: Debian dpkg 1.4.0.14\n"
-"POT-Creation-Date: 1999-06-01 00:29+0200\n"
+"POT-Creation-Date: 1999-07-06 16:05-0700\n"
 "PO-Revision-Date: 1997-05-13 22:07 EDT\n"
 "PO-Revision-Date: 1997-05-13 22:07 EDT\n"
 "Last-Translator: Christophe Le Bars <clebars@debian.org>\n"
 "Last-Translator: Christophe Le Bars <clebars@debian.org>\n"
 "Language-Team: French\n"
 "Language-Team: French\n"

+ 5 - 3
scripts/Makefile.am

@@ -19,7 +19,8 @@ altssysconfdir		= $(sysconfdir)/alternatives
 
 
 bin_SCRIPTS		= dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol \
 bin_SCRIPTS		= dpkg-name dpkg-source dpkg-genchanges dpkg-gencontrol \
 			  dpkg-shlibdeps dpkg-buildpackage dpkg-parsechangelog \
 			  dpkg-shlibdeps dpkg-buildpackage dpkg-parsechangelog \
-			  dpkg-distaddfile 822-date dpkg-scanpackages
+			  dpkg-distaddfile 822-date dpkg-scanpackages \
+			  dpkg-scansources dpkg-architecture
 
 
 sbin_PROGRAMS		= start-stop-daemon
 sbin_PROGRAMS		= start-stop-daemon
 start_stop_daemon_SOURCES	= start-stop-daemon.c
 start_stop_daemon_SOURCES	= start-stop-daemon.c
@@ -34,7 +35,8 @@ ELCFILES		= debian-changelog-mode.elc
 
 
 man_MANS		= dpkg-name.1 dpkg-source.1 822-date.1 update-rc.d.8 \
 man_MANS		= dpkg-name.1 dpkg-source.1 822-date.1 update-rc.d.8 \
 			  start-stop-daemon.8 update-alternatives.8 \
 			  start-stop-daemon.8 update-alternatives.8 \
-			  install-info.8 dpkg-scanpackages.8
+			  install-info.8 dpkg-scanpackages.8 \
+			  dpkg-scansources.1 dpkg-architecture.1
 
 
 EXTRA_DIST		= update-rc.d.pl \
 EXTRA_DIST		= update-rc.d.pl \
 			  dpkg-name.sh dpkg-source.pl dpkg-genchanges.pl \
 			  dpkg-name.sh dpkg-source.pl dpkg-genchanges.pl \
@@ -43,7 +45,7 @@ EXTRA_DIST		= update-rc.d.pl \
 			  dpkg-distaddfile.pl 822-date.pl dpkg-scanpackages.pl \
 			  dpkg-distaddfile.pl 822-date.pl dpkg-scanpackages.pl \
 			  update-alternatives.pl install-info.pl dpkg-divert.pl \
 			  update-alternatives.pl install-info.pl dpkg-divert.pl \
 			  cleanup-info.pl controllib.pl debian-changelog-mode.el \
 			  cleanup-info.pl controllib.pl debian-changelog-mode.el \
-			  cl-debian.pl \
+			  cl-debian.pl dpkg-architecture.pl dpkg-scansources.pl \
 			  $(man_MANS)
 			  $(man_MANS)
 
 
 noinst_DATA		= cl-debian
 noinst_DATA		= cl-debian

+ 7 - 3
scripts/controllib.pl

@@ -62,9 +62,13 @@ sub capit {
 }
 }
 
 
 sub findarch {
 sub findarch {
-    $arch=`dpkg --print-architecture`;
-    $? && &subprocerr("dpkg --print-architecture");
-    $arch =~ s/\n$//;
+   if (exists $ENV{DEB_HOST_ARCH}) {
+      $arch=$ENV{DEB_HOST_ARCH};
+   } else {
+      $arch=`dpkg --print-architecture`;
+      $? && &subprocerr("dpkg --print-architecture");
+       chomp $arch;
+   }
     $substvar{'Arch'}= $arch;
     $substvar{'Arch'}= $arch;
 }
 }
 
 

+ 14 - 11
scripts/dpkg-buildpackage.sh

@@ -14,11 +14,12 @@ version 2 or later for copying conditions.  There is NO warranty.
 Usage: dpkg-buildpackage [options]
 Usage: dpkg-buildpackage [options]
 Options: -r<gain-root-command>
 Options: -r<gain-root-command>
          -p<sign-command>
          -p<sign-command>
+	 -k<keyid>     the key to use for signing
          -sgpg         the sign-command is called like GPG
          -sgpg         the sign-command is called like GPG
          -spgp         the sign-command is called like PGP 
          -spgp         the sign-command is called like PGP 
          -us           unsigned source
          -us           unsigned source
          -uc           unsigned changes
          -uc           unsigned changes
-         -a<arch>      architecture field of the changes _file_name_
+         -a<arch>      Debian architecture we build for
          -b            binary-only, do not build source } also passed to
          -b            binary-only, do not build source } also passed to
          -B            binary-only, no arch-indep files } dpkg-genchanges
          -B            binary-only, no arch-indep files } dpkg-genchanges
          -v<version>   changes since version <version>      }
          -v<version>   changes since version <version>      }
@@ -64,6 +65,7 @@ do
 	-h)	usageversion; exit 0 ;;
 	-h)	usageversion; exit 0 ;;
 	-r*)	rootcommand="$value" ;;
 	-r*)	rootcommand="$value" ;;
 	-p*)	signcommand="$value"; warnpgp='' ;;
 	-p*)	signcommand="$value"; warnpgp='' ;;
+	-k*)	signkey="$value" ;;
 	-sgpg)  signinterface=gpg ;;
 	-sgpg)  signinterface=gpg ;;
 	-spgp)  signinterface=pgp ;;
 	-spgp)  signinterface=pgp ;;
 	-us)	signsource=: ; warnpgp='' ;;
 	-us)	signsource=: ; warnpgp='' ;;
@@ -73,6 +75,7 @@ do
 	-sa)	sourcestyle=-sa ;;
 	-sa)	sourcestyle=-sa ;;
 	-sd)	sourcestyle=-sd ;;
 	-sd)	sourcestyle=-sd ;;
 	-tc)	cleansource=true ;;
 	-tc)	cleansource=true ;;
+	-t*)    targetgnusystem="$value" ;;          # Order DOES matter!
 	-nc)	noclean=true; binaryonly=-b ;;
 	-nc)	noclean=true; binaryonly=-b ;;
 	-b)	binaryonly=-b ;;
 	-b)	binaryonly=-b ;;
 	-B)	binaryonly=-B; binarytarget=binary-arch ;;
 	-B)	binaryonly=-B; binarytarget=binary-arch ;;
@@ -109,7 +112,10 @@ mustsetvar package "`dpkg-parsechangelog | sed -n 's/^Source: //p'`" "source pac
 mustsetvar version "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version"
 mustsetvar version "`dpkg-parsechangelog | sed -n 's/^Version: //p'`" "source version"
 if [ -n "$maint" ]; then maintainer="$maint"; 
 if [ -n "$maint" ]; then maintainer="$maint"; 
 else mustsetvar maintainer "`dpkg-parsechangelog | sed -n 's/^Maintainer: //p'`" "source maintainer"; fi
 else mustsetvar maintainer "`dpkg-parsechangelog | sed -n 's/^Maintainer: //p'`" "source maintainer"; fi
+command -v dpkg-architecture > /dev/null 2>&1 && eval `dpkg-architecture -a${arch} -t${targetgnusystem} -s`
+archlist=`dpkg-architecture -a${arch} -t${targetgnusystem} -f 2> /dev/null`
 test "${opt_a}" \
 test "${opt_a}" \
+	|| arch=`dpkg-architecture -a${arch} -t${targetgnusystem} -qDEB_HOST_ARCH 2> /dev/null` && test "${arch}" \
 	|| mustsetvar arch "`dpkg --print-architecture`" "build architecture"
 	|| mustsetvar arch "`dpkg --print-architecture`" "build architecture"
 
 
 sversion=`echo "$version" | perl -pe 's/^\d+://'`
 sversion=`echo "$version" | perl -pe 's/^\d+://'`
@@ -118,14 +124,11 @@ pva="${package}_${sversion}${arch:+_${arch}}"
 
 
 signfile () {
 signfile () {
 	if test $signinterface = gpg ; then
 	if test $signinterface = gpg ; then
-		# --textmode doesn't seem to work; we use perl to filter ^M;
-		# this doesn't affect the actual signature.
 		(cat "../$1" ; echo "") | \
 		(cat "../$1" ; echo "") | \
-		$signcommand --local-user "$maintainer" --clearsign --armor \
-			--textmode --output - - | \
-			perl -n -p -e 's/\r$//' > "../$1.asc" 
+		$signcommand --local-user "${signkey:-$maintainer}" --clearsign --armor \
+			--textmode  > "../$1.asc" 
 	else
 	else
-		$signcommand -u "$maintainer" +clearsig=on -fast <"../$1" \
+		$signcommand -u "${signkey:-$maintainer}" +clearsig=on -fast <"../$1" \
 			>"../$1.asc"
 			>"../$1.asc"
 	fi
 	fi
 	echo
 	echo
@@ -143,13 +146,13 @@ if [ -n "$since"	]; then set -- "$@" "-v$since"		; fi
 if [ -n "$desc"		]; then set -- "$@" "-C$desc"		; fi
 if [ -n "$desc"		]; then set -- "$@" "-C$desc"		; fi
 
 
 if [ x$noclean != xtrue ]; then
 if [ x$noclean != xtrue ]; then
-	withecho $rootcommand debian/rules clean
+	withecho $rootcommand debian/rules clean $archlist
 fi
 fi
 if [ x$binaryonly = x ]; then
 if [ x$binaryonly = x ]; then
 	cd ..; withecho dpkg-source -b "$dirn"; cd "$dirn"
 	cd ..; withecho dpkg-source -b "$dirn"; cd "$dirn"
 fi
 fi
-withecho debian/rules build
-withecho $rootcommand debian/rules $binarytarget
+withecho debian/rules build $archlist
+withecho $rootcommand debian/rules $binarytarget $archlist
 if [ x$binaryonly = x ]; then
 if [ x$binaryonly = x ]; then
         $signsource "$pv.dsc"
         $signsource "$pv.dsc"
 fi
 fi
@@ -177,7 +180,7 @@ fi
 $signchanges "$pva.changes"
 $signchanges "$pva.changes"
 
 
 if $cleansource; then
 if $cleansource; then
-	withecho $rootcommand debian/rules clean
+	withecho $rootcommand debian/rules clean $archlist
 fi
 fi
 
 
 echo "dpkg-buildpackage: $srcmsg"
 echo "dpkg-buildpackage: $srcmsg"

+ 5 - 1
scripts/dpkg-gencontrol.pl

@@ -88,10 +88,14 @@ while (@ARGV) {
 }
 }
 
 
 $arch = $override{Architecture} or do {
 $arch = $override{Architecture} or do {
+    if (exists $ENV{DEB_HOST_ARCH}) {
+      $arch=$ENV{DEB_HOST_ARCH};
+    } else {
        $arch=`dpkg --print-architecture`;
        $arch=`dpkg --print-architecture`;
        $? && &subprocerr("dpkg --print-architecture");
        $? && &subprocerr("dpkg --print-architecture");
+    }
 };
 };
-$arch =~ s/\n$//;
+chomp $arch;
 
 
 &parsechangelog;
 &parsechangelog;
 &parsecontrolfile;
 &parsecontrolfile;

+ 5 - 0
scripts/dpkg-source.1

@@ -552,6 +552,11 @@ after the package has been built.
 .TP
 .TP
 .BR -us ", " -uc
 .BR -us ", " -uc
 Do not sign the source package or the changelog, respectively.
 Do not sign the source package or the changelog, respectively.
+.TP
+.BI -a architecture
+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.
 .SH DPKG-DISTADDFILE ARGUMENTS
 .SH DPKG-DISTADDFILE ARGUMENTS
 .B dpkg-distaddfile
 .B dpkg-distaddfile
 does not take any non-common options.  It takes three non-option
 does not take any non-common options.  It takes three non-option

+ 8 - 2
scripts/install-info.pl

@@ -114,7 +114,13 @@ if (!$remove) {
         
         
         open(IF,"$filename") || die "$name: read $filename: $!\n";
         open(IF,"$filename") || die "$name: read $filename: $!\n";
         $asread='';
         $asread='';
-        while(<IF>) { last if m/^START-INFO-DIR-ENTRY$/; }
+        while(<IF>) {
+	    m/^START-INFO-DIR-ENTRY$/ && last;
+	    m/^INFO-DIR-SECTION (.+)$/ && do {
+		$sectiontitle = $1		unless defined($sectiontitle);
+		$sectionre = '^'.quotemeta($1)	unless defined($sectionre);
+	    }
+	}
         while(<IF>) { last if m/^END-INFO-DIR-ENTRY$/; $asread.= $_; }
         while(<IF>) { last if m/^END-INFO-DIR-ENTRY$/; $asread.= $_; }
         close(IF); &checkpipe;
         close(IF); &checkpipe;
         if ($asread =~ m/(\* *[^:]+: *\([^\)]+\).*\. *.*\n){2,}/) {
         if ($asread =~ m/(\* *[^:]+: *\([^\)]+\).*\. *.*\n){2,}/) {
@@ -348,7 +354,7 @@ sub ulquit {
 }
 }
 
 
 sub checkpipe {
 sub checkpipe {
-    return if !$pipeit || !$? || $?==0x8D00;
+    return if !$pipeit || !$? || $?==0x8D00 || $?==0x0D;
     die "$name: read $filename: $?\n";
     die "$name: read $filename: $?\n";
 }
 }
 
 

+ 8 - 8
scripts/update-alternatives.pl

@@ -111,14 +111,14 @@ if (open(AF,"$admindir/$name")) {
     while (($version= &gl("version")) ne '') {
     while (($version= &gl("version")) ne '') {
         defined($versionnum{$version}) && &badfmt("duplicate path $tver");
         defined($versionnum{$version}) && &badfmt("duplicate path $tver");
        if ( -r $version ) {
        if ( -r $version ) {
-        push(@versions,$version);
-        $versionnum{$version}= $i= $#versions;
-        $priority= &gl("priority");
-        $priority =~ m/^[-+]?\d+$/ || &badfmt("priority $version $priority");
-        $priorities[$i]= $priority;
-        for ($j=0; $j<=$#slavenames; $j++) {
-            $slavepath{$i,$j}= &gl("spath");
-        }
+           push(@versions,$version);
+           $versionnum{$version}= $i= $#versions;
+           $priority= &gl("priority");
+           $priority =~ m/^[-+]?\d+$/ || &badfmt("priority $version $priority");
+           $priorities[$i]= $priority;
+           for ($j=0; $j<=$#slavenames; $j++) {
+               $slavepath{$i,$j}= &gl("spath");
+           }
        } else {
        } else {
            # File not found - remove
            # File not found - remove
             &pr("Alternative for $name points to $version - which wasn't found.  Removing from list of alternatives.");
             &pr("Alternative for $name points to $version - which wasn't found.  Removing from list of alternatives.");