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.
Raphael Hertzog [Tue, 18 Mar 2008 10:31:26 +0000 (11:31 +0100)]
Allow patches in wig&pen format to remove files
* scripts/Dpkg/Source/Package/V2_0.pm: Use -E option of patch
to apply patches so that empty files are removed.
* man/dpkg-source.1: Update manual page accordingly.
Raphael Hertzog [Sun, 16 Mar 2008 22:27:59 +0000 (23:27 +0100)]
dpkg-shlibdeps: accounts usage of symbols of libraries without SONAME
* scripts/Dpkg/Shlibs/Objdump.pm: Add "objid" property to
symbols and fake "soname" property with the basename of the
object's filename if the object has no official SONAME.
* scripts/dpkg-shlibdeps.pl: Add some more debugging messages.
* scripts/dpkg-shlibdeps.pl: Also count usage of alternate sonames
for symbols found in symbols files.
Raphael Hertzog [Sun, 16 Mar 2008 18:17:03 +0000 (19:17 +0100)]
Update indentation and coding style to be coherent with the other modules
* scripts/Dpkg/Source/Package/V3_0/bzr.pm: Use 4 spaces everywhere
for indentation. Put spaces around " = ".
* scripts/Dpkg/Source/Package/V3_0/git.pm: Same here.
Raphael Hertzog [Sun, 16 Mar 2008 18:03:59 +0000 (19:03 +0100)]
Uniformize @argv parsing in source package formats
* scripts/Dpkg/Source/Package/V2_0.pm: Improve error
message when we have too many arguments.
* scripts/Dpkg/Source/Package/V3_0/bzr.pm: Same here.
* scripts/Dpkg/Source/Package/V3_0/git.pm: Same here.
* scripts/Dpkg/Source/Package/V3_0/native.pm: Add check
of number of arguments.
* scripts/Dpkg/Source/Package/V1_0.pm: Make sure we're
not going to fail when we delegate to do_build() of
V3_0/native.pm.
Raphael Hertzog [Sun, 16 Mar 2008 15:13:03 +0000 (16:13 +0100)]
New source package format "3.0 (custom)"
* scripts/Dpkg/Source/Package/V3_0/custom.pm: Module implementing
a fake source package format. It provides a convenient way to generate
a source package containing arbitrary files. It's meant to be used
by helper tools like git-buildpackage or svn-buildpackage.
* scripts/Makefile.am, scripts/po/POTFILES.in: Register the above
file.
Raphael Hertzog [Sun, 16 Mar 2008 14:29:13 +0000 (15:29 +0100)]
Use default ignore rules for source package with format >> 1.0
* scripts/dpkg-source.pl: Remove default ignore patterns
and move them...
* scripts/Dpkg/Source/Package.pm: ...here. The init_options()
method now will give default values to the corresponding
options.
* scripts/Dpkg/Source/Package/V2_0.pm (init_options): Call
the parent init_options() to get the default ignore rules.
* scripts/Dpkg/Source/Package/V1_0.pm: Don't call the
parent init_options() as we don't want default values
for format 1.0.
Raphael Hertzog [Sun, 16 Mar 2008 12:34:46 +0000 (13:34 +0100)]
dpkg-source: factorize logic of copy of original tarballs
* scripts/Dpkg/Source/Package.pm (extract): Now handles copy
of original tarballs and addition of executable right to
debian/rules.
scripts/Dpkg/Source/Package/V1_0.pm (do_extract, parse_cmdline_option):
Don't copy the original tarball as it's already done by extract().
* scripts/dpkg-source.pl: New option --no-copy to not copy
the original tarballs. New option --no-check to not check signature
and checksum. Misc cleanup in the options handling code.
Colin Watson [Sun, 16 Mar 2008 10:45:25 +0000 (11:45 +0100)]
Add bzr-based source package format
* scripts/Dpkg/Source/Package/V3_0/bzr.pm: New module handling
the "3.0 (bzr)" source package format. It's based on the git
one.
* scripts/Makefile.am, scripts/po/POTFILES.in: Register the above
file.
Raphael Hertzog [Sat, 15 Mar 2008 22:20:54 +0000 (23:20 +0100)]
Each source package format can have its own command line options
* scripts/Dpkg/Source/Package.pm (init_options): Provide default
values to various options in a format-specific way.
* scripts/Dpkg/Source/Package.pm (parse_cmdline_options,
parse_cmdline_option): New functions to handle command line options.
* scripts/dpkg-source.pl: Forward unknown options to the
source package object. Remove handling of all -s? options
and move it...
* scripts/Dpkg/Source/Package/V1_0.pm: ...here.
* scripts/Dpkg/Source/Package/V2_0.pm: Add support of options
--include-removal and --include-timestamp.
* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Add support of option
--without-quilt.
Raphael Hertzog [Sat, 15 Mar 2008 14:31:02 +0000 (15:31 +0100)]
Allow deletion of files by patches in Format: 3.0 (quilt)
* scripts/Dpkg/Source/Patch.pm (add_diff_directory): New option to
be able to generate a diff for a removed file (instead of ignoring
its deletion).
* scripts/Dpkg/Source/Patch.pm (apply): New option "add_options" to
add some options to the default set of options.
* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Pass -E option to
patch when applying patches without quilt. This will remove
patched files which end up being empty.
Raphael Hertzog [Fri, 14 Mar 2008 18:35:58 +0000 (19:35 +0100)]
Misc bugfixes
* scripts/Dpkg/Source/Package/V3_0/git.pm (can_build): Add the missing
can_build() function. It checks if the source directory contains a .git
directory.
* scripts/Dpkg/Source/Patch.pm (get_type): Fix format specifier.
Raphael Hertzog [Fri, 14 Mar 2008 18:32:04 +0000 (19:32 +0100)]
Dpkg::Source::Package::V3_0::quilt: Add fallback when quilt is not available
* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Check for quilt availability
before using it to apply patches. Otherwise resort to using
Dpkg::Source::Patch to apply patches.
Raphael Hertzog [Fri, 14 Mar 2008 12:50:08 +0000 (13:50 +0100)]
Dpkg::Changelog::Debian: Allow capitals in distribution/package names
* scripts/Dpkg/Changelog/Debian.pm: Fix regression by re-allowing
capitals (like UNRELEASED!) in the distribution/package name.
* scripts/t/600_Dpkg_Changelog/regressions: Add capitals in the
distribution name as part of the non-regression tests.
Raphael Hertzog [Wed, 12 Mar 2008 11:02:28 +0000 (12:02 +0100)]
Dpkg::Source::Package::V3_0::quilt: New source package variant using quilt.
* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Implement a new source
package format that uses quilt to apply patches from
debian/patches/series. It is based on the wig&pen class (V2_0.pm).
* scripts/Makefile.am, scripts/po/POTFILES.in: Register the new module.
Raphael Hertzog [Wed, 12 Mar 2008 10:59:04 +0000 (11:59 +0100)]
Dpkg::Source::Package::V2_0: Misc changes in preparation of a quilt subclass
* scripts/Dpkg/Source/Package/V2_0.pm (get_patches): Return patch name
relative to debian/patches/.
* scripts/Dpkg/Source/Package/V2_0.pm (prepare_build): New hook function
used to prepare some options for the creation of the auto_patch.
* scripts/Dpkg/Source/Package/V2_0.pm (do_build): Create the debian/patches
directory if needed.
Robert Luberda [Sun, 9 Mar 2008 16:15:14 +0000 (17:15 +0100)]
Update Polish translations and fix po4a errors in other languages' translations
* po/pl.po: Apply some fixes suggested by Wiktor Wandachowicz.
* */pl.po: Consistently use Polish quotation marks in translations.
* man/{de.po, hu.po, sv.po}: Fix a few broken messages, that caused the
newest po4a to die with the `Unknown '<' or '>' sequence' error.
Ian Jackson [Thu, 1 Nov 2007 19:57:26 +0000 (19:57 +0000)]
Correct broken dselect logic for self-conflicting packages
The previous code seems to have had some confusion over the precedence
of '&&' vs ':'. The new rule is that a Conflicts is violated if the
target package is installed or to be error-preserved ie
would_like_to_install() != 0 - except that we disregard packages which
directly Conflict with themselves.
Raphael Hertzog [Wed, 5 Mar 2008 23:09:08 +0000 (00:09 +0100)]
Rename DSP::V1_0::native to DSP::V3_0::native
* scripts/Dpkg/Source/Package/V1_0/native.pm: This file got
renamed into...
* scripts/Dpkg/Source/Package/V3_0/native.pm: The goal is to
not pollute the namespace of versions 1.0 and 2.0. The usage
of the format specifier between parenthesis is thus limited
to version 3.0.
* scripts/dpkg-source.pl: Updated to take into account the
previous renaming.
* scripts/Dpkg/Source/Package/V1_0.pm: Adapt to the name change
and two small bug fixes that affect building of native packages.
* scripts/Makefile.am, scripts/po/POTFILES.in: Register the new
file and remove the old one.
Raphael Hertzog [Sun, 2 Mar 2008 15:37:27 +0000 (16:37 +0100)]
Preserve the order of dependencies and build-dependencies
* scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl:
Do not sort the dependency fields as order matters given
the greedy algorithm that APT uses when trying to resolve
dependencies. See discussion on debian-devel:
http://lists.debian.org/debian-devel/2008/02/msg00893.html
* man/dpkg-gencontrol.1: Document the above changes.
* scripts/Dpkg/Deps.pm (simplify_deps): Tries to respect order put
by the maintainer when simplifying dependencies.
* scripts/t/400_Dpkg_Deps.t: Add a test-case to ensure that
further changes respect this constraint.
* scripts/dpkg-shlibdeps.pl: Sort generated dependencies to
have a deterministic output.
Raphael Hertzog [Sun, 2 Mar 2008 13:08:55 +0000 (14:08 +0100)]
Miscellaneous fixes
* scripts/Dpkg/Source/Package/V1_0.pm: Remove properly the
temporary file used for creating diff.gz file in case of
failure during its generation.
* scripts/Dpkg/Source/Patch.pm: The bad file was analyzed and
lead to failure of the stat call.
* scripts/Makefile.am: Add the new V3_0/git.pm file and
remove the old VCS/git.pm.
Raphael Hertzog [Fri, 29 Feb 2008 22:27:30 +0000 (23:27 +0100)]
Create Dpkg::Source::Package::V1_0::native
* scripts/Dpkg/Source/Package/V1_0/native.pm: New module that
handles native source packages with any compression.
* scripts/Dpkg/Source/Package/V1_0.pm: Adjusted to use the previous
module when it comes to handle native packages. Simplified
several other code paths.
* scripts/Makefile.am, scripts/po/POTFILES.in: Add the new module.
* scripts/dpkg-source.pl: Add the new format as fallback to try
when building a source package. It will likely only be selected
when non-gzip compression has been requested.
Raphael Hertzog [Fri, 29 Feb 2008 20:24:14 +0000 (21:24 +0100)]
dpkg-source: use a list of possible format for building a source package
* scripts/dpkg-source.pl: Define a list of formats that can be used
to build a source package and use the first one that is able to build
a source package. Let the user add formats to try at the beginning of that
list with the --format=<format> command-line option.
* scripts/Dpkg/Source/Package/V1_0.pm (can_build): Only accept to build a
source package is the compression option is gzip.
* scripts/Dpkg/Source/Package.pm (can_build): Return a proper error
message.
* scripts/dpkg-source.pl: Use the info() function to report progress.
* scripts/Dpkg/Source/Package/V2_0.pm: When extracting additional
tarballs, removes the destination directory in case it existed in
the main tarball. Same goes for the debian subdirectory.
* scripts/Makefile.am: Add the module above.
Dpkg::Changelog::Debian: Fix regression in header parsing
* scripts/Dpkg/Changelog/Debian.pm (parse):
One patch against the old parser that allowed
chars '+' and '.' in distribution names was
not forward ported into the new parser. Do
this now.
* scripts/t/600_Dpkg_Changelog/regression:
Add testcase for this regression.
Raphael Hertzog [Thu, 28 Feb 2008 22:11:11 +0000 (23:11 +0100)]
Add support of wig&pen source package
* scripts/Dpkg/Source/Package/V2_0.pm: New module to support "Format: 2.0"
source packages. Various method are overridables so that it's easy
to create an (upcoming) "Format: 2.0 (quilt)" variant. Native packages
(i.e. without orig.tar and with a single tarball) are not yet supported.
Raphael Hertzog [Thu, 28 Feb 2008 22:04:22 +0000 (23:04 +0100)]
Dpkg::Source::Package: Fix extract() and build() to clean up by default
* scripts/Dpkg/Source/Package.pm (extract, build): Change those methods
to delegate the real work to do_extract() and do_build() and catch
critical failures to clean up any temporary files/directories before
re-raising the error.
* scripts/Dpkg/Source/Package/V1_0.pm: Rename build() into do_build()
and extract() into do_extract().
Raphael Hertzog [Thu, 28 Feb 2008 20:20:46 +0000 (21:20 +0100)]
Dpkg::Source::Archive/Package: misc fixes and changes
* scripts/Dpkg/Source/Archive.pm: Replace unsafe rmtree() by
the safer erasedir() function.
* scripts/Dpkg/Source/Archive.pm (add_file, add_directory): Prefix
filename with chdir when the directory of the tar process isn't
the current directory.
* scripts/Dpkg/Source/Package.pm (find_original_tarballs): New
function to find original tarballs possibly associated to the current
source package.
* scripts/Dpkg/Source/Package.pm (add_file): Support adding file
who are not stored in the current directory (or who are prefixed with
"./").
* scripts/Dpkg/Source/Package.pm (can_build): New function to check
if a source package build is likely to succeed given the constraints
of a particular source package format. Will be used by dpkg-source to
find an appropriate format.
Raphael Hertzog [Sun, 24 Feb 2008 21:16:30 +0000 (22:16 +0100)]
dpkg-source: use the new Dpkg::Source::Package object
* scripts/dpkg-source.pl: Major restructuring of the script. It's
now based on the Dpkg::Source::Package object and its derived
classes. This was the last big step of cleanup. The script is now less
than 500 lines compared to more than 1300 not so long ago...