summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
AgeCommit message (Collapse)AuthorFilesLines
2008-05-28dpkg-source/3.0 (quilt): better integration with quiltRaphael Hertzog1-39/+54
* 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.
2008-05-28dpkg-source/3.0 (quilt): improve reliability of check_patches_appliedRaphael Hertzog2-23/+54
* 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).
2008-05-23dpkg-source (2.0/3.0 (quilt)): improve build messagesRaphael Hertzog1-0/+5
* 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.
2008-05-23dpkg-source: improve compatibility of 3.0 (quilt) with existing patch systemsRaphael Hertzog1-1/+1
* 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.
2008-05-22Bugfix in source format 3.0 (quilt)Raphael Hertzog1-0/+1
* scripts/Dpkg/Source/Package/V3/quilt.pm: Add missing "use File::Path" for mkpath().
2008-05-19Add '.be' to the default dpkg-source -i regex and -I patternGuillem Jover1-1/+2
Based on a patch by Ben Finney. Closes: #481716
2008-05-08dpkg-source (2.0/3.0 (quilt)): create stamp file with automatic patchRaphael Hertzog2-2/+16
* 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.
2008-05-08dpkg-source (2.0/3.0 (quilt)): refuse binary files in debian subdirRaphael Hertzog2-3/+46
* 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.
2008-05-04Dpkg::Source::Patch.pm: Add missing import of internerrMarco d'Itri1-1/+1
Closes: #479205
2008-04-29Fix typo in an error messageRaphael Hertzog1-1/+1
* scripts/Dpkg/Source/Package/V3/git.pm (do_extract): Fix error message. * scripts/po/*.po: Update the po files accordingly.
2008-04-27dpkg-source: change the logic to find the object used to unpack/buildRaphael Hertzog8-23/+38
* 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.
2008-04-27dpkg-source: parse correctly series files with patch optionsRaphael Hertzog1-0/+9
* 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.
2008-04-25dpkg-source: fix permissions of tarballs in native source packagesRaphael Hertzog1-0/+2
* scripts/Dpkg/Source/Package/V3_0/native.pm: Fix permissions of generated tarballs to "666 & ~umask()".
2008-04-14dpkg-source: fix an error message about unrepresentable changes to sourceRaphael Hertzog1-2/+2
* scripts/Dpkg/Source/Patch.pm (_fail_not_same_type): Fix inversion between new/old filetype.
2008-04-12dpkg-source: handle better symlinks to orig tarballRaphael Hertzog2-2/+1
* scripts/Dpkg/Path.pm (check_files_are_the_same): Add a new parameter so that we can use stat() instead of lstat() and compare if pointed files are the same. * scripts/Dpkg/Source/Package.pm: Resolve symlinks before deciding if both original tarballs are the same or not. Use the new parameter of check_files_are_the_same() for this. * scripts/Dpkg/Source/Package/V1_0.pm: Remove useless import of check_files_are_the_same.
2008-04-12* scripts/Dpkg/Source/Package.pm: import subprocerr().Sven Joachim1-1/+1
2008-04-05dpkg-source: don't use diff -p for Format: 1.0Raphael Hertzog1-1/+3
* scripts/Dpkg/Source/Package/V1_0.pm: Do not use diff -p to generate patches as dpkg-source of sarge doesn't accept data after the @@.
2008-04-02Ensure the Files field is last in *.dsc and *.changesRaphael Hertzog1-1/+1
* 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
2008-04-01dpkg-source: add option --skip-patchesRaphael Hertzog1-1/+7
* 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.
2008-04-01Apply patches before building source packages when neededRaphael Hertzog2-5/+71
* 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.
2008-03-20Dpkg::Source::Patch: change an error into a warningRaphael Hertzog1-1/+1
* 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.
2008-03-18* scripts/Dpkg/Source/Package/V3_0/native.pm: Import missing function and ↵Raphael Hertzog1-2/+2
bugfix.
2008-03-18Avoid extracting files through symlinksRaphael Hertzog1-1/+14
* 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).
2008-03-18Allow inclusion of binary files outside of the debian subdirectoryRaphael Hertzog2-26/+90
* 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.
2008-03-18Allow in-place extraction of a tar archiveRaphael Hertzog2-32/+42
* 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.
2008-03-18Allow patches in wig&pen format to remove filesRaphael Hertzog1-1/+2
* 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.
2008-03-16Update indentation and coding style to be coherent with the other modulesRaphael Hertzog2-189/+189
* 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.
2008-03-16Uniformize @argv parsing in source package formatsRaphael Hertzog5-3/+13
* 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.
2008-03-16New source package format "3.0 (custom)"Raphael Hertzog1-0/+59
* 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.
2008-03-16Use default ignore rules for source package with format >> 1.0Raphael Hertzog3-0/+58
* 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.
2008-03-16dpkg-source: factorize logic of copy of original tarballsRaphael Hertzog2-7/+39
* 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.
2008-03-16Add bzr-based source package formatColin Watson1-0/+206
* 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.
2008-03-16Each source package format can have its own command line optionsRaphael Hertzog4-6/+80
* 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.
2008-03-15Allow deletion of files by patches in Format: 3.0 (quilt)Raphael Hertzog2-6/+15
* 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.
2008-03-14Misc bugfixesRaphael Hertzog2-1/+6
* 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.
2008-03-14Dpkg::Source::Package::V3_0::quilt: Add fallback when quilt is not availableRaphael Hertzog1-19/+28
* 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.
2008-03-14* scripts/Dpkg/Source/Package/V2_0.pm: Fix info message about unpacking of ↵Raphael Hertzog1-1/+1
debian tarball.
2008-03-14Dpkg::Source::Package::V3_0::quilt: New source package variant using quilt.Raphael Hertzog1-0/+155
* 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.
2008-03-12Dpkg::Source::Package::V2_0: Misc changes in preparation of a quilt subclassRaphael Hertzog1-9/+17
* 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.
2008-03-12* scripts/Dpkg/Source/Patch.pm: Bugfix: use return instead of next in function.Raphael Hertzog1-1/+1
2008-03-06Rename DSP::V1_0::native to DSP::V3_0::nativeRaphael Hertzog2-8/+7
* 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.
2008-03-02Miscellaneous fixesRaphael Hertzog2-1/+3
* 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.
2008-03-01Create Dpkg::Source::Package::V1_0::nativeRaphael Hertzog2-60/+132
* 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.
2008-03-01dpkg-source: use a list of possible format for building a source packageRaphael Hertzog2-1/+9
* 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.
2008-03-01Dpkg::Source::Package::V2_0: removes conflicting subdirectoriesRaphael Hertzog1-3/+9
* 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.
2008-03-01Use the new Dpkg::ErrorHandling::info() functionFrank Lichtenheld3-21/+21
2008-02-29Add support for v3.0 (git) packageFrank Lichtenheld2-260/+329
* scripts/Dpkg/Source/VCS/git.pm: Move this to... * scripts/Dpkg/Source/Package/V3_0/git.pm: ...here, and port to new API.
2008-02-29Dpkg::Source::Package: Fix some errors in error messagesFrank Lichtenheld1-3/+3
2008-02-28Add support of wig&pen source packageRaphael Hertzog1-0/+243
* 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.
2008-02-28Dpkg::Source::Package: Fix extract() and build() to clean up by defaultRaphael Hertzog2-2/+21
* 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().