summaryrefslogtreecommitdiff
path: root/Debian/Debhelper
AgeCommit message (Collapse)AuthorFilesLines
2017-08-24Support building on case-insensitive filesystemsGeoffrey Thomas18-4105/+0
Move Debian/ to lib subdirectory to support building on non-case-sensitive filesystems.
2017-08-07Dh_Lib: Make qx_cmd emulate wantarray behaviour of qxNiels Thykier1-3/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-08-03Dh_Lib: Introduce qx_cmdNiels Thykier1-1/+14
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-08-01Fix typoNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-08-01Dh_Lib: Fix inverted boolean logicNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-31Revert "dh_auto_configure: Expand ${prefix} uses"Niels Thykier1-9/+8
This reverts commit eb6e510ef52430c6edb96b28879fa4f64fbcafdb.
2017-07-30Dh_Lib: Force doit to not use shells with execNiels Thykier1-1/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-29cmake: Disable user package registryNiels Thykier1-0/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-29cmake: Pass -DCMAKE_INSTALL_RUNSTATEDIR=/run [c11]Niels Thykier1-0/+4
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-27dh_auto_configure: Expand ${prefix} usesIsaac Jurado1-8/+9
Some configure scripts look like generated by autoconf (e.g. MakeKit) but don't behave exactly the same when expanding the install paths. For example, when dh_auto_configure uses "--includedir=${prefix}/include", the "${prefix}" part is NOT always re-evaluated and, thus, expanded to "/usr". Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22dh: Provide a better error on missing d/controlNiels Thykier1-4/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Add stub default_sourcedir functionNiels Thykier1-1/+9
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 Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: (Mostly) avoid shell forking when installing maintscriptsNiels Thykier1-4/+17
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-22autoscript: Support hashref for substitutionNiels Thykier1-1/+10
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Avoid forking 2-7 processes in autoscript with subNiels Thykier1-17/+38
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-22Dh_Lib: Fix shell bug and add stdout redirectNiels Thykier1-14/+38
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 Thykier2-0/+20
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-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-13install_{file,lib,prog}: Replace dangling symlinksNiels Thykier1-0/+6
The "install" command they emulate did as well. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-12reset_perm_and_owner: Use perl functions instead of fork+execNiels Thykier1-2/+18
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-07Dh_Lib.pm: Avoid discouraged "use vars"Niels Thykier1-1/+1
2017-07-07Dh_Lib: Embed tool versions into auto-generated snippetsNiels Thykier1-5/+28
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-03Set Emacs file variables directory-wideSven Joachim17-102/+0
Set the local variables for Emacs in the central placed intended for it, rather than in (currently) 95 individual files. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-30Test::DH: Prove a run_dh_tool sub that DTRTNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-30Revert "glob_expand: Special-case "." as dir"Niels Thykier1-3/+1
This reverts commit 25e56c374cb7f6ea3da8b8046764b36caa56ea02. Turns out this breaks the world if people use entries with leading slash (and they do).
2017-06-29Phase out perl -I. in compat 11Niels Thykier2-4/+7
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-29Disable PERL_USE_UNSAFE_INC in compat 11Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-29glob_expand: Special-case "." as dirNiels Thykier1-1/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-28Dh_Lib: Make file(double)array support using glob_expandNiels Thykier1-8/+15
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-28Dh_Lib: Add new glob_expand methodNiels Thykier1-1/+45
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-28Refactor handling of $skip_install testsNiels Thykier1-1/+13
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-27Dh_Lib: Export is_build_profile_activeNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-27Dh_Lib: Add is_build_profile_activeNiels Thykier1-0/+10
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-27Dh_Lib: Explicitly return at the end of get_buildoptionsNiels Thykier1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-27Dh_Lib: Work around emacs code highlightNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26xargs(): Support inserting things anywhereNiels Thykier1-5/+31
Previously, arguments could only be appended. With this change, it is possible to use the "magic" XARGS_INSERT_PARAMS_HERE value to choose where arguments should be inserted. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26Dh_Lib: Rename sub to on_items_in_parallelNiels Thykier1-3/+6
Turns out that the sub is not specific to packages, so rename it to make it more self-descriptive (and to avoid making consumers to believe it is more limited than it is). Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26make_symlink: Avoid unnecessary stat callsNiels Thykier1-7/+13
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26Avoid fork+exec for rm -f and ln -s in non-deprecated toolsNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-26Dh_Lib: Add rm_files and make_symlink_raw_targetNiels Thykier1-0/+25
Without fork+exec and manual error checking, they can remove files (ignoring files that don't exist) and create a raw symlink. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-25Dh_Lib: Fail if open or close failsNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-25Dh_Lib: Fix rounding error causing off-by-one threadsNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-25Dh_Lib: inhibit log in child processesNiels Thykier1-0/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-25Dh_Lib: Use File::Path instead of "install -d"Niels Thykier1-3/+24
Signed-off-by: Niels Thykier <niels@thykier.net>