Commit Graph

187 Commits

Author SHA1 Message Date
Ben Hutchings
307b011acf Add maint scripts to meta-packages to convert doc directories to symlinks
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
2019-10-23 21:47:25 +01:00
Ben Hutchings
90d4cf3fc7 debian/.gitignore, debian/rules: Generalise patterns for generated files
Change the patterns to be based on extensions, so we don't need to
think about which specific binary packages have which files.
2019-10-23 21:46:17 +01:00
Ben Hutchings
44cc4d262f debian/rules: Make maintainerclean delete everything gencontrol.py creates
We were missing a couple of files added in the last year or so.
2019-09-27 00:37:53 +02:00
Ben Hutchings
01cce79427 debian/rules: Make maintainerclean delete (almost) everything clean does
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.
2019-09-27 00:34:10 +02:00
Ben Hutchings
8d7f8247b8 debian/{rules,.gitignore}: Delete patterns for xen-linux-system-*
These meta-packages have not been built since version 4.9~rc8-1~exp1.
2019-09-27 00:07:27 +02:00
Ben Hutchings
a26b75df3b debian/rules: Remove debian/*.substvars in clean target 2019-03-17 02:14:22 +00:00
Ben Hutchings
fdd6dadb4a Use dh_listpackages to determine which packages to build
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
2019-01-01 18:29:56 +00:00
Ben Hutchings
5a00e93df2 debian/rules: Mark more targets as phony 2018-12-01 19:18:56 +00:00
Ben Hutchings
c1578ede72 debian/rules: Checksum only the source name and version from debian/changelog
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.
2018-10-14 21:33:08 +01:00
Ben Hutchings
9ee715feb5 debian/rules{,.real}: Use /usr/share/dpkg/architecture.mk
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.
2018-09-13 11:18:26 +01:00
Ben Hutchings
cbebd8c763 udeb: Merge configuration directories and files across architectures
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.
2018-09-03 18:01:21 +01:00
Ben Hutchings
38dba741c6 debian/rules: Fix pkg.linux.notools build profile 2018-06-26 22:26:46 +01:00
Luca Boccassi
7e07ef0202 nodoc: don't build linux-doc and don't install tools documentation
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.
2018-05-02 12:59:55 +01:00
Bastian Blank
3a59f4711b Explicitely make binary-* make targets depend on build-* 2018-01-18 20:20:52 +01:00
Ben Hutchings
fe5c3cbe60 linux-doc: Build an empty package when the nodoc profile is used
Wiki page BuildProfileSpec says the set of binary packages can change,
but policy says not (since 4.0.0).
2017-09-30 13:50:30 +01:00
Ben Hutchings
9747655f89 Make the pickled config (config.defines.dump) reproducible 2017-01-07 18:25:56 +00:00
Ben Hutchings
62be722622 debian/rules: Tighten binNMU version matching, consistent with linux-latest 2016-12-18 02:49:52 +00:00
Ben Hutchings
6b6dd902ca debian/rules: Use dpkg-parsechangelog -S option to select fields 2016-12-18 02:26:21 +00:00
Ben Hutchings
3df161c94f linux-image: Use linux-check-removal command in prerm; remove debconf templates
This removes most of the remaining complexity from the script.
2016-06-06 17:21:34 +01:00
Ben Hutchings
59b5fabac6 debian/control,debian/rules,debian/rules.d: Support the 'nodoc' build profile 2016-05-15 03:11:42 +01:00
Ben Hutchings
43640872d9 debian/control,debian/rules: Support a 'pkg.linux.notools' build profile
...which does not build tools packages
2016-05-14 20:46:46 +01:00
Ben Hutchings
a5f7516c0c Merge linux-tools source package into linux (Closes: #550379, #573483, #816500)
* 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
2016-03-21 01:32:16 +00:00
Ben Hutchings
0033746862 Move makefile hierarchy to debian/rules.d; use debian/build for output only
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'.
2016-02-19 20:24:18 +00:00
Ben Hutchings
e1fd4b6f1e Move definition of OUTDIR from debian/build/**/Makefile to outer rules
Simplify things by making debian/rules.real, debian/rules and
debian/build/Makefile.inc (for the recursive case) set OUTDIR.
2016-02-19 20:02:31 +00:00
Ben Hutchings
291e65ffd0 debian/rules: Fix check for binNMU, broken since 4.1.4-1 2015-12-19 03:47:50 +00:00
Ben Hutchings
02e867b636 Fix parallel builds of both arch and indep binaries
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.
2015-12-10 02:44:23 +00:00
Ben Hutchings
be6de683ed debian/control,debian/rules: Support a 'stage1' build profile (Closes: #695243)
This builds only linux-libc-dev, needed by native compilers.
2015-11-10 13:34:39 +00:00
Ben Hutchings
198dbc7165 Fix the build-indep and binary-indep targets (fixes FTBFS for arch:all) 2015-10-14 02:15:06 +01:00
Ben Hutchings
5385ecc9a8 Move stamp directory creation into rules.real 2015-10-14 02:05:28 +01:00
Ben Hutchings
468eb97bf7 Remove the redundant build-base stamp file 2015-10-14 02:05:28 +01:00
Ben Hutchings
40299a2dbd debian/rules: Add support for DEB_BUILD_OPTIONS=parallel=N 2015-09-25 22:15:31 +01:00
Ben Hutchings
277d4945c7 debian/bin,debian/control,debian/lib/python,debian/rules: Use Python 3
debian/lib/python: Sync with linux package
2015-09-25 19:51:01 +01:00
Ben Hutchings
1e84c2a729 debian/rules: Exclude .git from maintainerclean rule 2015-08-11 19:09:44 +02:00
Bastian Blank
66fd690ba9 Use pre-defined version variables
svn path=/dists/trunk/linux-tools/; revision=22773
2015-06-28 19:30:14 +00:00
Bastian Blank
ab2a55f5f2 Use dpkg provided make-snippets
svn path=/dists/trunk/linux-tools/; revision=22772
2015-06-28 19:00:39 +00:00
Bastian Blank
81e4c8c921 debian/rules: Clean __pycache__ from current python versions.
svn path=/dists/trunk/linux/; revision=21352
2014-05-18 16:45:06 +00:00
Ben Hutchings
4f97c4f1e9 debian/rules: Don't kill a git-svn clone on "make -f debian/rules orig".
Thanks to Jon Severinsson.

svn path=/dists/trunk/linux-tools/; revision=20844
2013-12-02 05:25:21 +00:00
Ben Hutchings
39850b1cb4 Add debian/xen-linux-system-* to clean rules
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
2013-09-01 04:28:44 +00:00
Ben Hutchings
c382b12892 Use only one template syntax
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
2013-08-17 11:35:06 +00:00
Ben Hutchings
28acb1fbb6 Update policy version to 3.9.4
debian/rules: Implement build-arch and build-indep targets

svn path=/dists/trunk/linux-tools/; revision=20329
2013-07-02 05:15:33 +00:00
Ben Hutchings
b59c576e26 Merge changes from sid up to 3.8.11-1
svn path=/dists/trunk/linux/; revision=20053
2013-05-06 22:10:37 +00:00
Ben Hutchings
2725cdf944 Apply patches in orig target, matching "dpkg-source -x" and linux orig target
svn path=/dists/trunk/linux-tools/; revision=19889
2013-03-02 16:15:44 +00:00
Bastian Blank
fc7e60a278 debian/rules: Reorder rules.
svn path=/dists/trunk/linux/; revision=19550
2012-11-27 18:30:43 +00:00
Bastian Blank
230f4a9380 debian/rules: Remove extra base stamp files.
svn path=/dists/trunk/linux/; revision=19549
2012-11-27 18:29:19 +00:00
Bastian Blank
ec81c659a5 debian/rules, debian/rules.real: Remove unneeded chmod calls.
svn path=/dists/trunk/linux/; revision=19405
2012-10-04 13:06:29 +00:00
Ben Hutchings
e27b6aeb07 Add xz support, thanks to Sedat Dilek
svn path=/dists/trunk/linux-tools/; revision=19351
2012-08-21 04:49:15 +00:00
Ben Hutchings
bfa25d48b7 Explicitly set QUILT_PC when invoking quilt
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
2012-07-09 13:42:47 +00:00
Ben Hutchings
369f4bd8be Ignore .git directory when copying/comparing source
This helps people using git-svn checkouts (thanks to Yves-Alexis Perez)

svn path=/dists/sid/linux/; revision=19242
2012-07-09 13:28:07 +00:00
Bastian Blank
5a0ab9759f Support build-arch and build-indep make targets
* debian/rules, debian/rules.real:
  Support build-indep, rename build to build-arch.
* debian/bin/gencontrol.py, debian/lib/python/debian_linux/gencontrol.py:
  Add build-arch and build-indep.
* debian/changelog: Update.

svn path=/dists/sid/linux/; revision=19148
2012-06-14 14:39:30 +00:00
Ben Hutchings
5007f191ed Use xz compression for upstream and Debian tarballs
svn path=/dists/sid/linux/; revision=19099
2012-06-08 12:34:48 +00:00