From 3b3e6ad4cba58ed6e12b72ab0cbdb61281e0a2d1 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 6 Apr 2018 22:14:14 +0200 Subject: [PATCH] Use a dummy build profile for udebs that we test-build before signing debhelper no longer fully trusts the package list specified with -p, but only processes packages that are listed in debian/control and enabled in the current build profile. This breaks the test build of udebs that we build for real after code signing. Work around this by adding the udebs to the control file, conditional on a new build profile (pkg.linux.udeb-unsigned-test-build). Override the build profile during the test build. --- debian/bin/gencontrol.py | 18 ++++++++++++------ debian/changelog | 1 + debian/rules.real | 3 +++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index a3fd364c6..6d20829cb 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -244,16 +244,22 @@ class Gencontrol(Base): raise RuntimeError('kernel-wedge exited with code %d' % kw_proc.returncode) - # kernel-wedge currently chokes on Build-Profiles so add it now - for package in udeb_packages: - package['Build-Profiles'] = '' - # If we're going to build signed udebs later, don't actually # generate udebs. Just test that we *can* build, so we find # configuration errors before building linux-signed. - if not build_signed: - merge_packages(packages, udeb_packages, arch) + # kernel-wedge currently chokes on Build-Profiles so add it now + for package in udeb_packages: + if build_signed: + # XXX This is a hack to exclude the udebs from + # the package list while still being able to + # convince debhelper and kernel-wedge to go + # part way to building them. + package['Build-Profiles'] = '' + else: + package['Build-Profiles'] = '' + + merge_packages(packages, udeb_packages, arch) # These packages must be built after the per-flavour/ # per-featureset packages. Also, this won't work diff --git a/debian/changelog b/debian/changelog index 6f63bd06c..ab01865a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -51,6 +51,7 @@ linux (4.16-1~exp1) UNRELEASED; urgency=medium changelog * debian/rules.d/tools/lib/lockdep/Makefile: Fix repeated 'make install' * Add template source package to support code signing + * Use a dummy build profile for udebs that we test-build before signing -- Roger Shimizu Fri, 23 Mar 2018 21:10:34 +0900 diff --git a/debian/rules.real b/debian/rules.real index 0d7df27ca..534501de5 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -518,6 +518,9 @@ install-signed-template_$(ARCH): install-udeb_$(ARCH): export KW_DEFCONFIG_DIR=debian/installer install-udeb_$(ARCH): export KW_CONFIG_DIR=debian/installer/$(ARCH) install-udeb_$(ARCH): DH_OPTIONS=$(PACKAGE_NAMES:%=-p%) +ifeq ($(UDEB_UNSIGNED_TEST_BUILD),True) +install-udeb_$(ARCH): export DEB_BUILD_PROFILES=pkg.linux.udeb-unsigned-test-build +endif install-udeb_$(ARCH): dh_testdir dh_prep