* scripts/Dpkg/Shlibs/SymbolFile.pm (get_smallest_version): New
function to retrieve the smallest "minver" of all symbols of a
given library.
* scripts/dpkg-shlibdeps.pl: Do not initialize dependencies of
libraries with symbols files as unversioned, instead use the
smallest minimal version returned by the function above. This
is required because the library might not have always been
available in the package and the unversioned dependency thus
doesn't ensure his presence.
* scripts/t/800_Dpkg_IPC.t: Remove temporary files used by the
tests.
Ensure the Files field is last in *.dsc and *.changes
* scripts/Dpkg/Source/Package.pm, scripts/dpkg-genchanges.pl:
Explicitely put Checksums-* fields before the Files field so that
the Files field is last. This is a work-around for some braindead
dsc parsers (dupload and sbuild for instance, see #473518 and
* scripts/Dpkg/Source/Package/V2_0.pm: Add the option
--skip-patches to not apply patches at the end of the source
package extraction. Also works for Format: 3.0 (quilt).
* man/dpkg-source.1: Document the above change.
Raphael Hertzog [Sun, 30 Mar 2008 16:03:38 +0000 (18:03 +0200)]
Apply patches before building source packages when needed
* scripts/Dpkg/Source/Package/V2_0.pm (do_extract): Create
debian/patches/.dpkg-source-applied containing the list of patches
applied during extraction.
(prepare_build): apply patches before trying to build a source package
when it's clear that they have not been applied because
debian/patches/.dpkg-source-applied doesn't exist.
* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Likewise. If a .pc directory
is present, then use "quilt unapplied" to check if all patches have been
applied.
* man/dpkg-source.1: Document the above changes.
Raphael Hertzog [Fri, 28 Mar 2008 13:29:36 +0000 (14:29 +0100)]
Ease cross-compilation by giving a default value to PKG_CONFIG_LIBDIR
* scripts/dpkg-buildpackage.pl: If the user request a cross-compilation,
then define PKG_CONFIG_LIBDIR so that it will look in directories
specidic to the target architecture.
* man/dpkg-buildpackage.1: Document this change and also the -t option.
Raphael Hertzog [Fri, 28 Mar 2008 16:59:41 +0000 (17:59 +0100)]
dpkg-buildpackage: change default value of LDFLAGS
* scripts/dpkg-buildpackage.pl: LDFLAGS now defaults to an empty
value instead of "-Wl,-Bsymbolic-functions". The latter can break
some libraries at run-time and such a change is best done
at the beginning of a release cycle.
Raphael Hertzog [Tue, 25 Mar 2008 10:33:06 +0000 (11:33 +0100)]
dpkg-shlibdeps: new warning about useless libraries, new --warnings option
* scripts/dpkg-shlibdeps.pl: Let the user configure the set of
warnings that he wants. Add a new warning for useless libraries
on all binaries analyzed. Disable by default the warning that
does the same but individually, for each binary analyzed.
* man/dpkg-shlibdeps.1: Update manual page accordingly.
Raphael Hertzog [Thu, 20 Mar 2008 14:16:51 +0000 (15:16 +0100)]
Dpkg::Source::Patch: change an error into a warning
* scripts/Dpkg/Source/Patch.pm (analyze): An empty patch
is still valid, instead of failing simply generate a warning.
21 packages in the archive have an empty .diff.gz and
they can't be extracted without this fix.
Raphael Hertzog [Wed, 19 Mar 2008 21:38:09 +0000 (22:38 +0100)]
dpkg-source: keep the old output for tools that parse the directory
* scripts/dpkg-source.pl: Old version of lintian and sbuild do parse the
output of dpkg-source to find the name of the unpacked directory. Thus
keep the old output for this precise string until the tools get fixed.
Raphael Hertzog [Tue, 18 Mar 2008 16:39:08 +0000 (17:39 +0100)]
Avoid extracting files through symlinks
* scripts/Dpkg/Source/Package/V2_0.pm (do_extract): Now
that the debian tarball is extracted in-place over the
unpacked source directory, it's important to not let tar
unpack files in symlinked directories (otherwise it would
be possible to write files outside of the unpacked
source tree).
Raphael Hertzog [Tue, 18 Mar 2008 10:55:11 +0000 (11:55 +0100)]
Allow inclusion of binary files outside of the debian subdirectory
* scripts/Dpkg/ErrorHandling.pm (errormsg): New function displaying
an error message to stderr without dying.
* scripts/Dpkg/Source/Patch.pm (add_diff_file): Add a hook in the
handling of modified binary files. Don't fail unconditionnaly when a
binary file is detected. Return a value indicating if the diff
call succeeded.
(add_diff_directory): Don't display some warnings (that apply only to
files whose changes can be represented in diff) for modified
binary files.
(_fail_with_msg, _fail_not_same_type): Use new errormsg() function.
* scripts/Dpkg/Source/Package/V2_0.pm (do_extract): Extract the debian
tarball "in-place" so that it can contain other files besides the debian
sub-directory.
(do_build): Handle modified binary files. They are added to the debian
tarball if --include-binaries is used, or if they are whitelisted in
debian/source/include-binaries. The usage of --include-binaries will
modify debian/source/include-binaries if needed.
* man/dpkg-source.1: Update manual page accordingly.
Raphael Hertzog [Tue, 18 Mar 2008 10:33:49 +0000 (11:33 +0100)]
Allow in-place extraction of a tar archive
* scripts/Dpkg/Source/Archive.pm: New "in_place" option to
extract an archive in the target directory instead of replacing
the whole target directory. Replace the logic to fix permissions
by fixperms() which is a...
* scripts/Dpkg/Source/Functions.pm (fixperms): new function to
fix permissions on a given directory so that they match the rights
expected through the umask.