Browse Source

Merge branch 'sid' (through tag '1.15.7.1')

Conflicts:
	debian/changelog
Guillem Jover 16 years ago
parent
commit
07adb5686f

+ 1 - 0
configure.ac

@@ -118,6 +118,7 @@ DPKG_DECL_SYS_SIGLIST
 # Checks for library functions.
 DPKG_FUNC_VA_COPY
 DPKG_FUNC_C99_SNPRINTF
+DPKG_FUNC_ASYNC_SYNC
 DPKG_CHECK_DECL([offsetof], [stddef.h])
 DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
 DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \

+ 45 - 0
debian/changelog

@@ -24,6 +24,51 @@ dpkg (1.15.8) UNRELEASED; urgency=low
 
  -- Guillem Jover <guillem@debian.org>  Wed, 21 Apr 2010 04:40:12 +0200
 
+dpkg (1.15.7.2) unstable; urgency=low
+
+  [ Raphaël Hertzog ]
+  * Update dpkg-buildflags to respect $XDG_CONFIG_HOME and to use
+    $XDG_CONFIG_HOME/dpkg/buildflags.conf by default.
+  * Update deb-substvars(5) to codify how variables containing multiple
+    lines must be managed.
+  * Fix boolean evaluation of Dpkg::Version so that version 0 evaluates to
+    false and dpkg-shlibdeps can strip the minimal version specification.
+    Closes: #579724
+    Document this behaviour in the API and add non-regression test to ensure
+    it's kept.
+  * Let dpkg-buildflags error out when a required parameter is missing.
+    Closes: #579722
+  * Add Bug-Ubuntu field in DEP-3 template provided in the automatic header
+    of patches in 3.0 (quilt) source packages. Thanks to Benjamin Drung
+    <bdrung@ubuntu.com> for the patch. Closes: #578002
+  * Update deb-override(5) by removing references to usage of sections
+    to place the packages on the mirrors and by indicating that the Debian
+    policy offers a list of allowed values for section and priority.
+    Closes: #575410
+  * Update reference to triggers.txt.gz in dpkg-trigger(1) and deb-triggers(5)
+    to match the new location. Closes: #580774
+  * Drop mention of PKG_CONFIG_LIBDIR in dpkg-buildpackage(1), the feature has
+    been removed in 1.15.6.
+  * Rename /usr/lib/dpkg/maintscript-helper into
+    /usr/bin/dpkg-maintscript-helper, it is a public interface even if working
+    around known limitations.
+  * Add "supports" command to dpkg-maintscript-helper to ensure the wanted
+    command is supported before calling it.
+
+  [ Guillem Jover ]
+  * Add powerpcspe support to ostable and triplettable.
+    Thanks to Sebastian Andrzej Siewior <sebastian@breakpoint.cc> and
+    Kyle Moffett <Kyle.D.Moffett@boeing.com>. Closes: #568123, #575158
+  * Fix dpkg --root by properly stripping again the root directory from the
+    path of the maintainer script to execute. Closes: #580984
+  * On Linux use sync() instead of an fsync() per file on deferred extraction,
+    to workaround performance degradation on ext4. Closes: #578635
+
+  [ Gerfried Fuchs ]
+  * Fix syntax error in dpkg-name. Closes: #581315
+
+ -- Guillem Jover <guillem@debian.org>  Wed, 19 May 2010 07:57:14 +0200
+
 dpkg (1.15.7.1) unstable; urgency=low
 
   * Fix dpkg-source -b (without -i) for source packages 1.0. Closes: #578693

+ 2 - 2
debian/dpkg.install

@@ -6,25 +6,25 @@ etc/alternatives
 usr/bin/dpkg
 usr/bin/dpkg-deb
 usr/bin/dpkg-divert
+usr/bin/dpkg-maintscript-helper
 usr/bin/dpkg-query
 usr/bin/dpkg-split
 usr/bin/dpkg-statoverride
 usr/bin/dpkg-trigger
 usr/bin/update-alternatives
-usr/lib/dpkg/maintscript-helper
 usr/lib/dpkg/mksplit
 usr/sbin
 usr/share/dpkg
 usr/share/locale/*/LC_MESSAGES/dpkg.mo
 usr/share/man/{*/*,*}/dpkg-deb.1
 usr/share/man/{*/*,*}/dpkg-divert.8
+usr/share/man/{*/*,*}/dpkg-maintscript-helper.1
 usr/share/man/{*/*,*}/dpkg-query.1
 usr/share/man/{*/*,*}/dpkg-split.1
 usr/share/man/{*/*,*}/dpkg-statoverride.8
 usr/share/man/{*/*,*}/dpkg-trigger.1
 usr/share/man/{*/*,*}/dpkg.cfg.5
 usr/share/man/{*/*,*}/dpkg.1
-usr/share/man/{*/*,*}/maintscript-helper.1
 usr/share/man/{*/*,*}/start-stop-daemon.8
 usr/share/man/{*/*,*}/update-alternatives.8
 usr/share/perl5/Dpkg.pm

+ 4 - 0
dselect/po/.gitignore

@@ -1,4 +1,8 @@
 *.gmo
+*.sin
 *.sed
+*.header
+Makevars.template
 POTFILES
+Rules-quot
 stamp-po

+ 16 - 0
m4/dpkg-funcs.m4

@@ -68,6 +68,22 @@ AS_IF([test "x$dpkg_cv_c99_snprintf" = "xyes"],
 AM_CONDITIONAL(HAVE_C99_SNPRINTF, [test "x$dpkg_cv_c99_snprintf" = "xyes"])
 ])# DPKG_FUNC_C99_SNPRINTF
 
+# DPKG_FUNC_ASYNC_SYNC
+# --------------------
+# Define HAVE_ASYNC_SYNC if sync() is asynchronous
+AC_DEFUN([DPKG_FUNC_ASYNC_SYNC],
+[
+  AC_CANONICAL_HOST
+  AC_MSG_CHECKING([whether sync is asynchronous])
+  AS_CASE([$host_os],
+          [linux-*], [dpkg_cv_async_sync=no],
+          [dpkg_cv_async_sync=yes])
+  AS_IF([test "x$dpkg_cv_async_sync" = "xyes"],
+        [AC_DEFINE([HAVE_ASYNC_SYNC], 1,
+                   [Define to 1 if the 'sync' function is asynchronous])])
+  AC_MSG_RESULT([$dpkg_cv_async_sync])
+])# DPKG_FUNC_ASYNC_SYNC
+
 # DPKG_CHECK_COMPAT_FUNCS(LIST)
 # -----------------------
 # Check each function and define an automake conditional

+ 6 - 6
man/Makefile.am

@@ -48,8 +48,8 @@ install-data-local-yes:
 	for lang in $(LINGUAS); do \
 		files=""; \
 		for trans in $(dist_man_MANS); do \
-			if [ -f $(srcdir)/$$lang/$$trans ]; then \
-				files="$$files $(srcdir)/$$lang/$$trans"; \
+			if [ -f $(CURDIR)/$$lang/$$trans ]; then \
+				files="$$files $(CURDIR)/$$lang/$$trans"; \
 			fi; \
 		done; \
 		$(MAKE) install-man \
@@ -65,8 +65,8 @@ uninstall-local-yes:
 	for lang in $(LINGUAS); do \
 		files=""; \
 		for trans in $(dist_man_MANS); do \
-			if [ -f $(srcdir)/$$lang/$$trans ]; then \
-				files="$$files $(srcdir)/$$lang/$$trans"; \
+			if [ -f $(CURDIR)/$$lang/$$trans ]; then \
+				files="$$files $(CURDIR)/$$lang/$$trans"; \
 			fi; \
 		done; \
 		$(MAKE) uninstall-man \
@@ -106,6 +106,7 @@ dist_man_MANS = \
 	dpkg-genchanges.1 \
 	dpkg-gencontrol.1 \
 	dpkg-gensymbols.1 \
+	dpkg-maintscript-helper.1 \
 	dpkg-mergechangelogs.1 \
 	dpkg-name.1 \
 	dpkg-parsechangelog.1 \
@@ -119,8 +120,7 @@ dist_man_MANS = \
 	dpkg-trigger.1 \
 	dpkg-vendor.1 \
 	dpkg.1 \
-	dpkg.cfg.5 \
-	maintscript-helper.1
+	dpkg.cfg.5
 
 if WITH_DSELECT
 dist_man_MANS += \

+ 6 - 9
man/deb-override.5

@@ -21,9 +21,8 @@ override
 .
 .SH DESCRIPTION
 While most information about a package can be found in the control file,
-some must be filled in by the distribution czars rather than by the
-maintainer, because they relate to the arrangement of files for release
-rather than the actual dependencies and description of the package.
+some is managed centrally by the distribution czars rather than by the
+maintainer in order to offer some global consistency.
 This information is found in the override file.
 .PP
 The override file has a simple whitespace-delimited format. Comments are
@@ -44,11 +43,8 @@ not found in the tree of binary packages are ignored.
 .I priority
 and
 .I section
-place the package within the release tree; these ought not to be found
-in the control file. If the package is found in a subdirectory of
-.IR binarydir ,
-that will be checked against
-.IR section .
+correspond to the respective control fields available in the .deb. The
+allowed values are listed in the Debian policy.
 .PP
 .IR maintainerinfo ,
 if present, can be either the name of a maintainer for an unconditional
@@ -66,4 +62,5 @@ directory on any Debian mirror.
 .SH SEE ALSO
 .BR dpkg\-scanpackages (1),
 .BR dpkg\-scansources (1),
-.BR apt\-ftparchive (1).
+.BR apt\-ftparchive (1),
+.BR /usr/share/doc/debian-policy/policy.html/index.html .

+ 20 - 0
man/deb-substvars.5

@@ -36,6 +36,26 @@ fields are used and needed during the build when the substitution did not
 yet occur. That's why you can't use variables in the \fBPackage\fP,
 \fBSource\fP and \fBArchitecture\fP fields.
 
+Variable substitution happens on the content of the fields after they have
+been parsed, thus if you want a variable to expand over multiple lines you
+do not have to include a space after the newline. This is done implicitly
+when the field is output. For example, if the variable
+\fB${Description}\fP is set to "foo is bar.${Newline}foo is
+great." and if you have the following field:
+
+ Description: foo application
+  ${Description}
+  .
+  More text.
+
+It will result in:
+
+ Description: foo application
+  foo is bar.
+  foo is great.
+  .
+  More text.
+
 Variables can be set using the
 .B \-V
 common option. They can be also specified in the file

+ 1 - 1
man/deb-triggers.5

@@ -49,4 +49,4 @@ package.
 .SH SEE ALSO
 .BR dpkg\-trigger (1),
 .BR dpkg (1),
-.BR /usr/share/doc/dpkg/triggers.txt.gz .
+.BR /usr/share/doc/dpkg-dev/triggers.txt.gz .

+ 3 - 2
man/dpkg-buildflags.1

@@ -15,7 +15,8 @@ extended/overriden in several ways:
 .IP 1.
 system-wide with \fB/etc/dpkg/buildflags.conf\fP;
 .IP 2.
-for the current user with \fB~/.config/dpkg-buildflags.conf\fP;
+for the current user with \fB$XDG_CONFIG_HOME/dpkg/buildflags.conf\fP
+where \fB$XDG_CONFIG_HOME\fP defaults to \fB$HOME/.config\fP;
 .IP 3.
 temporarily with environment variables (see section \fBENVIRONMENT\fP).
 .P
@@ -96,7 +97,7 @@ have to be stripped from these options). Default value: empty.
 .B /etc/dpkg/buildflags.conf
 System wide configuration file.
 .TP
-.B ~/.config/dpkg-buildflags.conf
+.BR $XDG_CONFIG_HOME/dpkg/buildflags.conf " or " $HOME/.config/dpkg/buildflags.conf
 User configuration file.
 .SH ENVIRONMENT
 .TP

+ 0 - 6
man/dpkg-buildpackage.1

@@ -103,12 +103,6 @@ Passed unchanged to \fBdpkg-genchanges\fP. See its manual page.
 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.
-
-If the host architecture differs from the build architecture (as is the
-case for a cross-compilation), and if the environment variable
-\fBPKG_CONFIG_LIBDIR\fP is not set, then it is set to a value suitable for
-cross-compilation
-("/usr/\fIgnu-system-type\fP/lib/pkgconfig/:/usr/share/pkgconfig").
 .TP
 .BI \-t gnu-system-type
 Specify the GNU system type we build for. It can be used in place

+ 29 - 13
man/maintscript-helper.1

@@ -1,9 +1,9 @@
-.TH maintscript\-helper 1 "2010-04-16" "Debian Project" "dpkg suite"
+.TH dpkg\-maintscript\-helper 1 "2010-04-16" "Debian Project" "dpkg suite"
 .SH NAME
-maintscript\-helper \- works around known dpkg limitations in maintainer scripts
+dpkg\-maintscript\-helper \- works around known dpkg limitations in maintainer scripts
 .
 .SH SYNOPSIS
-.B $DPKG_LIBDIR/maintscript\-helper
+.B dpkg\-maintscript\-helper
 .IR command " [" parameters "...] \-\- " maint-script-parameters
 .
 .SH COMMANDS AND PARAMETERS
@@ -37,8 +37,9 @@ dpkg\-maintained conffile to a file maintained by the package's maintainer
 scripts, usually with a tool like debconf or ucf.
 .P
 This means that if a package is intended to rename or remove a conffile,
-it must explicitly do so and \fBmaintscript\-helper\fP can be used to implement
-graceful deletion and moving of conffiles within maintainer scripts.
+it must explicitly do so and \fBdpkg\-maintscript\-helper\fP can be used
+to implement graceful deletion and moving of conffiles within maintainer
+scripts.
 .
 .SS REMOVING A CONFFILE
 .P
@@ -50,10 +51,8 @@ conffile should not disappear.
 All of this is implemented by putting the following shell snippet in the
 \fBpreinst\fP, \fBpostinst\fP and \fBpostrm\fP maintainer scripts:
 .P
-    if [ \-x $DPKG_LIBDIR/maintscript\-helper ]; then
-        $DPKG_LIBDIR/maintscript\-helper rm_conffile \\
-            \fIconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@"
-    fi
+    dpkg\-maintscript\-helper rm_conffile \\
+        \fIconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@"
 .P
 \fIconffile\fP is the filename of the conffile to remove.
 \fIlastversion\fP is the last version of the package that contained the
@@ -82,10 +81,8 @@ Graceful renaming can be implemented by putting the following shell
 snippet in the \fBpreinst\fP, \fBpostinst\fP and \fBpostrm\fP maintainer
 scripts:
 .P
-    if [ \-x $DPKG_LIBDIR/maintscript\-helper ]; then
-        $DPKG_LIBDIR/maintscript\-helper mv_conffile \\
-            \fIoldconffile\fP \fInewconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@"
-    fi
+    dpkg\-maintscript\-helper mv_conffile \\
+        \fIoldconffile\fP \fInewconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@"
 .P
 \fIoldconffile\fP and \fInewconffile\fP are the old and new name of the
 conffile to rename. \fIlastversion\fP is the last version of the package
@@ -103,6 +100,25 @@ to \fInewconffile\fP if \fIoldconffile\fP is still available. On
 abort\-upgrade/abort\-install, the \fBpostrm\fP renames
 \fIoldconffile\fP\fB.dpkg\-remove\fP back to \fIoldconffile\fP if required.
 .
+.SH INTEGRATION IN PACKAGES
+.P
+Given that \fBdpkg\-maintscript\-helper\fP is used in the \fBpreinst\fP,
+using it unconditionnaly requires a pre-dependency to ensure that the
+required version of dpkg has been configured before. The required version
+depends on the command used, for \fBrm_conffile\fP and \fBmv_conffile\fP
+it is 1.15.7.2:
+.P
+    Pre-Depends: dpkg (>= 1.15.7.2)
+.P
+But in many cases the operation done by the program is not critical for
+the package, and instead of using a pre-dependency we can call the
+program only if we know that the required command is supported by
+the currently installed dpkg:
+.P
+    if dpkg-maintscript-helper supports <command>; then
+        dpkg-maintscript-helper <command> ...
+    fi
+.
 .SH AUTHORS
 Copyright \(co 2010 Rapha\[:e]l Hertzog
 .br

+ 1 - 1
man/dpkg-shlibdeps.1

@@ -310,7 +310,7 @@ built within the same source package and if the shlibs files has not yet
 been created (in which case you must fix debian/rules to create
 the shlibs before calling \fBdpkg\-shlibdeps\fR). Bad RPATH can also
 lead to the library being found under a non-canonical name (example:
-/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8 instead of
+/usr/lib/openoffice.org/../lib/libssl.so.9.8 instead of
 /usr/lib/libssl.so.0.9.8) that's not associated to any package,
 .B dpkg\-shlibdeps
 tries to work around this by trying to fallback on a canonical name (using

+ 1 - 1
man/dpkg-trigger.1

@@ -58,5 +58,5 @@ the trigger.
 Just test, do not actually change anything.
 .
 .SH SEE ALSO
-.BR dpkg "(1), " deb-triggers "(5), " /usr/share/doc/dpkg/triggers.txt.gz .
+.BR dpkg "(1), " deb-triggers "(5), " /usr/share/doc/dpkg-dev/triggers.txt.gz .
 

+ 2 - 2
man/po/de.po

@@ -11475,7 +11475,7 @@ msgid ""
 "the same source package and if the shlibs files has not yet been created (in "
 "which case you must fix debian/rules to create the shlibs before calling "
 "B<dpkg-shlibdeps>). Bad RPATH can also lead to the library being found under "
-"a non-canonical name (example: /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../"
+"a non-canonical name (example: /usr/lib/openoffice.org/../"
 "lib/libssl.so.9.8 instead of /usr/lib/libssl.so.0.9.8) that's not associated "
 "to any package, B<dpkg-shlibdeps> tries to work around this by trying to "
 "fallback on a canonical name (using B<realpath>(3))  but it might not always "
@@ -11488,7 +11488,7 @@ msgstr ""
 "rules korrigieren müssen, damit die Shlibs-Datei erstellt wird bevor B<dpkg-"
 "shlibdeps> aufgerufen wird). Defekte RPATH können auch dazu führen, dass die "
 "Bibliothek unter nicht-kanonischen Namen gefunden wird (beispielsweise /usr/"
-"lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8 statt /usr/lib/"
+"lib/openoffice.org/../lib/libssl.so.9.8 statt /usr/lib/"
 "libssl.so.0.9.8), so dass dann diese keinem Paket zugeordnet ist; B<dpkg-"
 "shlibdeps> versucht dies zu umgehen, indem es auf einen kanonischen Namen "
 "(mittels B<realpath>(3)) zurückfällt, allerdings könnte dies manchmal nicht "

+ 1 - 1
man/po/dpkg-man.pot

@@ -8978,7 +8978,7 @@ msgid ""
 "which case you must fix debian/rules to create the shlibs before calling "
 "B<dpkg-shlibdeps>). Bad RPATH can also lead to the library being found under "
 "a non-canonical name (example: "
-"/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl.so.9.8 instead of "
+"/usr/lib/gcc/i486-\\:linux-\\:gnu/4.2.3/../../../../lib/libssl.so.9.8 instead of "
 "/usr/lib/libssl.so.0.9.8) that's not associated to any package, "
 "B<dpkg-shlibdeps> tries to work around this by trying to fallback on a "
 "canonical name (using B<realpath>(3))  but it might not always work. It's "

+ 2 - 2
man/po/fr.po

@@ -11093,7 +11093,7 @@ msgid ""
 "the same source package and if the shlibs files has not yet been created (in "
 "which case you must fix debian/rules to create the shlibs before calling "
 "B<dpkg-shlibdeps>). Bad RPATH can also lead to the library being found under "
-"a non-canonical name (example: /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../"
+"a non-canonical name (example: /usr/lib/openoffice.org/../"
 "lib/libssl.so.9.8 instead of /usr/lib/libssl.so.0.9.8) that's not associated "
 "to any package, B<dpkg-shlibdeps> tries to work around this by trying to "
 "fallback on a canonical name (using B<realpath>(3))  but it might not always "
@@ -11105,7 +11105,7 @@ msgstr ""
 "fichiers shlibs n'aient pas encore été créés (dans ce cas debian/rules doit "
 "être modifié pour créer le shlibs avant l'appel de B<dpkg-shlibdeps>). Un "
 "mauvais RPATH peut aussi conduire à ce que la bibliothèque soit trouvée sous "
-"un nom non-canonique (comme: /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../"
+"un nom non-canonique (comme: /usr/lib/openoffice.org/../"
 "lib/libssl.so.9.8 au lieu de /usr/lib/libssl.so.0.9.8) qui n'est associé à "
 "aucun paquet, B<dpkg-shlibdeps> essaie de travailler sur ce nom non-"
 "canonique (en utilisant B<realpath>(3)), mais cela ne fonctionne pas "

+ 2 - 2
man/po/pl.po

@@ -11196,7 +11196,7 @@ msgid ""
 "the same source package and if the shlibs files has not yet been created (in "
 "which case you must fix debian/rules to create the shlibs before calling "
 "B<dpkg-shlibdeps>). Bad RPATH can also lead to the library being found under "
-"a non-canonical name (example: /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../"
+"a non-canonical name (example: /usr/lib/openoffice.org/../"
 "lib/libssl.so.9.8 instead of /usr/lib/libssl.so.0.9.8) that's not associated "
 "to any package, B<dpkg-shlibdeps> tries to work around this by trying to "
 "fallback on a canonical name (using B<realpath>(3))  but it might not always "
@@ -11209,7 +11209,7 @@ msgstr ""
 "poprawić debian/rules aby shlibs były tworzone przed wywołaniem B<dpkg-"
 "shlibdeps>). Niewłaściwa wartość RPATH może również powodować, że biblioteka "
 "zostanie odnaleziona pod nietypową nazwą, która nie jest związana z żadnym "
-"pakietem (np. /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/libssl."
+"pakietem (np. /usr/lib/openoffice.org/../lib/libssl."
 "so.9.8 zamiast /usr/lib/libssl.so.0.9.8). B<dpkg-shlibdeps> próbuje poradzić "
 "sobie z tym starając się odczytać nazwę kanoniczną (z użyciem B<realpath>"
 "(3)) ale może to nie zawsze zadziałać. Aby uniknąć problemów, najlepiej jest "

+ 5 - 5
man/po/po4a.cfg

@@ -128,6 +128,11 @@
            add_$lang:po/$lang.add
 
 
+[type:man] dpkg-maintscript-helper.1  \
+           $lang:$(builddir)/$lang/dpkg-maintscript-helper.1 \
+           add_$lang:po/$lang.add
+
+
 [type:man] dpkg-mergechangelogs.1     \
            $lang:$(builddir)/$lang/dpkg-mergechangelogs.1   \
            add_$lang:po/$lang.add
@@ -198,11 +203,6 @@
            add_$lang:po/$lang.add
 
 
-[type:man] maintscript-helper.1       \
-           $lang:$(builddir)/$lang/maintscript-helper.1     \
-           add_$lang:po/$lang.add
-
-
 [type:man] start-stop-daemon.8        \
            $lang:$(builddir)/$lang/start-stop-daemon.8      \
            add_$lang:po/$lang.add

+ 3 - 3
man/po/sv.po

@@ -11126,7 +11126,7 @@ msgid ""
 "the same source package and if the shlibs files has not yet been created (in "
 "which case you must fix debian/rules to create the shlibs before calling "
 "B<dpkg-shlibdeps>). Bad RPATH can also lead to the library being found under "
-"a non-canonical name (example: /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../"
+"a non-canonical name (example: /usr/lib/openoffice.org/../"
 "lib/libssl.so.9.8 instead of /usr/lib/libssl.so.0.9.8) that's not associated "
 "to any package, B<dpkg-shlibdeps> tries to work around this by trying to "
 "fallback on a canonical name (using B<realpath>(3))  but it might not always "
@@ -11137,8 +11137,8 @@ msgstr ""
 "samma källkodspaket och om shlibs-filen ännu inte har skapats (då måste du "
 "fixa debian/rules så att det skapar shlibs-filen innan det anropar B<dpkg-"
 "shlibdeps>). Felaktig RPATH kan också leda till att biblioteket hittas under "
-"ett icke-kanoniskt namn (till exempel: /usr/lib/gcc/i486-linux-"
-"gnu/4.2.3/../../../../lib/libssl.so.9.8 istället för /usr/lib/libssl."
+"ett icke-kanoniskt namn (till exempel: /usr/lib/openoffice.org/../"
+"lib/libssl.so.9.8 istället för /usr/lib/libssl."
 "so.0.9.8) som inte associeras till något paket, B<dpkg-shlibdeps> försöker "
 "gå runt detta genom att falla tillbaka på ett kanoniskt namn (med B<realpath>"
 "(3)), men det fungerar kanske inte alltid. Det är alltid bäst att städa upp "

+ 1 - 0
ostable

@@ -17,6 +17,7 @@
 uclibceabi-linux	linux-uclibceabi	linux[^-]*-uclibceabi
 uclibc-linux		linux-uclibc		linux[^-]*-uclibc
 gnueabi-linux		linux-gnueabi		linux[^-]*-gnueabi
+gnuspe-linux		linux-gnuspe		linux[^-]*-gnuspe
 gnulp-linux		linux-gnulp		linux[^-]*-gnulp
 gnu-linux		linux-gnu		linux[^-]*(-gnu.*)?
 gnu-kfreebsd		kfreebsd-gnu		kfreebsd[^-]*(-gnu.*)?

+ 1 - 0
scripts/.gitignore

@@ -7,6 +7,7 @@ dpkg-divert
 dpkg-genchanges
 dpkg-gencontrol
 dpkg-gensymbols
+dpkg-maintscript-helper
 dpkg-mergechangelogs
 dpkg-name
 dpkg-parsechangelog

+ 2 - 1
scripts/Dpkg/BuildFlags.pm

@@ -106,7 +106,8 @@ Update flags from the user configuration.
 
 sub load_user_config {
     my ($self) = @_;
-    $self->update_from_conffile($ENV{"HOME"} . "/.config/dpkg-buildflags.conf", "user");
+    my $confdir = $ENV{'XDG_CONFIG_HOME'} || $ENV{"HOME"} . "/.config";
+    $self->update_from_conffile("$confdir/dpkg/buildflags.conf", "user");
 }
 
 =item $bf->load_environment_config()

+ 1 - 0
scripts/Dpkg/Source/Package/V3/quilt.pm

@@ -378,6 +378,7 @@ are templates for supplementary fields that you might want to add:
 Origin: <vendor|upstream|other>, <url of original patch>
 Bug: <url in upstream bugtracker>
 Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
 Forwarded: <no|not-needed|url proving that it has been forwarded>
 Reviewed-By: <name and email of someone who approved the patch>
 Last-Update: <YYYY-MM-DD>\n\n";

+ 11 - 3
scripts/Dpkg/Version.pm

@@ -44,7 +44,7 @@ use overload
     '<=>' => \&comparison,
     'cmp' => \&comparison,
     '""'  => \&as_string,
-    'bool' => sub { return $_[0]->is_valid(); },
+    'bool' => sub { return $_[0]->as_string() if $_[0]->is_valid(); },
     'fallback' => 1;
 
 =encoding utf8
@@ -107,6 +107,12 @@ sub new {
     return bless $self, $class;
 }
 
+=item boolean evaluation
+
+When the Dpkg::Version object is used in a boolean evaluation (for example
+in "if ($v)" or "$v || 'default'") it returns its string representation
+if the version stored is valid ($v->is_valid()) and undef otherwise.
+
 =item $v->is_valid()
 
 Returns true if the version is valid, false otherwise.
@@ -194,8 +200,10 @@ If $a or $b are not valid version numbers, it dies with an error.
 
 sub version_compare($$) {
     my ($a, $b) = @_;
-    my $va = Dpkg::Version->new($a, check => 1) || error(_g("%s is not a valid version"), "$a");
-    my $vb = Dpkg::Version->new($b, check => 1) || error(_g("%s is not a valid version"), "$b");
+    my $va = Dpkg::Version->new($a, check => 1);
+    defined($va) || error(_g("%s is not a valid version"), "$a");
+    my $vb = Dpkg::Version->new($b, check => 1);
+    defined($vb) || error(_g("%s is not a valid version"), "$b");
     return $va <=> $vb;
 }
 

+ 9 - 2
scripts/Makefile.am

@@ -12,6 +12,7 @@ bin_SCRIPTS = \
 	dpkg-genchanges \
 	dpkg-gencontrol \
 	dpkg-gensymbols \
+	dpkg-maintscript-helper \
 	dpkg-mergechangelogs \
 	dpkg-name \
 	dpkg-parsechangelog \
@@ -25,8 +26,6 @@ if WITH_UPDATE_ALTERNATIVES
 bin_SCRIPTS += update-alternatives
 endif
 
-dist_pkglib_SCRIPTS = maintscript-helper
-
 changelogdir = $(pkglibdir)/parsechangelog
 changelog_SCRIPTS = \
 	changelog/debian
@@ -41,6 +40,7 @@ EXTRA_DIST = \
 	dpkg-genchanges.pl \
 	dpkg-gencontrol.pl \
 	dpkg-gensymbols.pl \
+	dpkg-maintscript-helper.sh \
 	dpkg-mergechangelogs.pl \
 	dpkg-name.pl \
 	dpkg-parsechangelog.pl \
@@ -123,12 +123,19 @@ do_perl_subst = $(AM_V_GEN) \
 		    -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \
 		    -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":"
 
+do_shell_subst = $(AM_V_GEN) \
+		 sed -e "s:^version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:version=\"$(PACKAGE_VERSION)\":"
 
 %: %.pl Makefile
 	@test -d `dirname $@` || $(mkdir_p) `dirname $@`
 	$(do_perl_subst) <$< >$@
 	$(AM_V_at) chmod +x $@
 
+%: %.sh Makefile
+	@test -d `dirname $@` || $(mkdir_p) `dirname $@`
+	$(do_shell_subst) <$< >$@
+	$(AM_V_at) chmod +x $@
+
 install-data-local:
 if BUILD_POD_DOC
 # Install manual pages for perl modules manually as make can't deal

+ 1 - 0
scripts/dpkg-buildflags.pl

@@ -62,6 +62,7 @@ while (@ARGV) {
             if defined($action);
         $action = $1;
         $param = shift(@ARGV);
+	usageerr(_g("%s needs a parameter"), $_) unless defined $param;
     } elsif (m/^--list$/) {
         usageerr(_g("two commands specified: --%s and --%s"), "list", $action)
             if defined($action);

+ 48 - 2
scripts/maintscript-helper

@@ -21,7 +21,7 @@
 # The conffile related functions are inspired by
 # http://wiki.debian.org/DpkgConffileHandling
 
-# This script is documented in maintscript-helper(1)
+# This script is documented in dpkg-maintscript-helper(1)
 
 ##
 ## Functions to remove an obsolete conffile during upgrade
@@ -208,16 +208,24 @@ debug() {
 }
 
 error() {
-	echo "ERROR: $PROGNAME: $1" >&2
+	echo "$PROGNAME: error: $1" >&2
 	exit 1
 }
 
+warning() {
+	echo "$PROGNAME: warning: $1" >&2
+}
+
 usage() {
 	cat <<END
 Syntax: $0 <command> [<parameters>] -- <maintainer script parameters>
 
 Commands and parameters:
 
+  supports <command>
+	Returns 0 (success) if the given command is supported, 1
+	otherwise.
+
   rm_conffile <conffile> <last-version> [<package>]
 	Remove obsolete conffile.
 	Must be called in preinst, postinst and postrm.
@@ -235,10 +243,30 @@ END
 set -e
 
 PROGNAME=$(basename $0)
+version="unknown"
 command="$1"
 shift
 
 case "$command" in
+supports)
+	case "$1" in
+	rm_conffile|mv_conffile)
+		code=0
+		;;
+	*)
+		code=1
+		;;
+	esac
+	if [ -z "$DPKG_MAINTSCRIPT_NAME" ]; then
+		warning "environment variable DPKG_MAINTSCRIPT_NAME missing"
+		code=1
+	fi
+	if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
+		warning "environment variable DPKG_MAINTSCRIPT_PACKAGE missing"
+		code=1
+	fi
+	exit $code
+	;;
 rm_conffile)
 	rm_conffile "$@"
 	;;
@@ -248,7 +276,25 @@ mv_conffile)
 --help|help|-?|-h)
 	usage
 	;;
+--version)
+	cat <<-END
+	Debian $PROGNAME version $version.
+
+	Copyright (C) 2010 Raphaël Hertzog <hertzog@debian.org>
+	Copyright (C) 2008 Joey Hess <joeyh@debian.org>
+	Copyright (C) 2007 Guillem Jover <guillem@debian.org>
+	Copyright (C) 2005 Scott James Remnant
+
+	This is free software; see the GNU General Public License version 2 or
+	later for copying conditions. There is NO warranty.
+	END
+	;;
 *)
+	cat >&2 <<-END
+	$PROGNAME: error: command $command is unknown
+	Hint: upgrading dpkg to a newer version might help.
+
+	END
 	usage
 	exit 1
 esac

+ 1 - 1
scripts/dpkg-name.pl

@@ -186,7 +186,7 @@ sub move($)
                 if (mkpath($dir)) {
                     info(_g("created directory '%s'"), $dir);
                 } else {
-                    error(_g("cannot create directory '%s'", $dir);
+                    error(_g("cannot create directory '%s'"), $dir);
                 }
             } else {
                 error(_g("no such directory '%s', try --create-dir (-c) option"),

+ 4 - 0
scripts/po/.gitignore

@@ -1,4 +1,8 @@
 *.gmo
+*.sin
 *.sed
+*.header
+Makevars.template
 POTFILES
+Rules-quot
 stamp-po

+ 8 - 1
scripts/t/100_Dpkg_Version.t

@@ -28,7 +28,7 @@ my @ops = ("<", "<<", "lt",
 	   ">=", "ge",
 	   ">", ">>", "gt");
 
-plan tests => scalar(@tests) * (3 * scalar(@ops) + 4) + 8;
+plan tests => scalar(@tests) * (3 * scalar(@ops) + 4) + 11;
 
 sub dpkg_vercmp {
      my ($a, $cmp, $b) = @_;
@@ -82,11 +82,18 @@ ok($empty->as_string() eq "", "Dpkg::Version->new('')->as_string() eq ''");
 ok(!$empty->is_valid(), "empty version is invalid");
 my $ver = Dpkg::Version->new("10a:5.2");
 ok(!$ver->is_valid(), "bad epoch is invalid");
+ok(!$ver, "bool eval of invalid leads to false");
 ok($ver eq '10a:5.2', "invalid still same string 1/2");
 $ver = Dpkg::Version->new('5.2@3-2');
 ok($ver eq '5.2@3-2', "invalid still same string 2/2");
 ok(!$ver->is_valid(), "illegal character is invalid");
 
+# Other tests
+$ver = Dpkg::Version->new('1.2.3-4');
+is($ver || 'default', '1.2.3-4', "bool eval returns string representation");
+$ver = Dpkg::Version->new('0');
+is($ver || 'default', 'default', "bool eval of version 0 is still false...");
+
 # Comparisons
 foreach my $case (@tests) {
     my ($a, $b, $res) = split " ", $case;

+ 7 - 0
src/archives.c

@@ -816,6 +816,11 @@ tar_deferred_extract(struct fileinlist *files, struct pkginfo *pkg)
   struct filenamenode *usenode;
   const char *usename;
 
+#if !defined(HAVE_ASYNC_SYNC)
+  debug(dbg_general, "deferred extract mass sync");
+  sync();
+#endif
+
   for (cfile = files; cfile; cfile = cfile->next) {
     debug(dbg_eachfile, "deferred extract of '%.255s'", cfile->namenode->name);
 
@@ -829,6 +834,7 @@ tar_deferred_extract(struct fileinlist *files, struct pkginfo *pkg)
 
     setupfnamevbs(usename);
 
+#if defined(HAVE_ASYNC_SYNC)
     if (cfile->namenode->flags & fnnf_deferred_fsync) {
       int fd;
 
@@ -844,6 +850,7 @@ tar_deferred_extract(struct fileinlist *files, struct pkginfo *pkg)
 
       cfile->namenode->flags &= ~fnnf_deferred_fsync;
     }
+#endif
 
     if (rename(fnamenewvb.buf, fnamevb.buf))
       ohshite(_("unable to install new version of `%.255s'"),

+ 1 - 1
src/help.c

@@ -265,7 +265,7 @@ do_script(struct pkginfo *pkg, struct pkginfoperfile *pif,
         setenv(MAINTSCRIPTDPKGENVVAR, PACKAGE_VERSION, 1))
       ohshite(_("unable to setenv for maintainer script"));
 
-    cmd->argv[0] = preexecscript(cmd);
+    cmd->filename = cmd->argv[0] = preexecscript(cmd);
     command_exec(cmd);
   }
   subproc_signals_setup(cmd->name); /* This does a push_cleanup() */

+ 1 - 0
triplettable

@@ -6,6 +6,7 @@
 uclibceabi-linux-arm	uclibc-linux-armel
 uclibc-linux-<cpu>	uclibc-linux-<cpu>
 gnueabi-linux-arm	armel
+gnuspe-linux-powerpc	powerpcspe
 gnulp-linux-i386	lpia
 gnu-linux-<cpu>		<cpu>
 gnu-kfreebsd-<cpu>	kfreebsd-<cpu>