summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
AgeCommit message (Collapse)AuthorFilesLines
2009-07-25Fix apply_patches() funtion of 3.0 (quilt) format to properly skip auto patchRaphael Hertzog1-2/+2
When quilt was used, it was applying the automatic patch even when $skip_auto was set to 1. This bug was introduced while fixing bug #518453 (commit ea1530fe45c8b1ad61d91c0791c53ecf363899bf).
2009-06-26libdpkg-perl: Import Exporter with ‘use base’Guillem Jover1-2/+1
We don't need to set @ISA now.
2009-06-21dpkg-source: ensure trustedkeys.gpg is used to check signaturesRaphael Hertzog1-0/+3
2009-06-08Dpkg::Source::CompressedFile::cleanup_after_open(): fix error messageRaphael Hertzog1-1/+2
The $compressor->{cmdline} variable is removed by $compressor->wait_end_process() so store it first in case we have to display an error message.
2009-05-28Unset TAR_OPTIONS when handling tar archives for source packagesRaphael Hertzog1-0/+2
The command line interface is the only way that should control tar's behaviour in its usage by dpkg as we want the same behaviour for everybody.
2009-05-10dpkg-source: do not try to apply empty patch setRaphael Hertzog2-1/+4
In format 2.0 and 3.0 (quilt), do not try to apply the patches if there are none.
2009-05-10dpkg-source: minor update to "3.0 (quilt)" formatRaphael Hertzog2-3/+3
Do not update/create debian/patches/.dpkg-source-applied during build, it's only meant to document what patches have been applied at extraction time. Also try to cleanup in case the patch serie is empty after removal of the automatic patch. First remove debian/patches/series if it's empty and then debian/patches/ itself in case it's empty as well.
2009-05-10dpkg-source: fix automatic patch registration in format 3.0 (quilt)Raphael Hertzog1-4/+18
When the automatic patch is updated due to a second call to dpkg-source, it's not always properly registered with quilt. It must be applied with quilt itself otherwise quilt pop then quilt push might fail when supplementary files have been modified outside of quilt's knowledge. Furthermore quilt import was not a good choice as it failed trying to copy the patch over itself. The new approach is to revert the patch and let quilt reapply it with quilt fold. It will go over the list of files modified by the new patch and add those which were not yet part of the previous patch (hence adding the required unmodified files in .pc/<patch-name>/). Based-on-patch-by: Goswin von Brederlow <goswin-v-b@web.de>
2009-05-10Move Debian keyrings to the Debian vendor keyring hookGuillem Jover1-6/+0
As Ubuntu is a derivative from Debian, make it inherit the Debian vendor class when running the keyrings hook.
2009-05-03Add '.hgtags' to the default dpkg-source -i regex and -I patternGuillem Jover1-1/+2
Closes: #525854
2009-04-27dpkg-source: Add "keyrings" vendor hookColin Watson1-0/+6
Add "keyrings" vendor hook, used by dpkg-source to allow vendors to supply additional keyrings against which source package signatures will be verified. Implement this for Ubuntu.
2009-04-19dpkg-source: do not store user/group names in generated tarballsRaphael Hertzog1-1/+2
Do not store usernames and group names when creating tarballs and use numeric UID/GID 0 instead. This concerns native source packages, debian tarballs in "3.0 (quilt)" source packages, and any other source format creating new tarballs with Dpkg::Source::Archive.
2009-04-19dpkg-source: don't complain on binary files that are ignoredRaphael Hertzog1-1/+23
To avoid mistakes with "3.0 (quilt)" source packages, dpkg-source fails if it finds binary files that have not been whitelisted in the debian directory. Unfortunately it also fails on binary files that are ignored and that will not be included in the debian tarball. This commit fixes that although not completely. The exclude patterns passed to tar --exclude are used to match filenames and also full path names inside the tarball. This commit only adds support for simple filename match. It is enough for all realistic cases.
2009-04-17dpkg-source: accept dashes in component name of additional tarballsRaphael Hertzog2-3/+3
The regular expression used to identify additional tarballs (used in formats "2.0" and "3.0 (quilt)") was too strict and refused dashes. This commit fixes that and documents the set of allowed characters in the dpkg-source manual page.
2009-04-09dpkg-source: don't die on SIGPIPE of uncompressorsRaphael Hertzog2-3/+12
Modify Dpkg::Source::CompressedFile to not die when uncompressors processes (gunzip, bunzip, etc.) are killed by SIGPIPE. Recent tar versions close the pipe before having read everything sent by the uncompressor process when they encounter the end of the tar file. This was of course problematic for Dpkg::Source::Archive. This is a regression compared to etch's dpkg-source which dealt with SIGPIPE properly. The Dpkg::Source::Compressor::wait_end_process() function had to be extended to be able to forward options to Dpkg::IPC::wait_child().
2009-03-15Misc updates concerning gpg and dpkg-sourceRaphael Hertzog1-0/+2
* Always display a warning when the signature verification failed. * Update the dpkg-source's manual page to document that only the user's trustedkeys.gpg keyring is used for signature verification.
2009-03-15dpkg-source: don't block indefinitely on gpgRaphael Hertzog1-3/+9
dpkg-source's signature check is now done with gpgv if possible and timeouts if not completed within 10 seconds.
2009-03-15dpkg-source: improve ignore regexp to catch vi swap filesRaphael Hertzog1-2/+2
dpkg-source now ignores all possible vi swap file extensions (and not only .swp). The corresponding exclude pattern for -I also got tightened to only catch filenames starting with a dot. Closes: #515540
2009-03-15Dpkg::Version::check_version() should not die by defaultRaphael Hertzog5-13/+3
Add a new parameter to Dpkg::Version::check_version() to control whether we should die in case of illegal version. Update all check_version() calls to pass this parameter and factorize some duplicate calls in Dpkg::Source::Package::* with a single check in the parent class Dpkg::Source::Package.
2009-03-09dpkg-source: add --skip-debianization extract optionRaphael Hertzog3-4/+21
Extracting a source package with --skip-debianization can be interesting when you want to import a source package in a VCS and want to import the upstream sources without having precise knowledge of the internals of all source package formats. This option is only supported for the source formats "1.0", "2.0" and "3.0 (quilt)" that handle clearly identified upstream sources.
2009-03-09dpkg-source(1): document format of debian/source/* filesRaphael Hertzog1-1/+1
Also fix parsing of debian/source/include-binaries to ignore empty lines in Dpkg::Source::Package::V2::do_build().
2009-03-08dpkg-source: call quilt only once to apply all patchesRaphael Hertzog1-18/+27
Refactor Dpkg::Source::Package::V3::quilt::apply_patches() to call quilt only once (quilt push -a -q) instead of once per package. This dramatically improves performance for packages like glibc that have a large number of patches.
2009-02-03Merge branch 'lenny' (through tag '1.14.25')Guillem Jover1-1/+6
Conflicts: ChangeLog configure.ac debian/changelog po/es.po po/ja.po po/ko.po po/pt.po po/ro.po
2008-12-09Mark strings for translationGuillem Jover1-1/+2
2008-12-09Improve internerr output messages and print the invalid valueGuillem Jover1-1/+1
2008-12-09scripts: Do not mark internerr strings for translationGuillem Jover1-1/+1
2008-12-09Properly use internerr to report about programming bugsGuillem Jover5-11/+12
Use internerr for internal error conditions which happen only due to programming bugs and should never occur, otherwise the code is wrong and should be fixed.
2008-12-09Dpkg::ErrorHandling: Replace failure calls with error or syserrGuillem Jover1-1/+1
There's no point in a different failure vs error or syserr function, so let's remove it.
2008-12-09Dpkg::ErrorHandling: Export public functions by defaultGuillem Jover13-13/+13
The remaining non exported functions and variables need to, either disappear, move to some better place, be renamed, or for variables to get hidden through a getter/setter.
2008-12-05dpkg-source -x: create temporary directory next to the target placeRaphael Hertzog1-1/+6
* scripts/Dpkg/Source/Archive.pm (extract): Do not create the temp directory in the current directory but in the parent directory of the target directory. Otherwise the code would fail when called from a non-writable dir and rename could fail due to filesystem boundaries beetwen the current dir and the target one.
2008-11-19dpkg-source: fix to support POSIXLY_CORRECT=1Raphael Hertzog1-2/+2
* scripts/Dpkg/Source/Functions.pm (fixperms): Fix chmod call to also work when POSIXLY_CORRECT is set.
2008-09-05Merge lenny branch up to commit '1.14.22'Raphael Hertzog2-1/+5
Conflicts: configure.ac debian/changelog man/ChangeLog man/po/sv.po po/sv.po
2008-08-29dpkg-source/2.0 and 3.0 (quilt): fix perms of automatic patchRaphael Hertzog1-1/+3
* scripts/Dpkg/Source/Package/V2.pm (do_build): Change permissions of the automatically generated patch which is initially created 0600 with tempfile().
2008-08-29dpkg-source/3.0 (quilt): always provide valid name in QUILT_SERIESRaphael Hertzog1-0/+2
* scripts/Dpkg/Source/Package/V3/quilt.pm: run_quilt() can be run when no quilt series file exist yet. In that case we have to provide the name of the series file that we want to create (as the quilt command might create it). Up to now File::Spec->rel2abs(undef) returned the name of the current directory and we improperly used that as value of QUILT_SERIES. This regression has been introduced in 1.14.21 while trying to to force usage of a specific series file by setting QUILT_SERIEs.
2008-08-26Merge branch 'lenny' (through tag '1.14.21')Guillem Jover2-6/+16
Conflicts: ChangeLog configure.ac debian/changelog lib/fields.c man/ChangeLog man/dpkg-buildpackage.1 man/po/de.po man/po/dpkg-man.pot man/po/es.po man/po/fr.po man/po/hu.po man/po/ja.po man/po/pl.po man/po/pt_BR.po man/po/ru.po man/po/sv.po po/ChangeLog po/ja.po po/ko.po po/ro.po src/main.c
2008-08-15dpkg-source: don't use -i/-I by default for "1.0" source packagesRaphael Hertzog1-5/+10
* Dpkg/Source/Package.pm (new): Call init_options() only if initialize() has been called as it's supposed to be called only after the object has been upgraded to its target type. (init_options): add a comment that explains that this function is not called by Dpkg::Source::Package::V1::init_options() and render the function more robust.
2008-06-30Switch to use UTF-8 copyright symbol and add missing onesGuillem Jover10-10/+10
Some 'Copyright <year>' entries didn't have a copyright symbol. Add it and switch the rest from '(C)' to '©', but we don't do this on program output which for now should remain pure ascii.
2008-06-23dpkg-source: new option --require-valid-signatureRaphael Hertzog1-13/+26
* scripts/dpkg-source.pl: New option --require-valid-signature. * scripts/Dpkg/Source/Package.pm (check_signature): Updated to use Dpkg::IPC and to implement the checks related to --require-valid-signature. * man/dpkg-source.1: Document the new option.
2008-06-21dpkg-source/3.0 (quilt): let quilt use non-standard series fileRaphael Hertzog1-1/+6
* scripts/Dpkg/Source/Package/V3/quilt.pm: Define QUILT_SERIES when running quilt in order to be able to use quilt series with non-standard names (like debian.series or ubuntu.series).
2008-06-21Building blocks for vendor-specific build of Debian packagesRaphael Hertzog1-3/+3
* scripts/Dpkg/Vendor.pm: Provide simple parser for vendor-specific information stored in /etc/dpkg/origins/. The current vendor can be identified through get_current_vendor() and get_vendor_info() retrieves the information stores within those files. * scripts/dpkg-buildpackage.pl: Setup the DEB_VENDOR environment variable if possible. * man/dpkg-buildpackage.1: Document the above changes. * scripts/Dpkg/Source/Package/V3/quilt.pm (get_series_file): Use get_current_vendor() to decide the name of the vendor-specific series file that should be used in priority.
2008-06-18Merge lenny branch (through the tag '1.14.20')Raphael Hertzog4-94/+203
Conflicts: ChangeLog configure.ac debian/changelog man/ChangeLog man/dpkg.1 man/po/de.po
2008-06-09dpkg-source: Add '.hgignore' to the default -i regex and -I patternGuillem Jover1-1/+2
Closes: #485365
2008-06-09dpkg-source: be less strict on filenames accepted in patchesRaphael Hertzog1-17/+25
* scripts/Dpkg/Source/Patch.pm (analyze): Be less strict in filenames accepted on ---/+++ lines. Don't blow up on absolute filenames if the other one is fine. Make sure to use the one that is relative and that corresponds to a real file when possible.
2008-06-09dpkg-source/3.0 (quilt): use absolute path names with quiltRaphael Hertzog1-2/+10
* scripts/Dpkg/Source/Package/V3/quilt.pm: Use absolute path names when giving directories and filenames to quilt to avoid any problems due to quilt's feature of trying relative paths in parent directories too.
2008-06-07dpkg-source: accept patches with missing context at the endRaphael Hertzog1-1/+6
* scripts/Dpkg/Source/Patch.pm (analyze): Accept unexpected end-of-file in patches if we're missing no more than 2 lines of context. Output a warning instead.
2008-06-07dpkg-source/3.0 (quilt): better registration of the automatic patchRaphael Hertzog1-6/+12
* scripts/Dpkg/Source/Package/V3/quilt.pm (register_autopatch): Register the newly created patch with quilt only if quilt has already been used to apply the existing patches (or if we don't have any patch yet), otherwise register it manually at the end of the series.
2008-06-07dpkg-source/3.0 (quilt): allow /dev/null in automatic patchRaphael Hertzog2-1/+6
* scripts/Dpkg/Source/Patch.pm (add_diff_directory): If option use_dev_null is set, then the label of the "old" file will be '/dev/null' if we're creating a new file (instead of using the name of the created file, like it's currently done in .diff of version "1.0" source packages). * scripts/Dpkg/Source/Package/V2.pm (prepare_build): Use the new option "use_dev_null" when creating the automatic patch.
2008-06-07dpkg-source/3.0 (quilt): bugfix in parser of series fileRaphael Hertzog1-1/+1
* scripts/Dpkg/Source/Package/V3/quilt.pm (get_patches): Really skip all comments in the series files.
2008-06-07dpkg-source: improve the patch parserRaphael Hertzog1-20/+35
* scripts/Dpkg/Source/Patch.pm (analyze): Enhance function to parse correctly many more patches that are accepted by the patch utility itself: - ignore/strip carriage return of patches with Windows end of lines - accept empty lines as contextual lines (instead of the expected " ") - accept spaces as separator between filename and timestamp if there's no tab - accept a name that differs on the +++ line if the name in --- is correct, and use the name in +++ if this one exists while the one on --- doesn't.
2008-05-28dpkg-source: make sure the source package format is respectedRaphael Hertzog1-0/+10
* 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.