[linux] 02/02: linux-headers-common: Make these packages architecture-independent
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Nov 17 20:27:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch benh/linux-headers-common-all
in repository linux.
commit b9f4917e0a1faa8de15545728173b21668cf90f3
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Thu Nov 17 16:29:12 2016 +0000
linux-headers-common: Make these packages architecture-independent
Include headers for all architectures that we build a kernel for.
This allows co-installation of per-flavour header packages for
multiple Debian architectures, and fixes the problem of arm64 headers
depending on arm headers that we did not include.
---
debian/bin/gencontrol.py | 33 +++++++++++++++++++-------
debian/changelog | 2 ++
debian/rules.real | 29 ++++++++++++----------
debian/templates/control.headers.featureset.in | 16 +++++++------
4 files changed, 51 insertions(+), 29 deletions(-)
diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index 76a1790..ab0471e 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -125,6 +125,30 @@ class Gencontrol(Base):
'debian/linux-perf-%s.lintian-overrides' %
self.vars['version'])
+ def do_indep_featureset_setup(self, vars, makeflags, featureset, extra):
+ makeflags['LOCALVERSION'] = vars['localversion']
+ kernel_arches = set()
+ for arch in iter(self.config['base', ]['arches']):
+ if self.config.get_merge('base', arch, featureset, None, 'flavours'):
+ kernel_arches.add(self.config['base', arch]['kernel-arch'])
+ makeflags['ALL_KERNEL_ARCHES'] = ' '.join(sorted(list(kernel_arches)))
+
+ vars['featureset_desc'] = ''
+ if featureset != 'none':
+ desc = self.config[('description', None, featureset)]
+ desc_parts = desc['parts']
+ vars['featureset_desc'] = (' with the %s featureset' %
+ desc['part-short-%s' % desc_parts[0]])
+
+ def do_indep_featureset_packages(self, packages, makefile, featureset,
+ vars, makeflags, extra):
+ headers_featureset = self.templates["control.headers.featureset"]
+ packages.extend(self.process_packages(headers_featureset, vars))
+
+ cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-indep-featureset %s" %
+ makeflags]
+ makefile.add('binary-indep_%s_real' % featureset, cmds=cmds_binary_arch)
+
arch_makeflags = (
('kernel-arch', 'KERNEL_ARCH', False),
)
@@ -247,15 +271,6 @@ class Gencontrol(Base):
config_base = self.config.merge('base', arch, featureset)
makeflags['LOCALVERSION_HEADERS'] = vars['localversion_headers'] = vars['localversion']
- def do_featureset_packages(self, packages, makefile, arch, featureset, vars, makeflags, extra):
- headers_featureset = self.templates["control.headers.featureset"]
- package_headers = self.process_package(headers_featureset[0], vars)
-
- merge_packages(packages, (package_headers,), arch)
-
- cmds_binary_arch = ["$(MAKE) -f debian/rules.real binary-arch-featureset %s" % makeflags]
- makefile.add('binary-arch_%s_%s_real' % (arch, featureset), cmds=cmds_binary_arch)
-
flavour_makeflags_base = (
('compiler', 'COMPILER', False),
('kernel-arch', 'KERNEL_ARCH', False),
diff --git a/debian/changelog b/debian/changelog
index e96bdd6..c74f4bd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,8 @@ linux (4.8.8-1) UNRELEASED; urgency=medium
- DMA: Enable XGENE_DMA as module
- EDAC: Enable EDAC and EDAC_MM_EDAC, EDAC_XGENE as modules
* [x86] video: Disable X86_SYSFB, FB_SIMPLE (Closes: #822575)
+ * linux-headers-common: Make these packages architecture-independent by
+ including headers for all architectures that we build a kernel for
-- Salvatore Bonaccorso <carnil at debian.org> Tue, 15 Nov 2016 22:01:08 +0100
diff --git a/debian/rules.real b/debian/rules.real
index 418d7db..8fa8ab0 100644
--- a/debian/rules.real
+++ b/debian/rules.real
@@ -58,7 +58,6 @@ endif
ifneq ($(DO_LIBC),False)
binary-arch-arch: install-libc-dev_$(ARCH)
endif
-binary-arch-featureset: install-headers_$(ARCH)_$(FEATURESET)
binary-arch-flavour: install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
ifeq ($(DEBUG),True)
binary-arch-flavour: install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
@@ -88,6 +87,8 @@ ifneq ($(DO_TOOLS),False)
# binary-indep: install-lockdep
endif
+binary-indep-featureset: install-common-headers_$(FEATURESET)
+
build-arch-flavour: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
setup-arch-flavour: $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
@@ -268,13 +269,13 @@ install-headers_$(ARCH):
dh_testroot
+$(MAKE_SELF) install-base GENCONTROL_ARGS='-Vkernel:Arch=$(ARCH)'
-install-headers_$(ARCH)_$(FEATURESET): PACKAGE_NAME = linux-headers-$(ABINAME)-common$(LOCALVERSION_HEADERS)
-install-headers_$(ARCH)_$(FEATURESET): PACKAGE_NAME_KBUILD = linux-kbuild-$(VERSION)
-install-headers_$(ARCH)_$(FEATURESET): DH_OPTIONS = -p$(PACKAGE_NAME)
-install-headers_$(ARCH)_$(FEATURESET): BASE_DIR = /usr/src/$(PACKAGE_NAME)
-install-headers_$(ARCH)_$(FEATURESET): SOURCE_DIR = $(BUILD_DIR)/source_$(FEATURESET)
-install-headers_$(ARCH)_$(FEATURESET): DIR = debian/$(PACKAGE_NAME)/$(BASE_DIR)
-install-headers_$(ARCH)_$(FEATURESET): $(STAMPS_DIR)/source_$(FEATURESET)
+install-common-headers_$(FEATURESET): PACKAGE_NAME = linux-headers-$(ABINAME)-common$(LOCALVERSION)
+install-common-headers_$(FEATURESET): PACKAGE_NAME_KBUILD = linux-kbuild-$(VERSION)
+install-common-headers_$(FEATURESET): DH_OPTIONS = -p$(PACKAGE_NAME)
+install-common-headers_$(FEATURESET): BASE_DIR = /usr/src/$(PACKAGE_NAME)
+install-common-headers_$(FEATURESET): SOURCE_DIR = $(BUILD_DIR)/source_$(FEATURESET)
+install-common-headers_$(FEATURESET): DIR = debian/$(PACKAGE_NAME)/$(BASE_DIR)
+install-common-headers_$(FEATURESET): $(STAMPS_DIR)/source_$(FEATURESET)
dh_testdir
dh_testroot
dh_prep
@@ -282,11 +283,13 @@ install-headers_$(ARCH)_$(FEATURESET): $(STAMPS_DIR)/source_$(FEATURESET)
set -o pipefail; \
cd $(SOURCE_DIR); \
( \
- echo Makefile; \
- find arch/$(KERNEL_ARCH) -maxdepth 1 -name 'Makefile*' -print; \
- find arch/$(KERNEL_ARCH) \( -name 'module.lds' -o -name 'Kbuild.platforms' -o -name 'Platform' \) -print; \
- find $$(find arch/$(KERNEL_ARCH) \( -name include -o -name scripts \) -type d -print) -print; \
- find include -print; \
+ echo Makefile; \
+ for arch in $(ALL_KERNEL_ARCHES); do \
+ find arch/$$arch -maxdepth 1 -name 'Makefile*' -print; \
+ find arch/$$arch \( -name 'module.lds' -o -name 'Kbuild.platforms' -o -name 'Platform' \) -print; \
+ find $$(find arch/$$arch \( -name include -o -name scripts \) -type d -print) -print; \
+ done; \
+ find include -print; \
) \
| \
cpio -pd --preserve-modification-time '$(CURDIR)/$(DIR)'
diff --git a/debian/templates/control.headers.featureset.in b/debian/templates/control.headers.featureset.in
index f185e77..d9e52cb 100644
--- a/debian/templates/control.headers.featureset.in
+++ b/debian/templates/control.headers.featureset.in
@@ -1,9 +1,11 @@
-Package: linux-headers- at abiname@-common at localversion_headers@
+Package: linux-headers- at abiname@-common at localversion@
Build-Profiles: <!stage1>
+Architecture: all
Depends: ${misc:Depends}
-Description: Common header files for Linux @abiname@@localversion_headers@
- This package provides the architecture-specific common kernel header files
- for Linux kernel version @abiname@@localversion_headers@, generally used for building out-of-tree
- kernel modules. To obtain a complete set of headers you also need to install
- the linux-headers- at abiname@-(flavour) package, matching the
- flavour of the kernel you intend the build for.
+Multi-Arch: foreign
+Description: Common header files for Linux @abiname@@localversion@
+ This package provides the common kernel header files for Linux kernel
+ version @abiname@@featureset_desc@, generally used for building
+ out-of-tree kernel modules. To obtain a complete set of headers you
+ also need to install the linux-headers- at abiname@-(flavour) package,
+ matching the flavour of the kernel you intend the build for.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list