summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2019-10-27Fix spurious perl-xs-dev related warnings in cross buildsNiko Tyni1-4/+1
dh_perl is run for all packages so we cannot expect perl-xs-dev to be installed in the general case.
2019-10-20meson.pm: Fix broken call to NAMENiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-10-18perl_build: support cross building XS modulesNiko Tyni1-3/+19
When cross building, run Build.PL and Build with host arch Config.pm (provided by the perl-xs-dev package since perl/5.30.0-7) first on @INC. We need to set PERL5LIB because Module::Build forks a child process to sanity check the Config it's seeing, so the modified search path has to be propagated via the environment.
2019-10-18perl_makemaker: support cross building XS modulesNiko Tyni1-2/+13
When cross building, run Makefile.PL with host arch Config.pm (provided by the perl-xs-dev package since perl/5.30.0-7) first on @INC. This is an initial implementation that seems to work for a majority of simple XS module packages. It's possible that it will need tuning in the future to accommodate more complex packages. In particular: - setting PERL5LIB instead of adding the -I option might be needed to propagate the modified search path to child processes of Makefile.PL - the 'make' phase may need modifications to the search path as well
2019-10-18Dh_Lib: new function perl_cross_incdirNiko Tyni1-0/+16
Since perl/5.30.0-7, the perl-xs-dev package provides the host architecture Config.pm in /usr/lib/<triplet>/perl/cross-config-<version> for the benefit of cross builds. For more information, see the thread around https://lists.debian.org/debian-perl/2019/10/msg00015.html
2019-10-12dh_auto_*: Support reload-all-buildenv-variablesNiels Thykier1-0/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-09-28wrong CMAKE_SYSTEM_PROCESSOR for 32bit armsHelmut Grohne1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-18Avoid parsing d/control before handling --help/--listNiels Thykier2-4/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-17dh_installdeb: Allow "+" in token namesNiels Thykier1-1/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-08-17Dh_Lib: Fix typo in error messageNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
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>