summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-07-22Revert to the pre-10.6.4 behavior for dh_installdocs and the likeSven Joachim5-8/+10
It turned out that "dh_installdocs 'foo bar'" has historically treated the argument as a single file rather than two, and packages were relying on it, since there is really no other way to install such a file with dh_installdocs. Hence commit d00d7d524f8 broke them. The situation for dh_installexamples, dh_installman and dh_installinfo is exactly the same. That dh_install has behaved differently in this respect is unfortunate, but can only be fixed in a new compat level. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh: Optimize out dh_testdir as it is literally uselessNiels Thykier2-6/+6
As it turned out in 333376abf9c4d6e8f286a7cbda7e8c13307745f3, dh_testdir is called too late to provide its "helpful" error message. Accordingly, dh itself has to print it directly now (via getpackages()) for the user to get the correct error message. This literally makes dh_testdir useless under dh in its default configuration. While it is possible to override dh_testdir and have it check for other files, it is largely an unused feature - even more under dh. On the plus side, we seem to save 2x 0.040s by doing this per build. Assuming 70% of the 25 000 source packages in Debian are using dh, this translates into a 23 "core-minutes" saving on an single architecture archive-wide rebuild (e.g. arch:amd64 plus arch:all). Somehow, I hope I got the math wrong because it seems obscene... Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh: Provide a better error on missing d/controlNiels Thykier2-4/+11
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh_clean+dh_prep: Use default_sourcedir instead of d/tmpNiels Thykier2-9/+9
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh_install: Make autodest work with default_sourcedir != d/tmpNiels Thykier1-5/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Add stub default_sourcedir functionNiels Thykier6-15/+20
This function does not do anything particularly useful at the moment, but we hope to make it do that in the future. By including it now, other tools can migrate to it easier if/when it becomes useful. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Make getpackages() return *all* packagesNiels Thykier2-1/+4
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: (Mostly) avoid shell forking when installing maintscriptsNiels Thykier2-4/+19
Except one case, this remove all forking of a shell for installing maintscripts. The remaining case being the "qx{}" in the perl subprocess when merging an auto-generated script into a hand-written one. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh_*: Migrate most tools to new shell-less autoscriptNiels Thykier10-19/+28
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh_installman: Pass -l to man when recodingNiels Thykier2-1/+2
It saves having man(1) consider the system collection. Thanks: Colin Watson <cjwatson@debian.org> Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22autoscript: Support hashref for substitutionNiels Thykier4-7/+28
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Avoid forking 2-7 processes in autoscript with subNiels Thykier2-17/+40
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh_installman: Remove complex_doit callsNiels Thykier2-2/+4
Avoid forking shells to start commands now that "doit" can do what we need. This saves up to 10% on packages with many manpages during recode (tested on libssl-doc). Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Fix shell bug and add stdout redirectNiels Thykier4-18/+71
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Buildsystem: Include documentation of new methodNiels Thykier1-0/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Buildsystem: Add complex_doit_in_builddirNiels Thykier3-0/+23
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Buildsystem: Refactor doit_in_* methodsNiels Thykier1-51/+23
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-16Buildsystem: Use install_dir instead of doit(mkdir)Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15d/changelog: Document gregor's changesNiels Thykier1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15autopkgtest-pkg-perl: fix smoke test.gregor herrmann7-6/+23
autopkgtest-pkg-perl's smoke test fails all over the place because debhelper's testsuite has many assumptions that it is run from the source tree, while autopkgtest-pkg-perl's smoke test copies (by default) the t/ directory to a new empty directory and runs the tests from there. Add debian/tests/pkg-perl/smoke-files to copy more files from the source tree which are used in tests. Add debian/tests/pkg-perl/smoke-skip to skip t/size.t which fails when run under autopkgtest-pkg-perl because it tests all /usr/bin/dh_* helpers, and at least dh_autotools-dev_updateconfig is too large. Change t/buildsystems/03-bs-auto-buildable.t, t/buildsystems/buildsystem_tests.t, t/override_target.t, t/size.t, and t/syntax/syntax-progs.t to look for scripts and modules not in the source tree but in the installed directories when run under autopkgtest. With these changes, the test suite passes both during build and during autokpkgtest. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15autopkgtest-pkg-perl: add debian/tests/pkg-perl/skip-syntax.gregor herrmann1-0/+1
autopkgtest-pkg-perl's syntax.t skips the syntax check of .pm files if a package has Suggests: and there's no explicit skip list (on the assumption that some will fail because they need module from the packages in Suggests:). Add a debian/tests/pkg-perl/skip-syntax file with a dummy entry to allow syntax.t to check all real files. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15autopkgtest-pkg-perl: add debian/tests/pkg-perl/use-name.gregor herrmann1-0/+1
autopkgtest-pkg-perl's use.t tries to use() the main module of a perl distribution by getting the name from META.json or META.yml. If they don't exist, it needs some help by putting the name in debian/tests/pkg-perl/use-name. In this case where there is no clear "main" module, an important one like Debian::Debhelper::Dh_Lib is chosen. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15d/changelog: Document recent changesNiels Thykier1-0/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15{autoconf,meson,cmake}: Avoid forking shell via doitNiels Thykier3-5/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15Dh_Lib: Make pkgfile ignore .debhelper filesNiels Thykier1-1/+3
When we generate a maintscript, it ends up as debian/<pkg>.<script>.debhelper. This means that pkgfile(<pkg>, <script>) will now trigger the "expensive" case for architecture dependent scripts for any generated script. This patch special cases the ".debhelper" extension and thereby avoid this overhead. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15Dh_Lib: Use bsd_glob in pkgfileNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15dh_installmodules: Sort versions to make scripts reproducibleNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-15dh_usrlocal: Fix doit-bug that forks a shellNiels Thykier2-2/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-14Release debhelper/10.6.4 into unstableNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-13d/control: Set Testsuite: autopkgtest-pkg-perlNiels Thykier2-0/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-13dh_install: Disable bulk install optimization on clashesNiels Thykier2-15/+30
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-13install_{file,lib,prog}: Replace dangling symlinksNiels Thykier3-0/+40
The "install" command they emulate did as well. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12Re-instate bug compatibility to fix #867866Niels Thykier6-8/+34
Previous versions of debhelper had "interesting" way of interpreting arguments where it split them on space. This was mistakenly "corrected" in 10.6 when debhelper started to use bsd_glob (that does not split on spaces). To resolve this, manully split arguments like the original code would (effectively) have done so packages are unaffected by it. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12dh_compress: Use ln -f for creating hardlinksNiels Thykier2-1/+4
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12reset_perm_and_owner: Use perl functions instead of fork+execNiels Thykier10-14/+32
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12t: Fix test under prove without passing "t" dirNiels Thykier1-1/+1
Fix a test that failed when "prove" was called without the "t" dir explicitly. I.e. prove -lr t # works prove -lr # failed Now both works. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12dh_installman: Remove compressed manpages after reencodingSven Joachim2-1/+6
Since commit f9999ffaa5 dh_installman would inadvertently not remove compressed manpages after reencoding and thereby uncompressing them. This is not usually a problem since dh_compress takes care of it later, but if there are multiple hardlinks for the same file dh_compress fails in this situation. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-10dh: --with=build-stamp is a c10+ thingNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-09dh: Revert --without=build-stamp in c11Niels Thykier3-20/+14
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-09Revert "dh_installmenu: Stop installing menu files in compat 11"Niels Thykier3-21/+15
This reverts commit c1f102537e9e204deed0eab17c10680f3372a2ba.
2017-07-09Release debhelper/10.6.3 into unstableNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-09PROGRAMMING: Document how to write logging helpersNiels Thykier3-0/+62
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-09dh: Support pkgfile and pkgfile-logged PROMISE hintsNiels Thykier6-4/+26
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-08d/changelog: Fix typoNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-08dh_install: Bulk install sourcesNiels Thykier3-31/+26
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-07debhelper.pod: Announce betas on d-d-a@l.d.o OR d-d@l.d.oNiels Thykier1-2/+4
2017-07-07Dh_Lib.pm: Avoid discouraged "use vars"Niels Thykier1-1/+1
2017-07-07Dh_Lib: Embed tool versions into auto-generated snippetsNiels Thykier61-8/+156
Use $main::VERSION to determine the version of the tool and embed that into auto-generated snippets (e.g. via autoscript). This enables lintian to extract the tool + version and display it on: https://lintian.debian.org/tags/debhelper-autoscript-in-maintainer-scripts.html Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-05debhelper.pod: Add heading just above compat listNiels Thykier1-0/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-05Regenerate POT and PO filesNiels Thykier6-58/+69
Signed-off-by: Niels Thykier <niels@thykier.net>