Modestas Vainius [Wed, 18 Nov 2009 19:16:41 +0000 (14:16 -0500)]
Improve build system auto-selection process
This patch alters semantics of check_auto_buildable() a bit. Now it can
also indicate if the source has already been partitially built with the
build system and if so, such build system may be auto-selected over a less
specific its parent (in the inheritance tree) even if the latter is earlier
in the @BUILDSYSTEMS array.
However, this still leaves a requirement that a derivative build system
must not do anything that may break packages of the parent build system.
Otherwise, introduction of a new derivative build system might break
packages which already had that build system implemented via overrides...
Modestas Vainius [Tue, 17 Nov 2009 01:40:26 +0000 (20:40 -0500)]
Enable verbose ctest output on test failure
When test fails, enable verbose ctest output. This allows to
get more details on a test failure from the build logs.
Auto-select cmake in further steps only if cmake was run in configure step.
CMake writes CMakeCache.txt to build directory when it is run. Depend on the
presence of this file for auto-selection in build, test, install and clean
steps.
Joey Hess [Thu, 5 Nov 2009 01:47:13 +0000 (20:47 -0500)]
Add deprecation warnings for -u to the documentation, since putting options after -- is much more sane. (However, -u will not go away any time soon.) Closes: #554509
Joey Hess [Wed, 28 Oct 2009 21:23:28 +0000 (17:23 -0400)]
reduce amount of MAKEFLAGS cleaning
Now clean_jobserver_makeflags will only remove --jobserver settings
from MAKEFLAGS. This is simpler and easier to understand than
the old behavior, which, if there was no --jobserver, removed
all -j and --jobs, while leaving those when removing --jobserver.
This relies on -j options passed to make overriding
-j settings in MAKEFLAGS. So we don't need to clean those out,
we can just override them.
Joey Hess [Wed, 28 Oct 2009 20:45:12 +0000 (16:45 -0400)]
split get_make_jobserver_status into two functions
I disliked the complexity of the return values, and the boilerplate
code that followed the two calls to the function, to clean/unset
MAKEFLAGS. To solve both, I refactored it into two functions, one simply
tests to see if a jobserver is specified but unavailable, while the other
cleans/unsets MAKEFLAGS.
This loses the ability to pull the jobs-N count out of MAKEFLAGS,
but that was not currently used.
Modestas Vainius [Wed, 28 Oct 2009 19:49:34 +0000 (15:49 -0400)]
Support parallel building in makefile buildsystem
1) Add routine to Dh_Lib (used by dh and makefile.pm) which is capable of
detecting make jobserver and job control options from the MAKEFLAGS environment
variable. It also generates and returns a clean up MAKEFLAGS from these
options.
2) Add --parallel option to build system framework which allows source packages
to specify that they support parallel building. Optional value for this option is
the number of maximum parallel process to allow. However, the actual number of
parallel process (if any) for the specific build is determined from
DEB_BUILD_OPTIONS env variable as specified by Debian Policy.
By default (no --parallel option) parallel is neither enabled nor disabled
(depends on the external environment). However, dh may pass --parallel to
dh_auto_* implicitly in case 4) described below.
3) Add parallel support for makefile buildsystem. This implementation
forcefully starts a new make job server (or disables parallel) for the number
of process requested. If --parallel was not passed to the build system at all,
the build system will only clean up MAKEFLAGS from stale jobserver options to
avoid pointless make warnings.
4) If dh detects that it is being run by dpkg-buildpackage -jX and it is NOT
run with "+" prefix from debian/rules (i.e. jobserver is not reachable), it
enables --parallel implicitly. This closes: #532805.
Andrew Straw [Sun, 27 Sep 2009 00:26:01 +0000 (17:26 -0700)]
Pass --force option to Python distutils install command.
This command will prevent distutils from attempting to determine
whether a file should be installed based on the timestamp of the
to-be-overwritten file.
dh_installudev: With --name, install debian/<package>.<name>.udev to rules.d/<priority>-<name>, the same as debian/<name>.udev is installed for the first package. Closes: #546337
Reorder dh_pysupport call in dh sequence to come before dh_installinit, so the generated postinst script registers python modules before trying to use them. Closes: #546293
dh_installdocs: Add --link-doc option that can be used to link documentation directories. This is easier to use and more flexible than the old method of running dh_link first to make a broken symlink. Closes: #545676 Thanks, Colin Watson
Colin Watson [Tue, 8 Sep 2009 11:17:02 +0000 (12:17 +0100)]
Bug#545676: dh_installdocs: option to link documentation directories
As discussed by e-mail, dh_installdocs could do with an option to make
the documentation directory a symlink, to clean up dh-using packages
that otherwise need to use override targets to arrange for dh_link to
run before dh_installdocs.
This turns out to be slightly involved due to the need to handle the
case where you want to do this *and* also install some extra
documentation in the symlink target, while also making a dangling
symlink and avoiding file conflicts in the simple case, so I had to
change dh_installchangelogs as well. I think this is right now; tested
on debconf ('dh_installdocs -Ndebconf-doc --link-doc=debconf;
dh_installdocs -pdebconf-doc') and groff ('dh_installdocs
--link-doc=groff-base').
Steve Langasek [Wed, 2 Sep 2009 18:49:34 +0000 (14:49 -0400)]
upstart support
Patch dh_installinit to handle upstart job files in preference over init
scripts, and provide compatibility symlinks in /etc/init.d for sysv-rc
implementations. Closes: #536035.
The -a flag now does the same thing as the -s flag, so debhelper users do
not need to worry about using the -s flag when building a package that only
builds for some architectures, and dh will also work in that situation. Closes: #540794
Modestas Vainius [Wed, 26 Aug 2009 20:49:39 +0000 (16:49 -0400)]
Support --destdir option in dh_auto_install
This patch adds --destdir option to dh_auto_install which allows to override
destdir auto-selection. This basically closes #538201 since the same requested
behaviour can be achieved but in a more clean way.
Joey Hess [Wed, 26 Aug 2009 20:41:53 +0000 (16:41 -0400)]
drop regex support from remove_command_options
I hope that it will not be needed; indeed I doubt that
remove_command_options will be used much, because sequence addons would
need to try to do conflicting things to need it. And the interface makes it
hard for such conflicting sequence addons to work around the other, since
addons can be loaded in either order. So let's not encourage them too
much, and if there's a use case later, we can made changes.
I haven't applied Modestas's enhanced patch that allows adding an option to
all commands because I similarly think it might not be used. If a use case
comes along we can add something like that.
Modestas Vainius [Wed, 26 Aug 2009 20:40:45 +0000 (16:40 -0400)]
Allow dh addons to pass options to debhelper commands
Add dh addons APIs add_command_options()/remove_command_options() that
allow addons to add additional options which dh will pass to the specified
debhelper commands.
Joey Hess [Tue, 25 Aug 2009 17:19:17 +0000 (13:19 -0400)]
dh_installdocs: Loosen the Document field parsing, to accept everything doc-base *really* accepts in a doc id (not just what it's documented to accept). Closes: #543499
Joey Hess [Fri, 21 Aug 2009 21:19:18 +0000 (17:19 -0400)]
dh_installudev transition
* dh_installudev: Install rules files into new location
/lib/udev/rules.d/
* dh_installudev: Add code to delete old conffiles unless
they're modified, and in that case, rename them to override
the corresponding file in /lib/udev. (Based on patch by
Martin Pitt.) (Note that this file will not be deleted on purge --
I can't see a good way to determine when it's appropriate to do
that.)
* dh_installudev: Set default priority to 60; dropping the "z".
If --priority=zNN is passed, treat that as priority NN.
* Above Closes: #491117
* dh_installudev: Drop code handling move of /etc/udev/foo into
/etc/udev/rules.d/.