summaryrefslogtreecommitdiff
path: root/scripts/dpkg-source.pl
AgeCommit message (Collapse)AuthorFilesLines
2009-09-19Drop Dpkg::Fields and convert everything to Dpkg::Control::FieldsRaphaël Hertzog1-20/+7
2009-09-19Get rid of Dpkg::Deps @src_dep_fields @pkg_dep_fields and %dep_field_typeRaphaël Hertzog1-2/+2
Update all modules and scripts to not use those variables of Dpkg::Deps but instead the two functions field_list_(pkg|src)_dep() of Dpkg::Control::Fields.
2009-09-19Replace old capit() by field_capitalize() everywhereRaphaël Hertzog1-2/+3
capit() is provided by Dpkg::Fields while field_capitalize() is part of the new Dpkg::Control::Fields API.
2009-09-16Rename Dpkg::Control in Dpkg::Control::InfoRaphaël Hertzog1-2/+2
Update all scripts and modules to use the new module names.
2009-08-16dpkg-source/dpkg-genchanges: split long Binary: field valuesRaphael Hertzog1-0/+2
2009-06-26libdpkg-perl: Move unknown() from Dpkg::ErrorHandling to Dpkg::FieldsGuillem Jover1-2/+2
2009-06-26Dpkg::ErrorHandling: Explicitly pass field argument to unknown()Guillem Jover1-3/+3
2009-06-15Dpkg::ErrorHandling: Add new report_options()Guillem Jover1-2/+2
Set report options via this new function instead of directly exporting private variables.
2009-06-15dpkg-source: Use default compressor values from Dpkg::Source::CompressorGuillem Jover1-6/+7
2009-05-19dpkg-source: Do not state in --help there is a default substvar fileGuillem Jover1-1/+1
2009-05-19Remove deprecated status for substvars in dpkg-source and dpkg-genchangesGuillem Jover1-2/+0
Even if there's no use at all for substvars or they are (currently) undesirable making the source not easily reproducible for Debian and most derivatives using the same build processesor, it might be interesting for uses like templated source package generation and similar, or other interesting ideas we might not have thought about. Also the same logic we applied for the removal of the substvar support could be applied to most of the “Build options” as well, as those do not make sense in the normal build for official packages (like -U, or -D). Changed the code to stop producing warnings, and remove deprecated notes from man page.
2009-05-02dpkg-source: do not set arch:any in dsc on arch-restricted packagesPhilipp Kern1-23/+20
dpkg-source was pretty liberal in setting 'Architecture: any' in the dsc: as soon as there are two binary packages, one being arch:all and one being arch-restricted, you get arch:any in the dsc. This is incorrect because the package will only build on the autobuilders if there are architecture-dependent binary packages available. Thus this patch only produces arch:any if at least one binary package specifies it. Otherwise it outputs the set of all binary architectures (including arch:all). Closes: #526617 Signed-off-by: Philipp Kern <pkern@debian.org>
2009-03-15dpkg-source: switch to standard info() function for outputRaphael Hertzog1-5/+1
All buildd should use an updated sbuild by now, we can update the format of dpkg-source's output without problems.
2009-03-15Dpkg::Version::check_version() should not die by defaultRaphael Hertzog1-1/+1
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: drop support of debian/control's Format fieldRaphael Hertzog1-4/+2
There are no interesting use case where it makes sense to hardcode the source format directly in debian/control. So drop that feature before people start abusing this field instead of using debian/source/format (which dpkg-source can have to create in some cases).
2009-02-05New framework to hook vendor-specific logicRaphael Hertzog1-0/+2
* scripts/Dpkg/Vendor/Default.pm: Generic vendor object that will be used to hook vendor-specific behaviour in multiple places. * scripts/Dpkg/Vendor/Debian.pm: Debian variant of that object. * scripts/Dpkg/Vendor.pm (get_vendor_object, run_vendor_hook): New functions to retrieve the current vendor object and run vendor-specific code. * scripts/dpkg-source.pl, scripts/dpkg-genchanges.pl: Add first vendor hooks to be used by Ubuntu. * scripts/Makefile.am (EXTRA_DIST): Add 'scripts/Dpkg/Vendor/Default.pm' and 'scripts/Dpkg/Vendor/Debian.pm'.
2008-12-09Fix some “use Dpkg::ErrorHandling qw(…)” callsRaphael Hertzog1-1/+1
* scripts/Dpkg/Changelog.pm, scripts/dpkg-buildpackage.pl, scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl: Also import the default exported functions of Dpkg::ErrorHandling and not only the unusual ones.
2008-12-09Dpkg::ErrorHandling: Export public functions by defaultGuillem Jover1-2/+1
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-06-23dpkg-source: new option --require-valid-signatureRaphael Hertzog1-3/+10
* 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-05-28dpkg-source: make sure the source package format is respectedRaphael Hertzog1-3/+16
* 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.
2008-03-19dpkg-source: keep the old output for tools that parse the directoryRaphael Hertzog1-1/+5
* 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.
2008-03-16Use default ignore rules for source package with format >> 1.0Raphael Hertzog1-54/+4
* 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 Hertzog1-36/+31
* 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-16Each source package format can have its own command line optionsRaphael Hertzog1-23/+16
* 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-14Merge branch 'master' into sourcev3Raphael Hertzog1-2/+2
2008-03-06Rename DSP::V1_0::native to DSP::V3_0::nativeRaphael Hertzog1-1/+1
* 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-02Preserve the order of dependencies and build-dependenciesRaphael Hertzog1-2/+2
* 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.
2008-03-01Create Dpkg::Source::Package::V1_0::nativeRaphael Hertzog1-1/+1
* 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 Hertzog1-12/+16
* 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-02-28* scripts/dpkg-source.pl: remove trailing slash on user-supplied directoriesRaphael Hertzog1-3/+3
2008-02-24dpkg-source: use the new Dpkg::Source::Package objectRaphael Hertzog1-750/+175
* 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...
2008-02-22Rename Dpkg::Source::Archiver to Dpkg::Source::ArchiveRaphael Hertzog1-4/+4
2008-02-22Dpkg::Source::Patch gains last features from dpkg-sourceRaphael Hertzog1-160/+5
* scripts/Dpkg/Source/Patch.pm: New analyze() function that replaces dpkg-source's checkdiff(). Check sanity of patch, and reports directories to create and list of patched files. * scripts/Dpkg/Source/Patch.pm (apply): Create required directories on the fly and adjust timestamp of patched files. This behaviour is configurable. * scripts/dpkg-source.pl: Adjust accordingly. * scripts/Dpkg/Source/Patch.pm (add_diff_file): Support new option include_timestamp.
2008-02-22Dpkg::Source::Archiver/Patch: Rename close() methods into finish()Raphael Hertzog1-2/+2
* scripts/Dpkg/Source/Archiver.pm: Rename close() method into finish() to avoid ambiguity with CORE::close(). * scripts/Dpkg/Source/Patch.pm: Same. * scripts/dpkg-source.pl: Updated accordingly.
2008-02-22Dpkg::Source::Patch: New module to generate and apply patchesRaphael Hertzog1-167/+10
* scripts/Dpkg/Source/Patch.pm: New module that is able to generate patches (between files or between directories). It's also able to apply patches. Built on CompressedFile, it handles compression/decompression of patches files on the fly. It still lack some functionalities of dpkg-source (patch analysis and pre-creation of new directories before patch application). * scripts/dpkg-source.pl: Replaced big chunks of the code by some usage of Dpkg::Source::Patch. More to come later. * scripts/Makefile.am, scripts/po/POTFILES.in: Register the new module file.
2008-02-21dpkg-source: more cleanupRaphael Hertzog1-68/+46
* scripts/dpkg-source.pl: Replace several implicit fork made with open() by fork_and_exec(). * scripts/dpkg-source.pl: Remove another chunk of unused code.
2008-02-21Create Dpkg::Source::CompressedFile as spinoff of Dpkg::Source::CompressorRaphael Hertzog1-8/+6
* scripts/Dpkg/Source/Compressor.pm: Drom from this object all filename related code and move it ... * scripts/Dpkg/Source/CompressedFile.pm: ...here. This object is a named file and it handles either explicit compression (call to set_compression()) or implicit compression (compression type is guessed from the filename). It offers open_for_write() and open_for_read() to write into/read from a data stream that is compressed/uncompressed on the fly. * scripts/Dpkg/Source/Archiver.pm: Make it based on CompressedFile and simplify code. * scripts/dpkg-source.pl: Adapt code to the new interface of the Compressor object. * scripts/Makefile.am, scripts/po/POTFILES.in: register new file CompressedFile.pm.
2008-02-20Dpkg::Source: don't handle the compression level explicitelyRaphael Hertzog1-56/+36
* scripts/Dpkg/Source/Archiver.pm: Drop set_compression_level() and always use the default compression level (from Dpkg::Source::Compressor). * scripts/Dpkg/Source/Compressor.pm: New set_default_compression() and set_default_compression_level() to change the default values of those parameters. * scripts/dpkg-source.pl: Change the default compression and the default compression level globally. Replace forkgzipread(), forkgzipwrite() and reapgzip() by direct usage of Dpkg::Source::Compressor in a way that it inherits the compression level automatically. Also simplify some subprocess execution by using Dpkg::IPC::fork_and_exec().
2008-02-17Merge commit 'origin/master' into sourcev3Frank Lichtenheld1-33/+31
Conflicts: scripts/dpkg-source.pl
2008-02-16Handling of compression level in dpkg-sourceRaphael Hertzog1-1/+2
* scripts/Dpkg/Source/Archiver.pm (create): Forward properly the compression level. * scripts/Dpkg/Source/Archiver.pm (extract): Correct parameters in an error message. * scripts/dpkg-source.pl: Take into account the compression level when generating a new tarball.
2008-02-16Dpkg::Source::Archiver: new module to work with tar archivesRaphael Hertzog1-117/+17
* scripts/Dpkg/Source/Archive.pm: New module handling tar archive creation and extraction. * scripts/dpkg-source.pl: Updated and simplified to use the new module. * scripts/Makefile.am: Add new modules to dist tarball. * scripts/po/POTFILES.in: Add new module in list of files to scan for translations.
2008-02-15Simplify Dpkg::Source::Compressor by using the extended fork_and_exec()Raphael Hertzog1-2/+6
* scripts/Dpkg/Source/Compressor.pm: Replace the multiple compress_* functions by a single compress() function that accepts the same parameters than fork_and_exec(). The exec parameter is replaced with the right compressor/decompressor invocation, and some other parameters have default values. Same for uncompress_* replaced by uncompress(). * scripts/dpkg-source.pl: Update accordingly to use the new syntax.
2008-02-15dpkg-source: removes some unused codeRaphael Hertzog1-227/+0
* scripts/dpkg-source.pl: Removes unused code to check tar files.
2008-02-15dpkg-source: use Dpkg::Source::CompressorRaphael Hertzog1-60/+12
* scripts/dpkg-source.pl (forkgzipread, forkgzipwrite): Change the functions to use the new Dpkg::Source::Compressor module.
2008-02-12Use new Dpkg::Checksums moduleFrank Lichtenheld1-33/+31
* scripts/dpkg-genchanges.pl, scripts/dpkg-source.pl: Use new Dpkg::Checksums module. Adds new 'Checksums-{Sha1,Sha256}' field to .changes and .dsc files. Increase changes format to 1.8.
2008-02-10Fix sourcev3 code to work with current dpkg-devFrank Lichtenheld1-16/+21
Use Dpkg::ErrorHandling and fix some other errors
2008-02-10Fix return value of loadvcsFrank Lichtenheld1-1/+2
* scripts/dpkg-source.pl (loadvcs): Don't return a true value if the require failed.
2008-02-10Merge commit 'origin/master' into v3Frank Lichtenheld1-4/+7
2008-01-27Deprecate support of substvars in dpkg-source and dpkg-genchangesRaphael Hertzog1-0/+1
2008-01-22Remove the IO layer ":utf8" that re-encodes in utf8Raphael Hertzog1-1/+1
* scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl: Remove the IO-layer that converts to UTF-8. It's not as smart as I expected.