Raphael Hertzog [Wed, 28 May 2008 19:06:40 +0000 (21:06 +0200)]
dpkg-source: make sure the source package format is respected
* scripts/Dpkg/Source/Package.pm (extract): If we extract a
source package that uses a non-standard source package format (!= 1.0)
then we create debian/source/format to remember it.
* scripts/dpkg-source.pl: Use debian/source/format as a new source
of format to try when building the package. Prioritize it lower than
command line and debian/control but higher than the default build
formats.
* man/dpkg-source.1: Document the above changes.
Raphael Hertzog [Wed, 28 May 2008 17:28:50 +0000 (19:28 +0200)]
dpkg-source/3.0 (quilt): better integration with quilt
* scripts/Dpkg/Source/Package/V3/quilt.pm: Factorize calls to
quilt in a new run_quilt() function. And check only once
if quilt is available while setting the default value of
without_quilt option. Last but not least, register properly the
automatically generated patch with quilt import.
Raphael Hertzog [Wed, 28 May 2008 16:05:50 +0000 (18:05 +0200)]
dpkg-source/3.0 (quilt): improve reliability of check_patches_applied
* scripts/Dpkg/Source/Patch.pm (check_apply): New function to
verify if a patch will successfully apply on top of a given
directory.
* scripts/Dpkg/Source/Package/V3/quilt.pm (check_patches_applied):
Don't trust debian/patches/.dpkg-source-applied blindly. Get a
list of (supposedly unapplied) patches and verify if the first
patch applies or not. If yes, then apply the patch series,
otherwise do not (and assume that the patch series is already
applied).
* scripts/Dpkg/Source/Package/V2.pm (do_build): Display a
message when local modifications are stored in a new
automatic patch. This messages includes a list of
modified files.
Raphael Hertzog [Fri, 23 May 2008 08:11:17 +0000 (10:11 +0200)]
dpkg-source: improve compatibility of 3.0 (quilt) with existing patch systems
* scripts/Dpkg/Source/Package/V3/quilt.pm: Remove the .diff
from the name of the automatically generated patch. It will
facilitate the switch to this format: packages using
patch system that apply debian/patches/*.{patch,diff}
will not be bothered by the presence of the quilt series
created by dpkg-source itself.
* man/dpkg-source.1: Update the documentation accordingly.
* man/po/*.po: Fix all the filenames to avoid fuzzying
translations.
Raphael Hertzog [Sun, 11 May 2008 14:41:23 +0000 (16:41 +0200)]
Activate triggers when a file is removed in a shared directory
* src/processarc.c (process_archive): While removing files that
disappeared, move the call to namenodetouse before the test
that skips directory shared with other packages. This is required
because namenodetouse() handles trigger activation and we really
want directories containing (only) removed files to activate the
corresponding triggers.
Raphael Hertzog [Thu, 8 May 2008 18:17:31 +0000 (20:17 +0200)]
dpkg-source (2.0/3.0 (quilt)): create stamp file with automatic patch
* scripts/Dpkg/Source/Package/V2.pm,
scripts/Dpkg/Source/Package/V3/quilt.pm: Ensure the
.dpkg-source-applied stamp file is created when an automatic patch
is created so that a second build doesn't try to mistakenly
reapply it.
Raphael Hertzog [Thu, 8 May 2008 17:12:23 +0000 (19:12 +0200)]
dpkg-source (2.0/3.0 (quilt)): refuse binary files in debian subdir
* scripts/Dpkg/Source/Functions.pm (is_binary): New function
to check if a file is binary by using diff against it.
* scripts/Dpkg/Source/Package/V2.pm (do_build): Check that all files from
the debian sub-directory are non-binary and only allow whitelisted binary
files.
* man/dpkg-source.1: Document this behaviour.
dpkg-source: change the logic to find the object used to unpack/build
* scripts/Dpkg/Source/Package.pm (upgrade_object_type): Instead
of using the full Format: version to deduce the perl object name
use only the major part of the version. The minor part is under
control of the corresponding object, that way they can evolve
and indicate that the source package has changed in a backwards
compatible way. See
http://lists.debian.org/debian-dpkg/2008/04/msg00045.html
Also add a new parameter to disable update of the minor version in
the Format field.
(initialize): Don't let the Format field be updated by
upgrade_object_type() as this function only loads information from
the .dsc into the object.
* scripts/Dpkg/Source/Package/**: Rename V1_0.pm into V1.pm,
V2_0.pm into V2.pm and V3_0/ into V3/. Fix perl package names
accordingly. Integrated a $CURRENT_MINOR_VERSION set to "0"
in all packages.
* scripts/Makefile.am, scripts/po/POTFILES.in: Update the lists
according to above file renames.
dpkg-source: parse correctly series files with patch options
* scripts/Dpkg/Source/Package/V3_0/quilt.pm: Parse correctly
series files with patch options and warn if something else than
-p1 is used.
* man/dpkg-source.1: Document how dpkg-source handles those patch
options in series files.