summaryrefslogtreecommitdiff
path: root/scripts/dpkg-source.pl
AgeCommit message (Collapse)AuthorFilesLines
2019-11-26dpkg-source: Remove backwards compatibility code for legacy build-profilesGuillem Jover1-7/+0
2019-01-15dpkg-source: Stop filtering @builddeps@ from Testsuite-Triggers fieldGuillem Jover1-2/+2
Filtering this meta-variable means that code parsing the field is unable to know whether the source specified the build dependencies as relevant for retriggering. We should also not expand the meta-variable as that would lose information, so we let it through now. Closes: #910734
2019-01-15dpkg-source: Use new format argument for Dpkg::Source::Package->new()Guillem Jover1-8/+4
This makes the creation of the object more compact and easier to read.
2019-01-15dpkg-source: Move source format selection earlier in the buildGuillem Jover1-19/+20
This move it at the beginning were it belongs, as the later code can change behavior based on the format selected. This also will make it possible to delegate the source format object selection to the Dpkg::Source::Package class.
2019-01-15Dpkg::Source::Package, dpkg-source: Switch to new Dpkg::Source::Format moduleGuillem Jover1-8/+4
This move all ad-hoc code to use the new Dpkg::Source::Format module.
2018-09-18perl: Replace all calls to Cwd::cwd with Cwd::getcwdJosh Triplett1-1/+1
The former calls /bin/pwd, while the latter uses the getcwd() syscall directly. Signed-off-by: Guillem Jover <guillem@debian.org>
2018-05-04dpkg-source: Do not emit perl warnings on source formats w/o optionsGuillem Jover1-0/+1
At least the format "3.0 (native)" supports no format specific options, which makes the describe_cmdline_options() return an empty list.
2017-10-12scripts: Add support for source package Description and substvarsGuillem Jover1-1/+1
We support a new source package Description field in debian/control that will be copied into the .dsc file. The field will also be used to initialize the new source:Synopsis and source:Extended-Description substvars that will be available when generating the DEBIAN/control and .changes files. Closes: #555743
2017-09-24scripts: Use split() with ' ' instead of /\s+/Guillem Jover1-1/+1
2017-07-04dpkg-source: Remove unused Dpkg::Index module importGuillem Jover1-1/+0
2017-05-20Dpkg::Util: Remove and replace with core module List::UtilGuillem Jover1-1/+1
Our current minimal Perl version contains a new enough List::Util module implementing none and any, and several other functions.
2017-02-20dpkg-source: Document --before-build and --after-build in --help outputGuillem Jover1-0/+2
2017-01-29Revert "dpkg-source: Generate Testsuite-Restrictions fields from test ↵Guillem Jover1-17/+0
restrictions" This reverts commit 9899bdcf9bde76d969b124abf0a898fcbb202c70. This change is contentious and should have been discussed more widely. Given that this has been live only for a couple of days, the impact should be minimal, but still something to take into account once and if this gets reintroduced, in the same or different form and shape. Closes: #852820
2017-01-25dpkg-source: Generate Testsuite-Restrictions fields from test restrictionsGuillem Jover1-0/+17
This information is currently only available in the Restrictions field in the debian/tests/control file. When dispatching tests, it might be inconvenient to have to download and unpack the source package beforehand. Let's expose this via the .dsc in a similar way we do for the Testsuite-Triggers field. Closes: #847926 Based-on-patch-by: Iain Lane <laney@debian.org>
2017-01-25dpkg-source: Refactor testsuite functionsGuillem Jover1-11/+9
Call set_testsuite_triggers_field() from inside set_testsuite_fields(), so that we do not have to perform the same checks more than once.
2017-01-23dpkg-buildpackage, dpkg-source: Always set SOURCE_DATE_EPOCHGuillem Jover1-1/+1
If we do not have a date from the changelog set it to the current time. Closes: #849081
2017-01-22Dpkg::Arch: Add new import tagsGuillem Jover1-1/+1
This makes using the module a bit easier.
2016-10-30dpkg-source: Make the program reproducible when run standaloneGuillem Jover1-0/+3
Running dpkg-source directly is more common than running dpkg-deb directly. In addition dpkg-source needs to parse the changelog anyway, something that dpkg-deb does not need nor, in any case, has an easy way to do currently. So let's make it generate reproducible source by default.
2016-07-03dpkg-source: Add new --no-overwrite-dir extraction optionGuillem Jover1-0/+4
Closes: #826334
2016-07-03dpkg-source: Generate Testsuite-Triggers field from test dependenciesGuillem Jover1-0/+31
Sometimes autopkgtests regress due to change in a package which is only a test dependency (Depends: in debian/tests/control), not a build or binary one. It is useful to trigger a test if such a test dependency changes. Record the union of all test dependency packages in a new Testsuite-Triggers field in the .dsc, so that they will be recorded in the Sources package index. Ignore versions and flatten OR dependencies as they are not interesting for determining reverse test dependencies and should not be (ab)used for replacing debian/tests/control parsing. Closes: #779559 LP: #1491145 Based-on-patch-by: Martin Pitt <martin.pitt@ubuntu.com> Signed-off-by: Guillem Jover <guillem@debian.org>
2016-07-03dpkg-source: Check that debian/tests/control is a regular fileGuillem Jover1-0/+2
We are parsing the file now, so make sure it's something we can actually work with.
2016-07-03dpkg-source: Move -q option to the General options section in --help outputGuillem Jover1-1/+1
2016-07-03dpkg-source: Document various long options in --help outputGuillem Jover1-4/+8
2016-05-09dpkg-source: Add new --require-strong-checksums option and change defaultGuillem Jover1-0/+5
Erroring out when no strong checksums are present is very harsh, as we do not even do something similar for invalid/unknown/expired signatures which means doing this for checksums has really no point. Add a new command-line option to force the behavior to be strict, and change to a warning. Regression introduced in commit 040973c7a1e50b78ef042ef5ffbfff0440c24700. Closes: #823428 Reported-by: Niko Tyni <ntyni@debian.org>
2016-05-02dpkg-source: Use context gettext functions for "<none>" stringGuillem Jover1-2/+2
2016-05-02perl: Fix various perl critic regressionsGuillem Jover1-2/+2
2016-04-01scripts: Use new Dpkg::Arch functions to validate and parse architecturesGuillem Jover1-4/+3
Closes: #784808
2016-02-15dpkg-source: Add backend-specific --help options supportGuillem Jover1-3/+47
This will print source format specific options depending on the --format version specified.
2015-10-18Update Ian Jackson's email addressGuillem Jover1-1/+1
2015-08-03dpkg-source: Add an optional essential=yes key/value to Package-ListGuillem Jover1-0/+4
This makes this information available in the Sources package files, so that when bootstrapping a new architecture all Essential:yes packages are known in advance. Prompted-by: Helmut Grohne <helmut@subdivi.de>
2015-05-09dpkg-source: Remove stray whitespace in shebangGuillem Jover1-1/+1
Spotted-by: Justin F. Hallett <thesin@users.sf.net>
2015-04-10Consistently use proper quotation marks all over the placeGuillem Jover1-4/+4
That is "" or '', and not the unbalanced `' pair.
2015-03-30perl: Rework use and exporter declarationsGuillem Jover1-4/+4
Place 'use' strict and warnings first, then Exporter 'our' declarations, then Test module imports, then system module imports, then Dpkg module imports, then 'use' parent and overload pragmas, separated by a blank line for each block. Split each exported symbol declaration into its own line to ease modifications.
2015-01-28Dpkg: Use shift instead of @_ on single argument unpackingGuillem Jover1-1/+1
2015-01-28scripts: Rename and deprecate _g function with g_Guillem Jover1-39/+39
The old function name was inconsistent with the other gettext family of short aliases which has already caused some code typos, and functions starting with underscore are considered by convention private in Perl.
2014-10-25dpkg-source: Error out on obsolete Build-Profiles syntaxGuillem Jover1-8/+3
Switch the warning into an error, and stop doing the backward compatibility mapping now that only doxygen is using the obsolete syntax.
2014-10-06dpkg-source: Rework command parsing and add --build and --extract aliasesGuillem Jover1-34/+39
This uses the long command names w/o the -- to select the actions to take, rewords some usage error messages to be more generic and maintainable (by not listing each command supported), and add the long aliases for the most common commands.
2014-10-06scripts: Unpack arguments instead of accessing @_ directlyGuillem Jover1-1/+3
Addresses Subroutines::RequireArgUnpacking. Warned-by: perlcritic
2014-10-06scripts: Update restriction formula syntaxJohannes Schauer1-2/+25
- The restriction list parsing now reflects the changes at <https://wiki.debian.org/BuildProfileSpec> which were agreed upon in the bootstrap sprint 2014 in Paris. - Restriction lists are now restriction formulas. - Restriction formulas are given in disjunctive normal form expression: pkg <bar baz> <blub> - Removal of the implicit prefix/namespace mechanic. - Since there can be more than one <> block, the regex in parse_string() in Dpkg::Deps is now greedy. - Construct the profiles entry of the Packages-List field by converting the "<bar baz> <blub>" syntax into "bar,baz+blub". - Include a temporary compatibility mapping for the old way to write the Build-Profiles field in binary packages which can be removed once all affected source packages have moved to the new syntax. - Adjust testcases. Closes: #760158 [guillem@debian.org: - Add a warning when using the old syntax in dpkg-source. - Move comments before the regexes, not besides them in dpkg-source. - Change from an xnor to == in evaluate_restriction_formula(). - Move the Dpkg::Util import close to the other Dpkg imports. - Add test cases for the new parse_build_profiles() behavior. ] Signed-off-by: Guillem Jover <guillem@debian.org>
2014-08-09dpkg-source: Add --format an --ignore-bad-version to --help outputGuillem Jover1-1/+3
2014-08-09dpkg-source: Automatically add the Testsuite fieldGuillem Jover1-0/+19
This is a comma-separated field. The only currently known value for the field is autopkgtest, which requires the debian/tests/control file to be present, even if empty, otherwise it is a deb822-style file. Existing and unknown values will be preserved, and autopkgtest will be appended. If the autopkgtest value is present but there is no debian/tests/control file, then the value will be removed and a warning emitted.
2014-05-17scripts: Switch unused capturing groups to non-capturing onesGuillem Jover1-3/+3
These have better runtime performance, not that it matters in many of the instances here though. Addresses RegularExpressions::ProhibitUnusedCapture. Warned-by: perlcritic
2014-04-21dpkg-source: Add arch and profile information to Package-List fieldGuillem Jover1-1/+10
Add two new optional values to the Packages-List field, with architecture and build-profiles information. These values have the form «name=value1,value2», and might appear in any order after the mandatory values. This allows to run bootstrapping analysis over the Sources package indices. Requested-by: Johannes Schauer <j.schauer@email.de> Suggested-by: Raphaël Hertzog <hertzog@debian.org>
2014-04-21scripts: Add a space after commaGuillem Jover1-1/+1
2014-01-15dpkg-source: Set default compression options in source format specific modulesGuillem Jover1-5/+0
This paves the way to be able to set package format specific defaults, and fixes a problem with the default compression level on “3.0 (native)” packages, as it was being set in dpkg-source but not reset when the compressor was changed. Closes: #733326
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2013-12-05dpkg-source: Update default diff ignore regex on --extend-diff-ignoreGuillem Jover1-0/+2
The Dpkg::Source::Package formats >= V2, expect an updated default diff ignore regex when --extend-diff-ignore is used, for example in the debian/source/options file, but no --diff-ignore argument is passed. This partially reverts commit 1cccaf0d0c509f9ac77f5448a0573e2d1c9c1ae4, which introduced this regression.
2013-12-04perl: Switch to use low precedence boolean operators for error checksGuillem Jover1-4/+4
This will make it safe to remove parenthesis around builtins.
2013-11-24Dpkg::Source::Package: Deprecate public package variablesGuillem Jover1-5/+6
Replace direct usage of $diff_ignore_default_regexp and @tar_ignore_default_pattern with accessor functions. Addresses Variables::ProhibitPackageVars. Warned-by: perlcritic
2013-11-24dpkg-source: Do not modify $diff_ignore_default_regexp package variableGuillem Jover1-2/+3
This is the default, only change scoped variables, this will help in further refactoring, and so that we get a correct default on --help.