summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2019-10-26Skip dh_installman test by default as it requires extra dependenciesNiels Thykier1-1/+16
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-10-25t: Expand dh_installman test to cover already installed manpagesNiels Thykier1-1/+21
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-10-25Add test to catch regressions of #943376Niels Thykier3-0/+70
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-20Add tests for dh_installgsettingsSimon McVittie3-0/+71
Extracted from the patch proposed in https://bugs.debian.org/934893. Signed-off-by: Niels Thykier <niels@thykier.net> Signed-off-by: Simon McVittie <smcv@debian.org>
2019-08-16Fix logic for arch-only commands to make it testable againNiels Thykier1-1/+17
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Rewrite sequence handling to ensure add-on commands are ordered correctlyNiels Thykier1-32/+125
Previously, we relied on a command being inserted in the -arch sequence to be ordered correctly. With this rewrite, a command added only to the -indep sequence will still appear in the right order. Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-19dh_installinit.t: Fix typo of quietFelix Lechner1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-19dh_installinit: Revert check to ensure --name always matches a fileNiels Thykier1-1/+0
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-16Fix logic error in --name sanity checkDmitry Bogatov2-0/+6
Commit [e5fc959e], resolving #462389 changed behaviour of `--name' option of dh_installinit. Before this change, if `debian/{package}.{name}.init' is missing, this option was silently ignored. This change made it error. This change was incorrect, since it demanded presence of `debian/{package}.{name}.init' file for /every/ binary package. This commit instead throws error only if `debian/{package}.{name}.init' does not exist for /all/ binary {package} names. Regression test is added. Closes: #932073 Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-14dh_installinit: --name implies, that init script is presentDmitry Bogatov1-0/+1
Previously, `dh_installinit' silently did nothing, when --name option was passed, but initscript debian/<package>.<name>.init was not found. In almost all cases, explicit --name means that package maintainer meant to install init script. If it is not present, it is bug, and must not be hidden. Now, error is reported in this case. (Closes: #462389) Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-25Dh_Lib: Ensure error uses a well-defined stable error codeNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-14dh_installsystemduser: New helper to handle systemd user instance unitsDaniele Nicolodi5-0/+106
Add a new 'dh_installsystemduser' helper responsible for istalling package maintainer supplied systemd user instance units and to produce postinst and postrm maintiner scripts code blocks to appropriately enable, mask and disable units when the package is installed, upgraded, or removed.
2018-09-15Replace all calls to Cwd::cwd with Cwd::getcwdJosh Triplett2-3/+3
The former calls /bin/pwd, while the latter uses the getcwd syscall directly. This eliminates some forks and execs from every build.
2018-09-03Make dh_install{init,systemd}'s autoscripts independent [c12]Niels Thykier1-2/+20
Have dh_installinit use the new --skip-systemd-native parameter and let dh_installsystemd always generate autoscript snippets for systemd services. This ensures that dh_installsystemd's snippet will be used for starting the services and will among other ensure that services are properly unmasked before started. Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04autoconf,meson: Use usr/libexec dir by default [c12]Niels Thykier1-1/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-23t: Fix warningNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-20dh_installsystemd: Fix handling of symlinked alias units, add relevant testsDaniele Nicolodi1-1/+35
2018-06-20t/dh_installsystemd: Use consistent string quotingDaniele Nicolodi1-5/+5
2018-06-16dh_installsystemd: SimplifyDaniele Nicolodi1-2/+2
Simplify and move to a function the code responsible to list all installed units. It is much simpler to refer to unit files simply as their file name without keeping track of their complete path as the later can be readily computed because all unit files must be installed into usr/lib/systemd/system. This removes some confusion and highlight a bug where code blocks for handling units installed at the wrong location would be emitted if relative file paths were specified on the command line. Fix the tests accordingly.
2018-06-16t/dh_installsystemd: Add tests for a simpler source packageDaniele Nicolodi4-9/+71
Extend the tests to verify that dh_installsystemd comand line arguments handling works in the simplified form allowed by source packages building only one binary package.
2018-05-20t: Improve a test to give better debug output on failureNiels Thykier1-2/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-20t: Avoid warning about redefining "dirname"Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-19t: Add use_ok test in empty dirNiels Thykier1-0/+20
To avoid regressions in Buildsystem.pm and Dh_Lib.pm's ability to load without (e.g.) d/control or d/compat being present. Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-18Dh_Lib.pm: Add "is_empty_dir"Niels Thykier1-0/+26
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-10dh_strip: Move .../debug/.dwz to the -dbgsym/-dbg packageNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-10Test the "whitespace before debhelper-compat" case.Peter Pentchev1-1/+4
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-05-10Lay the groundwork for testing debhelper-compat.Peter Pentchev3-1/+98
Simulate gen-provides's enumeration of the supported compat levels in the Test::DH module's non_deprecated_compat_levels() function. Add the resetcompat() and resetpackages() testing aids to Dh_Lib. Silence the "debhelper-compat is experimental" warning during testing. Add the debhelper-compat/syntax.t test. Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-07dh_usrlocal: Use default owner+mode from Policy v4.1.4Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-07t/dh_usrlocal: Add tests from Nicolas BoulenguezNiels Thykier1-0/+59
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-07t/dh_usrlocal/01-basic.t: Refactor testNiels Thykier1-40/+45
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-07dh_usrlocal: Abort on known unsafe directory namesNiels Thykier1-0/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-07t: Add test for dh_usrlocalNiels Thykier1-0/+87
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-06cmake: Support ninja backendNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-04-06Rewrite build system to support a "target build system"Niels Thykier1-7/+7
Several of the build systems consists of a configure step that generates a buildscript for another build tool. Notable examples being "cmake" and "meson", which even supports multiple backend tools. This change makes it natively possible for debhelper to support such build systems with multiple backends. Note that only build systems with multiple backends have been rewritten. Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-29make_symlink: Fix corner cases for link namesNiels Thykier1-0/+55
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-07t: Add test for compat 8 handling of sequencesNiels Thykier1-1/+25
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-07t: Refactor testNiels Thykier1-6/+19
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-31t: Remove some uid_0_test_is_ok guardsNiels Thykier6-30/+7
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-28Rely on DEB_RULES_REQUIRES_ROOT for R³ supportNiels Thykier8-42/+43
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-28dh: Rename optimize_sequence to unpack_sequenceNiels Thykier1-13/+13
It is not a super name, but "optimize" implies that dh will work if you skip the call. By renaming it to unpack we avoid that implication. Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-14Update test to match previous commitNiels Thykier2-2/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-03t/dh-sequencer.t: Less is more - remove redundant codeNiels Thykier1-13/+11
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-03dh_install{init,systemd}: Re-order service autosnippetsNiels Thykier4-13/+72
Depends on e6870ceafb9d51800de86a7106cdfb4ce9c9dad8 Closes: Debian#885998, #885998 Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-03Dh_Lib: Support ordering for service handling autosnippetsNiels Thykier1-1/+21
This is part 1 of 2 for solving Debian#814285 and Debian#885998 Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-02dh: Do not re-run completed targetsNiels Thykier1-13/+24
This is part of 2 of the dh sequence rewrite. Part 1 is cb2caa7f67837294b0681d881f52dd23df487f33. This change ensures that dh no longer attempts to run a target that is already marked as complete (e.g. via the stamp file). Signed-off-by: Niels Thykier <niels@thykier.net>
2018-01-02dh: Rewrite sequence handlingNiels Thykier1-0/+127
Rewrite the way we compute the sequences to ensure that: 1) Rules target remain opaque (particularly "subtargets" are now also opaque). 2) Opaque targets are run first, so they can run their subtargets before dh runs a command that depends on it. This is the first half of fixing Debian#880840. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-12-31dh_compress: Avoid compressing examples [c12]Niels Thykier1-17/+18
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-12-30dh_missing: Support wildcards in d/not-installedNiels Thykier1-0/+37
Closes: Debian#884556 Closes: nthykier/debhelper#1 Signed-off-by: Niels Thykier <niels@thykier.net>
2017-12-16dh_installsystemd: Enable dh_installsystemd in old compat levelsNiels Thykier1-16/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-25t: Make tests work without fakeroot when R³ is enabledNiels Thykier2-1/+2
Signed-off-by: Niels Thykier <niels@thykier.net>