summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAge
* Update dh_installsystemd testsHelmut Grohne2023-08-28
| | | | | | | | | | | | | | The history of tests is a little confusing. At one point, Niels updated dh_installsystemd to install units to usr d70caa69c64b ("Make systemd tools use usr/lib"), but he reverted that later 3083286de05f ("Revert change to install systemd services in usr/lib"). That revert was incomplete leaving the confusing "lib -> usr/lib" comments. The "with both no-empty" case is now redundant after the reversion and I'm therefore deleting it. As for the others, replace the comment with a more useful one. Signed-off-by: Helmut Grohne <helmut@subdivi.de>
* systemd helpers: Support units below /usrHelmut Grohne2023-08-28
| | | | | | | | | | | Since very long, systemd supports units in both /lib/systemd and /usr/lib/systemd. As the /usr-merge progresses, we need debhelper to also understand units in /usr/lib/systemd and this is what this commit does. It does not cause debhelper to actually install files to /usr rather than /lib and merely recognizes them. Closes: #1041159 Signed-off-by: Helmut Grohne <helmut@subdivi.de>
* Dh_Lib.pm: Revert change where `install_{file,prog,lib}` would use chownNiels Thykier2022-12-14
| | | | | | | | | The problem that prompted this change was not caused by debhelper but by fakeroot (#1024544) and the change in debhelper would not even function as a work around in this case. Accordingly, the extra complexity is not worth it and has been reverted. Gbp-Dch: Full
* Dh_Lib.pm: Ensure `install_{file,prog,lib}` uses chown when root should be usedNiels Thykier2022-11-20
| | | | | | | | | | Previously, they would skip the `chown` call and rely on `dh_fixperms` or `dpkg-deb` to fix the ownership. However, that could cause issues when the helper was run after `dh_fixperms` and install files that `dpkg-deb` would not reset ownership of. Gbp-Dch: full Signed-off-by: Niels Thykier <niels@thykier.net>
* Dh_Lib.pm: Provide `mkdirs` to create (non-package) directoriesNiels Thykier2022-11-20
| | | | | | | | | | | This is an alternative to `install_dir` that never does chown (and is not printed with `--verbose`). It is intended for creating directories that are not part of a binary package. Note that at the moment `install_dir` does not do chown either, which is a bug (causing #1024261). Signed-off-by: Niels Thykier <niels@thykier.net>
* dh_installchangelogs: Ensure that at least four old entries are preservedGioele Barabucci2022-10-29
| | | | | | | | | | Currently only one entry is preserved. This makes seldomly updated packages (for example packages refreshed only every second Debian release) end up with an excessively trimmed 1-entry changelog. To prevent this issue, always keep at least 4 entries. Closes: #1021467
* dh_installsystemd: No longer mask system units on package removalMichael Biebl2022-10-02
| | | | | | | | | | | With the recent changes to dh_installinit this is no longer necessary as systemd-sysv-generator will automatically ignore any SysV init scripts that aren't marked as executable. As masking system units on package removal can have undesired side effects, remove this code. Closes: #1021027
* t/dh_installchangelogs: Run tests with LC_ALL=C.UTF-8Gioele Barabucci2022-10-02
| | | | | | | | | | | | The `dh_installchangelogs` tests generate fake timestamps using the locale-abiding function `Time::Piece->strftime`. Timestamps generated in a non-English environment will thus not be dch-compliant and the tests will fail. To fix this, use `setlocale` to run all `dh_installchangelogs` tests with the `C.UTF-8` locale. Fixes: #1021088
* dh_installsystemduser: Update test to no longer check for the dropped mask codeMichael Biebl2022-10-01
| | | | Gbp-Dch: Ignore
* dh_installchangelogs: Respect DEB_BUILD_OPTIONS=notrimdchGioele Barabucci2022-09-18
| | | | In case `notrimdch` is set, behave as if `--no-trim` had been passed.
* dh_installchangelogs: Trim changelogs, remove entries older than oldstableGioele Barabucci2022-09-17
| | | | | | | | | | Changelogs of older and heavily developed packages can reach sizes of hundreds of kilobytes. Even after compression, such big changelogs are a waste of space and bandwidth worldwide. This commit makes `dh_installchangelog` trim changelogs to include only entries more recent than the release date of _oldstable_ (currently Debian 10 Buster), unless the `--no-trim` option is passed.
* dh_installman: fix regex to parse section out of filenameLuca Boccassi2022-07-09
| | | | | | | | | | | If a filename has multiple dot-digit sequences, the regex fails to extract the last one, which is the section. For example the section of libmanpage.so.9.2.3 is extracted as 9.2.3. Fix the regex to match on the last dot and single digit in the file name and letters following it. This ensures we don't glob up 1.2.3, and also support .3perl and such.
* dh_installman: avoid false positive language detection on shared libsLuca Boccassi2022-06-11
| | | | | | | | | | | | | | | When a manpage refers to a shared library, dh_installman detects the .so as the language and moves the manpage into the wrong directory. Eg: /usr/share/man/man8/libnss_myhostname.so.2.8 gets processed as /usr/share/man/so/man8/libnss_myhostname.so.2.8 Signed-off-by: Luca Boccassi <bluca@debian.org>
* dh_installpam: Install conf files under /usr/lib/pam.d in c14Gioele Barabucci2022-03-13
|
* Revert "Update tests to match previous commit"Dave Jones2022-02-01
| | | | This reverts commit 5b27a5414e85d8ae6c6de8c8dc97cd0fa1897f53.
* Remove support for compat 5+6Niels Thykier2021-12-20
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* t: Correct testNiels Thykier2021-12-20
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* dh_installsystemduser: add support for starting/stopping user unitsLuca Boccassi2021-12-08
| | | | | | init-system-helpers from v1.61 and systemd from v250 support iterating over all user instances, so it's now possible to start/stop user units on install/upgrade/remove.
* Update tests to matchNiels Thykier2021-09-06
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Make systemd tools use usr/libNiels Thykier2021-08-16
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Update tests to match previous commitNiels Thykier2021-07-11
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Fix test broken by autoscript changesNiels Thykier2021-03-21
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* autoconf.pm: Do not check for unknown --disable/enable/with/without-* optionsGuillem Jover2020-05-17
| | | | | | | | | | | | | | | | By default autoconf will check for unknown --disable/enable/with/withouth-* options and will emit a warning on standard error. This can be tuned by the upstream maintainer with the AC_DISABLE_OPTION_CHECKING macro, to make these fatal, or to not perform the checks by default. Given that we unconditionally pass possibly unknown options to the configure scripts, we should disable these checks to avoid emitting warnings, which are at least confusing, and at worse might trip over CI and test suite that check for output on standard error as markers for failure. Signed-off-by: Guillem Jover <guillem@debian.org> Signed-off-by: Niels Thykier <niels@thykier.net>
* dh_install{init,systemd}: Fix --no-start / --no-stop-on-upgradeNiels Thykier2020-05-05
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Test: Remove obsolete "needs_root" functionalityNiels Thykier2020-05-03
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Test: Ensure ENV is updated before loading Dh_Lib.pmNiels Thykier2020-05-03
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Refactor some magic values into constantsNiels Thykier2020-05-02
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* t/.../buildsystem_tests.t: Explicitly disable autoreconf add-onNiels Thykier2020-03-29
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Dh_Lib.pm: Flag compat 9 as deprecatedNiels Thykier2020-03-29
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Test::DH: Use "never" for *_COLOR variablesNiels Thykier2020-01-19
| | | | | Thanks: Guillem Jover <guillem@debian.org> Signed-off-by: Niels Thykier <niels@thykier.net>
* Support substitution variables [c13]Niels Thykier2020-01-18
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Dh_Lib: Add warning/error prefix on related messages and enable colorsNiels Thykier2020-01-17
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Add dh_installtmpfiles command [c13]Niels Thykier2020-01-17
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* tests: Add test for each compat in range and fix a testNiels Thykier2020-01-17
| | | | | | | | | There was a bug in the original code that made the us use the highest compat rather than the "current" compat. This hid a bug in the dh_systemd.t test case, which has been corrected by only letting it run for compat 10. Signed-off-by: Niels Thykier <niels@thykier.net>
* Skip dh_installman test by default as it requires extra dependenciesNiels Thykier2019-10-26
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* t: Expand dh_installman test to cover already installed manpagesNiels Thykier2019-10-25
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Add test to catch regressions of #943376Niels Thykier2019-10-25
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Add tests for dh_installgsettingsSimon McVittie2019-08-20
| | | | | | | 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>
* Fix logic for arch-only commands to make it testable againNiels Thykier2019-08-16
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Rewrite sequence handling to ensure add-on commands are ordered correctlyNiels Thykier2019-08-16
| | | | | | | | 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>
* dh_installinit.t: Fix typo of quietFelix Lechner2019-07-19
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* dh_installinit: Revert check to ensure --name always matches a fileNiels Thykier2019-07-19
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* Fix logic error in --name sanity checkDmitry Bogatov2019-07-16
| | | | | | | | | | | | | | | 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>
* dh_installinit: --name implies, that init script is presentDmitry Bogatov2019-07-14
| | | | | | | | | | | 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>
* Dh_Lib: Ensure error uses a well-defined stable error codeNiels Thykier2019-02-25
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* dh_installsystemduser: New helper to handle systemd user instance unitsDaniele Nicolodi2018-10-14
| | | | | | | | 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.
* Replace all calls to Cwd::cwd with Cwd::getcwdJosh Triplett2018-09-15
| | | | | The former calls /bin/pwd, while the latter uses the getcwd syscall directly. This eliminates some forks and execs from every build.
* Make dh_install{init,systemd}'s autoscripts independent [c12]Niels Thykier2018-09-03
| | | | | | | | | | | | 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>
* autoconf,meson: Use usr/libexec dir by default [c12]Niels Thykier2018-08-04
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>
* t: Fix warningNiels Thykier2018-06-23
| | | | Signed-off-by: Niels Thykier <niels@thykier.net>