[REVIEW 2/3][linux-signed] UBUNTU: [Packaging] Depend on header packages rather than linux-libc-dev

Seth Forshee seth.forshee at canonical.com
Tue Dec 3 22:26:46 UTC 2019


Since we will not produce linux-libc-dev when not building for
the primary variant we can no longer use it as a build dependency
to indicate that the arch kernel build is complete. Instead,
depend on the per-arch headers package and the common headers
package required for the per-arch package to install, and use the
header package for download-signed.

Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
---
 debian/control.stub |  3 ++-
 debian/rules        | 12 ++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/debian/control.stub b/debian/control.stub
index cada6c9a795b..c39e9c301600 100644
--- a/debian/control.stub
+++ b/debian/control.stub
@@ -9,7 +9,8 @@ Build-Depends:
  python3-apt,
 Build-Depends-Arch:
  sbsigntool [amd64 arm64],
- linux-libc-dev (>= UNSIGNED_SRC_VERSION),
+ HEADERS_COMMON (>= UNSIGNED_SRC_VERSION),
+ HEADERS_ARCH (>= UNSIGNED_SRC_VERSION),
 Standards-Version: 3.9.4
 
 Package: linux-image-ABI-generic
diff --git a/debian/rules b/debian/rules
index 743f764fb284..f12937bd59d4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,12 @@ abi = $(shell echo "$(ver)" | sed -ne 's/\([0-9]*\.[0-9]*\.[0-9]*\-[0-9]*\)\..*/
 unsigned_src = $(shell echo $(src) | sed -e 's/-signed//')
 unsigned_ver = $(shell echo $(ver) | sed -e 's/+[0-9][0-9]*//')
 
+# Work out header packges for build deps. Depend on the common header
+# package and the per-arch generic headers package (assumes all arches
+# have a generic flavour, which is currently true).
+src_headers = $(unsigned_src)-headers-$(abi)
+src_headers_arch = linux-headers-$(abi)-generic
+
 # We build our control file.  This has to be done before dh runs otherwise
 # we have no binary files and we will not run the appropriate targets.
 pre-clean:
@@ -21,7 +27,9 @@ pre-clean:
 		-e "s/ABI/$(abi)/g"					\
 		-e "s/UNSIGNED_SRC_PACKAGE/$(unsigned_src)/g"		\
 		-e "s/UNSIGNED_SRC_VERSION/$(unsigned_ver)/g"		\
-		-e 's/SIGNED_SRC_PACKAGE/$(src)/g'
+		-e 's/SIGNED_SRC_PACKAGE/$(src)/g'			\
+		-e 's/HEADERS_COMMON/$(src_headers)/g'			\
+		-e 's/HEADERS_ARCH/$(src_headers_arch)/g'
 	rm -rf ./$(unsigned_ver) UNSIGNED SIGNED
 	rm -f 	debian/linux-image-*.install				\
 		debian/linux-image-*.preinst 				\
@@ -38,7 +46,7 @@ clean:: pre-clean
 	dh $@
 
 override_dh_auto_build:
-	./download-signed "linux-libc-dev" "$(unsigned_ver)" "$(unsigned_src)"
+	./download-signed "$(src_headers_arch)" "$(unsigned_ver)" "$(unsigned_src)"
 	#./download-unsigned "$(DEB_HOST_ARCH)" "$(unsigned_ver)"
 	mkdir SIGNED
 	(									\
-- 
2.24.0




More information about the kernel-team mailing list