summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16spec/R³: Rename DPKG_GAIN_ROOT_CMD to DEB_GAIN_ROOT_CMDGuillem Jover1-1/+3
This variable should not be dpkg specific, as it is supposed to be set by any builder driving the package build, and not just dpkg itself. Introduce ephemereal backwards compatibility by mapping the old name to the new one, even thught there are no known users.
2018-01-16dpkg-gensymbols: Print "error" instead of "warning" when these are fatalGuillem Jover1-12/+19
It's confusing to emit the compare problems as warnings when they cause the program to exit with an error exit code. Closes: #881488
2018-01-16Dpkg::Vendor::Debian: Mark hurd-i386 as having built-in PIE supportGuillem Jover1-1/+1
Requested-by: Samuel Thibault <sthibault@debian.org>
2018-01-16arch: Add support for riscv64 CPUManuel A. Fernandez Montecelo1-2/+2
[guillem@debian.org: - Update unit-tests. ] Closes: #822914 Stable-Candidate: 1.18.x Signed-off-by: Guillem Jover <guillem@debian.org>
2018-01-16scripts: Reject negated values in Architecture fieldGuillem Jover4-10/+33
Add new positive options argument to arch validators, as the Architecture field should not accept negated architectures. We preserve the current functions default behavior and add a new option to control whether to reject negated architectures. Fixes: commit d355b340f3a6cde7fc1cb5649d82fbebd3b97ea1 Stable-Candidate: 1.18.x
2018-01-16scripts/mk: Add new buildtools variablesGuillem Jover3-0/+35
This adds support for AS, STRIP, OBJCOPY, OBJDUMP, NM, AR and RANLIB. Prompted-by: Helmut Grohne <helmut@subdivi.de>
2018-01-16Dpkg::Shlibs::SymbolFile: Check that $state->{seen} exists instead of $state ↵Dmitry Shachnev1-1/+1
being defined Fixes: commit 0d2b3cee25b74dd3fd9ddc3a469b8b144368c963 Closes: #880166 Signed-off-by: Guillem Jover <guillem@debian.org>
2018-01-16test: Infer automatically the unit test temp directoryGuillem Jover7-16/+23
Add new test_get_temp_path() function, and replace all hardcoded settings of the temporary directory and its creation.
2018-01-16test: Infer automatically the unit test data directoryGuillem Jover14-15/+31
We can easily know the name of the calling unit test, and can thus infer the pathname for the data directory, instead of having to duplicate the name, and potentially ending with it being out of sync.
2018-01-16test: Consider *.PL also to be perl filesGuillem Jover1-1/+1
2018-01-16Dpkg::Changelog: Print versions for incorrect changelog range warningsPaul Wise1-9/+9
Within scripts operating on lots of different package changelogs, this can help track down where these warnings come from. Signed-off-by: Guillem Jover <guillem@debian.org>
2018-01-16Dpkg::Vendor::Debian: Use proper use_feature keyGuillem Jover1-1/+1
We need to access the features within the feature area hash now. Missed in a previous refactoring. Fixes: commit 2125e8dd7388e2adb9b6c837f4832fe8f0f63b25 Reported-by: Mattia Rizzolo <mattia@debian.org> (on IRC) Closes: #881051
2017-11-19Fix crle-related codeIgor Pashev1-1/+1
2017-11-19Merge git://anonscm.debian.org/dpkg/dpkgIgor Pashev173-6169/+15273
2017-10-22dpkg-maintscript-helper: Add color supportGuillem Jover1-4/+60
The initial color support only covered the C and perl programs, and missed this shell script.
2017-10-21Dpkg::Source::Package::V1: Check that $tarname is defined before useChristoph Biedl1-1/+1
Closes: #879124 Warned-by: perl Signed-off-by: Guillem Jover <guillem@debian.org>
2017-10-21dpkg-buildpackage: Setup and check rootcommand only if neededGuillem Jover1-20/+26
When building in R³ mode or when the user requested to run a rule as root we should setup the rootcommand, otherwise we should ignore it. Reported-by: Niels Thykier <niels@thykier.net>
2017-10-21dpkg-buildpackage: Run dpkg-source from the current directoryGuillem Jover1-13/+3
It used to be the case that dpkg-source did not support running from the current directory. That got fixed in commit a7f16be86689ee46f4b2e445e5f08a63f447cdeb. Which means we can simplify the code.
2017-10-21dpkg-buildpackage: Pass the debian/control source stanza to R³ parserGuillem Jover1-1/+1
This meant the field was being ignored.
2017-10-18dpkg-buildpackage: Do not rehash .dsc file when signing binary-only buildsGuillem Jover1-2/+4
Reported-by: Ximin Luo <infinity0@debian.org> Stable-Candidate: 1.18.x
2017-10-18dpkg-buildpackage: Fix logic to decide whether to call the build targetsGuillem Jover1-2/+2
The build targets never require root, so checking them will always return false. We need to key on the binary target instead. This broke tons of packages that are violating Debian policy MUSTs. Thanks-to: James Clarke <jrtc27@debian.org> Closes: #878899
2017-10-17Update German scripts translationHelge Kreutzmann1-34/+16
Update to 599t.
2017-10-17scripts/t: Skip Dpkg::OpenPGP test if gpg is not presentGuillem Jover1-5/+7
2017-10-17po: Regenerate .pot files and merge .po files with themGuillem Jover8-220/+875
2017-10-17Dpkg::Getopt: Do not normalize args past a passthrough stop wordGuillem Jover4-10/+18
Some commands pass some arguments through to another command, and those must not be normalized as that might break their invocation. Reported-by: Helmut Grohne <helmut@subdivi.de> Stable-Candidate: 1.17.x 1.18.x
2017-10-17Dpkg::Deps: Do not unnecessarily require setting the host_archGuillem Jover1-7/+11
If we are not reducing the architectures, or we are not going to use the known facts, we do not need to know and set the host architecture, which relies on gcc being present. Closes: #856396
2017-10-17Dpkg::Arch: Do not emit a perl warning if gcc or dpkg is not foundGuillem Jover1-0/+4
We are emitting options or errors elsewhere.
2017-10-17Dpkg::ErrorHandling: Unify subprocess errors with the ones from libdpkgGuillem Jover1-3/+5
2017-10-17Dpkg::Source::Package: Call source format prerequisites method if presentGuillem Jover3-2/+3
We want to be able to check for prerequisites when loading the source format module. That function used to be called import, which is a misnomer here, and was not being invoked. Rename it to the more appropriate prerequisites() and call it if it's present from the module loading code. Addresses: #877688
2017-10-17Dpkg::Source::Package::V3: Use find_command() instead of ad-hoc codeGuillem Jover2-10/+4
2017-10-17Dpkg::Source::Package: Auto-convert binary signatures to OpenPGP ASCII ArmorGuillem Jover9-0/+169
When we are building a source package, if we find a binary signature in the form of a .sig file, we should try to auto-convert it to the format that we expect to include in the source package, which is an OpenPGP ASCII Armor.
2017-10-16Dpkg::Control::HashCore: Optimize field/value parsing in parse()Guillem Jover1-2/+3
We switch from a capturing regex to split() plus a checking regex.
2017-10-16Dpkg::Control::HashCore: Optimize first character matching in parse()Guillem Jover1-2/+4
We store the first character in a variable.
2017-10-16Dpkg::Control::HashCore: Optimize trailing space trimming in parse()Guillem Jover1-1/+1
We should only apply the "costly" substitution when there is at least one whitespace.
2017-10-16Dpkg::Control::HashCore: Optimize trailing space matching on parse()Guillem Jover1-6/+10
We remove the trailing space after the chomp, so that we cover the common case of a single \n with chomp, and do not need to check for trailing spaces more than once while parsing. We preserve the chomp'ed string to be used for the Armor Header checks, which have a different set of allowed whitespace, than what \s covers.
2017-10-16Dpkg::Control::HashCore: Expect stanza delimiters more often than Armor HeadersGuillem Jover1-10/+10
Usually we will just have Armor Headers at the beginning and end of the data, so it's more common to find stanza delimiter lines. Optimize for that.
2017-10-16Dpkg::Control::HashCore: Do not use an intermediate variable in STORE methodGuillem Jover1-2/+1
2017-10-16scripts/mk: Add new buildtools.mk supportGuillem Jover6-2/+113
This make fragment contains setup for build tool variables for both TOOL and TOOL_FOR_BUILD. It does not get included by default from default.mk
2017-10-13dpkg-buildflags: Add support for new future feature areaGuillem Jover2-3/+18
This new area includes an lfs feature, to be used instead of the getconf(1) interfaces which cannot support cross-building.
2017-10-13Dpkg::Arch: Add new debarch_to_cpubits() functionGuillem Jover1-0/+13
2017-10-12scripts: Rename debarch_to_cpuattrs() to debarch_to_abiattrs()Guillem Jover4-12/+12
2017-10-12Dpkg::Vendor::Debian: Merge build flag methods into a single private methodGuillem Jover1-119/+98
This reduces code redundancy, and makes it possible to reuse common code for various feature areas.
2017-10-12scripts: Add support for source package Description and substvarsGuillem Jover6-12/+45
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-10-12dpkg-genchanges: Honor substvars in Description fieldGuillem Jover1-0/+1
This field can have substvars applied in the binary package, so it is a safe replacement compared to all other output fields. More so with the newly introduced S:<source-field> style automatic substvars. Closes: #856547
2017-10-12Dpkg::Vendor::Debian: Mark powerpc as having builtin PIEGuillem Jover1-1/+1
2017-10-12dpkg-genbuildinfo: Add support for new Build-Kernel-Version fieldGuillem Jover3-5/+18
Packages intended to be built in a generic way must never rely on the currently running kernel on the build system (an exception could be an optimization rebuild using the current system as the reference baseline). But to be able to detect when a package might not be reproducible due to varying kernel information it is still useful to be able to record this information. Although that information can be very sensitive. When the builder has explicitly enabled the Build-Kernel-Version field with the new dpkg-genbuildinfo --always-include-kernel option, it will get included in the generated .buildinfo file. Closes: #873937
2017-09-25Update German scripts translationHelge Kreutzmann1-24/+55
Update to 594t.
2017-09-24scripts: Fix function signatures documentationGuillem Jover2-11/+11
2017-09-24dpkg-buildflags: Add new --query commandGuillem Jover1-5/+37
This command is equivalent to --status but in deb822 format.
2017-09-24dpkg-buildpackage: Add support for rootless buildsGuillem Jover2-13/+92
Implement the rootless-builds specification, by honoring the Rules-Requires-Root (R³) field.