dpkg keeps all directories of the old package version (and renames
the old files) until an upgrade is complete. This prevents simply
replacing a directory with a symlink. We have to use
dpkg-maintscript-helper to work around this limitation.
Closes: #942861
The maintainerclean target should delete everything that doesn't
belong in a source package and can't be regenerated using the orig
and debian/control-real targets. Given a git checkout, "git clean
-d -f -x" will do this, but not everyone builds from git.
Currently it doesn't delete everything that the clean target does, by
a long way. Unlike the clean target it does not require
debian/control to exist or be buildable, so it cannot depend on clean
or invoke dh_clean.
Therefore:
* Move the file patterns from the clean target into a variable, and
use that in both clean and maintainerclean targets
* Delete debhelper temporary files and debian/files in the
maintainerclean target
This doesn't cover editor temporary/backup files, which dh_clean
removes, but they're less of an issue since dpkg-source excludes those
automatically.
The packages we should build are restricted by:
* Package configuration in debian/config (limits which binary packages are
included in debian/control)
* Architecture (specified per package in debian/templates/control.* and
then in debian/control)
* Build profile (specified per package in debian/templates/control.* and
then in debian/control)
The logic for these restrictions is currently repeated in
debian/rules.real, but sometimes it becomes inconsistent with
debian/control (as with my recent changes for libbpf).
dh_listpackages reads debian/control and filters it by the current
host architecture and build profiles, so that it reliably reports
which packages we should build.
Therefore:
* Replace the logic in debian/rules.real with checks for package names
in the output of dh_listpackages
* Remove the redundant flag variables passed by debian/rules and
debian/rules.gen
* Remove the special-casing of stage1 in debian/rules and
debian/rules.gen
Checksumming the whole of debian/changelog when deciding whether to
run gencontrol.py results in (a) frequent changes to control.md5sum
and (b) the need to invoke various targets twice during development.
I originally made this change to address (a), which would be an
annoyance if and when we start using dgit. However, fixing (b) is a
nice benefit regardless of whether we do that.
Currently we don't set all the architecture variables, so direct use
of these makefiles (not under dpkg-architecture or dpkg-buildpackage)
may fail.
In case ARCH and DEB_HOST_ARCH don't match in rules.real, we really
should fail, so add an explicit check for that.
This also fixes lintian warning
debian-rules-sets-dpkg-architecture-variable.
Merge the configuration and default-configuration directories,
using per-architecture overrides in package-list.
This requires a newer version of kernel-wedge to support
Depends_<arch> properly.
The only immediate change to debian/control is to remove the
different description for nic-modules on sparc64.
Fully disable building and installing any documentation when the nodoc
build-profile is used.
Among other things this will help reducing build times when doing
development builds, especially on IO-limited build workers.
* Drop redundant gitignore.patch from linux-tools
* Rename linux-tools' debian/templates/control.main.in to
debian/templates/control.tools.in
* Combine changelogs, putting all entries for each upstream release
cycle in chronological order
* Combine rules and gencontrol.py code
By passing both -C and -f options to make, we can separate makefiles
from the output directory without adding prefixes to all targets.
We can also reduce the 'clean' commands to little more than 'rm -rf'.
A parallel 'debian/rules build' will now invoke 'debian/rules.real
build' twice in parallel, which is disastrous.
- Add and use proper build-arch and build-indep targets in
debian/rules.gen and debian/rules.real
- Assign a separate temporary directory to each target in
debian/rules.real. Add the directories to .gitignore and
the clean rule.
- Pull installation of the lockdep wrapper (which is indep)
up into debian/rules.real so that we don't end up building
liblockdep twice in parallel.
Like many other of our binary packages, dh_clean can miss this after a
version bump. Not sure why it wasn't already inclued.
svn path=/dists/trunk/linux/; revision=20549
Use the same template syntax and implementation for maintainer
scripts, translations, etc. as we do for the control files. Define
the image-stem and initramfs variables to replace the old K and I
variables.
After this, debian/linux-* and debian/po/*.po are generated files (at
source preparation time) and should be ignored in svn.
Use debhelper to install the generated files at build time. This also
results in a redundant dependency on debconf (which we already have in
Pre-Depends), but this seems harmless.
svn path=/dists/trunk/linux/; revision=20508
Derived packages (e.g. for extra featuresets) may be maintained using
yet another patch series (touching the debian directory). This will
require an additional status directory, specified by setting QUILT_PC.
Override this when we invoke quilt to apply the main and featureset
patch series. (Thanks to Yves-Alexis Perez.)
svn path=/dists/sid/linux/; revision=19243