summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2019-08-17Rewrite special-casing of ELF tools (dh_strip etc.) via an elf-tools sequenceNiels Thykier1-0/+14
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Fix logic for arch-only commands to make it testable againNiels Thykier2-17/+21
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Dh_Lib: Only parse dh-sequence-X in dhNiels Thykier1-1/+6
We do not want to pay a non-trivial cost of loading Dpkg::Deps in every helper (for cases where that is needed to parse th dh-sequence clause). Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Dh_lib.pm: Extract d/control parse logic from getpackagesNiels Thykier1-6/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Generalize and move logic for filtering out arch-only helpersNiels Thykier1-0/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Support build-profiles and architecture restrictions for dh-sequence-X ↵Niels Thykier1-1/+9
build-depends Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-16Rewrite sequence handling to ensure add-on commands are ordered correctlyNiels Thykier2-17/+253
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-08-16dh: Implement conditional sequence add-onsNiels Thykier1-6/+15
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-15Dh_Lib: Add hint to resolve double-specified compat levelNiels Thykier1-0/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-15Disable auto-abbrev of cli options in c13 to enable dh optimizationsNiels Thykier1-0/+3
Disable auto-abbreviation of command-line options in compat 13 and re-enable dh's optimization for skipping redundant commands when passed long options. Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-15dh_auto_*: Officially adopt --sourcedir/--builddirNiels Thykier1-0/+2
Since the beginning, debhelper has accepted abbrevated command line parameters. Anyone that has been using (e.g.): dh $@ --sourcedir=foo To pass --sourcedir to dh_install has *also* implicitly passed it to the dh_auto_* helpers. Due to auto-abbrevation being enabled, they have considered it a short form of --sourcedirectory. This is trivially confirmable by comparing: dh_auto_configure --bar foo Unknown option: bar dh_auto_configure: unknown option or error during option parsing; aborting with dh_auto_configure --sourcedir foo dh_auto_configure: invalid or non-existing path to the source directory: foo Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-19Dh_Getopt.pm: Improve warning when -p is ignoring in overridesNiels Thykier1-3/+22
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-14Dh_Lib: Expand on substitution in maintscriptsNiels Thykier1-23/+46
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-07-13dh_{shlibdeps,strip}: Pass --no-sandbox to file under fakerootNiels Thykier1-0/+19
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-05-17cmake.pm: Emit correct CMAKE_SYSTEM_PROCESSOR for mips64el during cross buildsHelmut Grohne1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-05-17Drop some obsolete/unused codeNiels Thykier1-24/+0
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-03-31makefile: Fix regression where cross tools were passed when make was a ↵Niels Thykier1-1/+5
target build system Signed-off-by: Niels Thykier <niels@thykier.net>
2019-03-31Buildsystem: Add internal field to tell if a build system is used as a targetNiels Thykier1-0/+13
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-25Dh_Lib: Ensure error uses a well-defined stable error codeNiels Thykier1-2/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-24Dh_Lib: Add "is_known_package" functionNiels Thykier1-2/+9
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-09meson: Dump meson-logs/testlog.txt on test errorNiels Thykier1-12/+20
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-02-09filedoublearray: Strip whitespace and detect whitespace-only linesNiels Thykier1-2/+10
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-02Revert "makefile.pm: pass V=1/0 depending on DH_QUIET"Luca Boccassi1-7/+1
This reverts commit dbdc8f0188b26734031c00c8fb227208841dd531. At least one package uses V in a different way than a simple boolean-ish variable, and thus causes a build failure. As pointed out on the bug report, there is no sane way to predict what variables makefiles are going to use, and it might cause hidden issues and mis-builds rather than simple build failures. Closes: Debian#914419 Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-11-13Dh_Lib,dh_installman: Reopen stdin for reading in doit/man(1)-checkNiels Thykier1-0/+1
This make debhelper work when run under nohup(1), which opens stdin for writing. Trivial to test with: dpkg-buildpackage [...] 0>/dev/null (Once you know that you are looking for it). Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-10cmake: Pass correct CMAKE_SYSTEM_PROCESSOR for ppc64elHelmut Grohne1-1/+10
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-10cmake: Pass QMAKE_EXECUTABLE when cross-buildingHelmut Grohne1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-04meson: Run tests with meson [c13]Niels Thykier1-0/+24
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-04Buildsystem: Fix spelling of "Invalid" in an error messageNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-04Dh_Lib: Accept compat level 13Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-04Dh_Lib: Add a LOWEST_VIRTUAL_DEBHELPER_COMPAT_LEVEL constantNiels Thykier1-0/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-02makefile.pm: pass V=1/0 depending on DH_QUIETLuca Boccassi1-1/+7
Allows a terse build to be quieter, and defaults to a verbose build as indicated by Debian Policy 4.2.0 (section 4.9). Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-15Replace all calls to Cwd::cwd with Cwd::getcwdJosh Triplett1-1/+1
The former calls /bin/pwd, while the latter uses the getcwd syscall directly. This eliminates some forks and execs from every build.
2018-09-14{meson,autoconf}.pm: Fix inverted boolean logicNiels Thykier2-3/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-14Dh_Getopt: Configure Getopt::Long to be case sensitiveNiels Thykier1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-09Make -k/--keep a per helper optionNiels Thykier1-4/+1
2018-09-04meson.pm: Add missing import of compatNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-02Dh_Getopt.pm: Remove --priority as default optionNiels Thykier1-2/+0
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-09-02Support of terse flag in DEB_BUILD_OPTIONSNicholas Guriev3-5/+7
* Also fix using of the QUIET internal setting in autoconf and cmake build systems.
2018-09-01Dh_Lib.pm: Have isnative() use the cache better for d/changelogNiels Thykier1-12/+23
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04dh: Support autoloading sequences via Build-DependsNiels Thykier1-1/+20
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04autoconf,meson: Use usr/libexec dir by default [c12]Niels Thykier2-3/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04cmake: Explicitly set CMAKE_INSTALL_LIBDIRNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-30Dh_Lib.pm: Fix comment handling at EOF in d/controlNiels Thykier1-1/+8
A trivial work around for this bug is to add an empty line at the end of the file. Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-30Restore glob error handling for documentation dh_* toolsNiels Thykier1-1/+15
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-24Dh_Lib: Correct assignment of $build_profilesNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-23Dh_Lib: Ensure (X-)Package-Type appear at most once per binaryNiels Thykier1-0/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-23Dh_Lib: Align binary package stanza parser with deb822 rulesNiels Thykier1-42/+74
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-23Dh_Lib: Align source stanza parser with deb822 rulesNiels Thykier1-22/+52
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-23Dh_Lib: Ensure package names are validNiels Thykier1-0/+9
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-06-23Dh_Lib: Avoid forking a shell for executable dh config filesNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>