summaryrefslogtreecommitdiff
path: root/scripts/t
AgeCommit message (Collapse)AuthorFilesLines
2017-01-27dpkg-genchanges: Include .buildinfo files also for source-only uploadsGuillem Jover1-0/+3
The .buildinfo file also makes sense on source-only uploads, because it is still a build. And more so when we have done a full build, but filtered the changes to only include the sources in the upload. In any case, this was the intended behavior from the beginning. Closes: #846164
2017-01-27test: Rename parse_option to parse_featuresGuillem Jover1-4/+4
Missed in commit dad593660d922abce634542b43e9d56b03228a8c.
2017-01-26Dpkg::BuildOptions: Add new parse_features() methodGuillem Jover1-1/+37
This has been refactored from Dpkg::Vendor::Debian, to have a generic option parser.
2017-01-25dpkg-source: Generate Testsuite-Restrictions fields from test restrictionsGuillem Jover2-1/+32
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-25test: Correctly iterate over all default and passed .dsc template substvarsGuillem Jover1-1/+1
The code was returning all keys and values for %default_substvars, when instead we should have been requesting all %default_substvars and %options keys.
2017-01-25test: Refactor unit test data path into test_get_data_path()Guillem Jover11-25/+27
2017-01-23libdpkg, Dpkg::Version: Do not allow empty epochs and revisionsGuillem Jover1-4/+12
When there's at least one colon or one dash, we should expect epoch and revision numbers.
2017-01-22doc: Fix typos in documentation and code commentsGuillem Jover1-1/+1
Warned-by: codespell, spellintian
2017-01-22Dpkg::Arch: Fix debwildcard_to_debtuple() on quadrupletsGuillem Jover1-22/+64
The function was splitting tuples at most into three elements, which made it unable to handle quadruplets. Extend the unit tests to cover wildcard quadruplets. Missed in commit 9d7ba99cc3ff84fc553ed39da9d2e4f4008d35b6. Reported-by: Julian Andres Klode <jak@debian.org>
2016-12-17libdpkg, Dpkg::Version: Reject empty upstream versionsGuillem Jover1-2/+9
These are not permitted by deb-version(5), but the code was letting those through.
2016-12-17Dpkg::Build::Info: Whitelist other DPKG_ namespaced variablesGuillem Jover1-1/+1
2016-11-16dpkg-genbuildinfo: Use deterministic .buildinfo filenamesGuillem Jover4-12/+12
Using undeterministic filenames based on the buildinfo-id produces ugly looking filenames, which get left behind when rebuilding the same source multiple times as they vary by date. There's really no great point in using unique filenames as they will end up with different contents depending on the builder.
2016-11-13Dpkg::Deps: Validate architecture arguments in deps_parse()Guillem Jover1-1/+20
This function only works with real and known Debian architectures. It will not work with wildcards, nor the special architectures 'all' nor 'source'. Validate the arguments and croak early on to spot bogus usage. Prompted-by: Johannes Schauer <josch@debian.org>
2016-11-11Dpkg::Build::Info: New module refactored from dpkg-genbuildinfoGuillem Jover1-0/+28
This will allow other projects to use the same whitelist as dpkg does. Requested-by: Johannes Schauer <josch@debian.org>
2016-11-09test: Do not fail on missing fakeroot just skip themGuillem Jover1-2/+6
2016-11-05Dpkg::Changelog: Cope gracefully with a missing trailer timestampGuillem Jover2-2/+14
The get_timepiece methods might return an undef value if there was no timestamp in the trailer. Do not call the Time::Piece epoch method in that case, as that causes a perl error. Regression introduced in commit ea22158eb8b0dcaf42b0cdacd5b4560764f353c8. Closes: #843248 Based-on-patch-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2016-11-03scripts: Add support for .buildinfo filesGuillem Jover4-0/+12
The .buildinfo files are a new type of control files, similar to the .changes files, meant to describe the environment of a build and its artifacts. They are meant to be added to the Debian archive to allow independent parties to reproduce a build and verify the result. Specifications for .buildinfo are available at: <https://wiki.debian.org/ReproducibleBuilds/BuildinfoSpecification> This patch adds support for .buildinfo files in Dpkg::Control, adds new .buildinfo fields to Dpkg::Control::Fields, a new builtin-system-build-paths Dpkg::Vendor hook, and adds a new script named dpkg-genbuildinfo, that will now be called by dpkg-buildpackage before generating the .changes file. [ntyni@debian.org: small changes. ] Closes: #138409 Based-on-patch-by: Jérémy Bobbio <lunar@debian.org> Signed-off-by: Guillem Jover <guillem@debian.org>
2016-11-03Dpkg::Dist::Files: Add new load_dir methodGuillem Jover3-1/+17
This method scans all fragment files inside a directory and loads each of them.
2016-10-31dpkg-architecture: Add new DEB_*_ARCH_ABI and DEB_*_ARCH_LIBC variablesGuillem Jover1-0/+6
2016-10-31arch: Internally represent architectures as quadrupletsGuillem Jover1-15/+15
This allows to detangle the libc used from the calling conventions.
2016-10-30scripts/t: Do not try to sign test packagesSven Joachim1-0/+1
If GnuPG is available in the build environment, dpkg-buildpackage will use it to sign the .dsc and .changes files which fails because there is no secret key for "Dpkg Developers <debian-dpkg@lists.debian.org>". Signed-off-by: Guillem Jover <guillem@debian.org>
2016-10-30scripts/t: Output STDERR when commands failGuillem Jover2-6/+15
Store the STDERR output and emit it as diag() output on exit failure. Also check the exit value for expected success. And do not abort on error from the dpkg-buildpackage command.
2016-10-30test: Delete MAKEFLAGS when testing make invocationsGuillem Jover1-1/+5
If the parent has been called with -jN then the MAKEFLAGS will contain information to be used by the jobserver, but those file descriptors are closed in the way, and make complains. As we are testing the makefiles serially anyway, just remove the MAKEFLAGS to get rid of the warnings.
2016-10-30scripts/t: Skip the tests if IO::String is not presentGuillem Jover2-5/+12
This makes this dependency optional.
2016-10-30data: Add support for AIX operating systemGuillem Jover1-1/+1
2016-10-30Dpkg: Add new Dpkg::PROGMAKE variable to store GNU make command nameGuillem Jover1-1/+2
2016-10-30Dpkg::Build::Type: Always map the build type to the shortest string formGuillem Jover2-5/+3
We should try to map to the shortest string to make life easier.
2016-10-30scripts/t: Add dpkg-buildpackage functional testsGuillem Jover7-0/+359
Taken from dpkg-tests functional test suite.
2016-10-30scripts/t: Add dpkg-source functional testsGuillem Jover5-0/+230
2016-07-03arch: Add TILE-Gx support to cputableHelmut Grohne1-1/+1
TILE-Gx is little endian 64-bit. Closes: #823167 Signed-off-by: Guillem Jover <guillem@debian.org>
2016-07-03test: Add unit tests for dependency simplification with build profilesGuillem Jover1-1/+22
2016-07-03test: Refactor common unit test checks for needed thingsGuillem Jover1-6/+3
2016-07-03Dpkg::Shlibs: Preserve order when prepending library pathsGuillem Jover1-8/+13
When using add_library_dir, the paths were prepended to the library paths and ended up being reversed from their insertion order. This causes weird behavior when using dpkg-shlibdeps -l option. Closes: #823805
2016-07-03Dpkg::Vendor::Debian: Support getting the build path from the environmentGuillem Jover1-0/+2
Having dpkg-buildflags change its output depending on its current working directory is not very friendly. We add a new environment variable to be able to specify it so that we can control the output. And use it from the test suite so make sure we always use the same path regardless of where we execute the makefile snippets from.
2016-07-03Dpkg::Deps: Arch qualifiers only imply one another if they are the sameGuillem Jover1-7/+14
Because we are handling dependencies in isolation, and the full context of the implications are only known when doing dependency resolution at run-time, we can only assert that they are implied if they are equal. Closes: #745366, #827628
2016-07-03Dpkg::Control: Add new autopkgtest control files supportGuillem Jover4-0/+102
Add new CTRL_TESTS control types, new Dpkg::Control::Tests and Dpkg::Control::Tests::Entry modules, add support for the fields that can appear on these control files, and update Dpkg::Index to handle them as well. [niels@thykier.net: Fix logic inversion. ]
2016-07-03Revert "Dpkg::Conf: Switch implementation to be hash based"Guillem Jover2-34/+35
This reverts commit 94e241761c06ab112ec3e899dd9449784928c6c5. This change broke backwards compatibility in multiple ways. The format_argv option was set by default, the order was not preserved, which was important for dpkg.cfg files, and duplicate option names stopped being supported. Add regression tests to avoid similar changes in the future. Closes: #824938
2016-07-03Dpkg::Changelog: Add new Timestamp field to outputGuillem Jover1-0/+4
This field contains the date of the entry in seconds since the epoch. To make it easier to retrieve the date in a format that is easier to handle.
2016-07-03Dpkg::Changelog: Add new format_range() methodGuillem Jover1-7/+9
Deprecate dpkg() and rfc822() methods by this new method, which has a more clear name and generic interface.
2016-05-09Dpkg::Deps: Add support for tests dependenciesGuillem Jover1-1/+9
These include package names with the usually invalid character ‘@’. Used when parsing debian/tests/control files.
2016-05-09Dpkg: Relax dependency restriction parsing to allow sloppy spacesGuillem Jover1-1/+13
Allow sloppy spaces again around versions, architectures and profile restrictions, so that we do not fail on previously accepted dependencies. Regression introduced in commit bd17966babf8705e8f02c808f646dfa149828256. Closes: #823431 Reported-by: Niko Tyni <ntyni@debian.org>
2016-05-02scripts: Add support for new --build option to define build typeGuillem Jover1-2/+13
This simplifies the way to select what to build, and makes it both easier to remember, and easier to deal with in the code. The current set of split single options are really a mess.
2016-05-02Dpkg::Build::Types: Allow disabling the checks in set_build_type()Guillem Jover1-1/+12
This makes it possible to test the different code paths.
2016-05-02Dpkg::Build::Types: Clarify build type functionsGuillem Jover1-8/+8
Distinguish build_has_any from build_has_all. Rename build_has_not into build_has_none. Fix scripts to use the correct bits check function.
2016-05-02Dpkg::Build::Types: Remove BUILD_SOURCE composite constantsGuillem Jover1-4/+5
These are very specialized and not used often, let's compose them from basic types when needed.
2016-04-01Dpkg::Conf: Switch implementation to be hash basedGuillem Jover1-23/+31
Store the options in a hash instead of a list so that we can more easily retrieve them. And add two accessors and an option to the filter method to control its behavior.
2016-04-01Dpkg::Checksums: Add strong digest marking supportGuillem Jover1-1/+2
This will make it possible to error out when a source package only contains no strong digests.
2016-04-01scripts/t: Use is() instead of ok() to test for undefGuillem Jover2-3/+3
2016-04-01Dpkg::Deps: Make the dependency parser more strictGuillem Jover1-1/+9
Do not allow obviously broken dependencies. Closes: #784806
2016-04-01Dpkg::Arch: Add new functions to validate and parse architecture namesGuillem Jover1-1/+23