From cd07c2e48b49b2479b7803916747f5e8b27645d5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 18 Jan 2019 20:18:54 +0000 Subject: [PATCH] debian/rules.d, debian/rules.real: Restore build of userland headers for tools Since commit f5f169ba999c "Split build rules for tools to allow skipping them." debian/rules.d/Makefile is not used and the current kernel's UAPI headers are not installed. This hasn't caused breakage yet, probably because many tools have their own workaround using include/uapi etc. directly, but could break backports builds at some point. Move the build of userland headers up into debian/rules.real and make all tools build targets depend on it. --- debian/changelog | 5 +++++ debian/rules.d/Makefile | 8 -------- debian/rules.real | 23 +++++++++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index d527611b8..a1d431177 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,15 @@ linux (4.19.16-2) UNRELEASED; urgency=medium + [ Luca Boccassi ] * Do not generate linux-source-$ver stanza in debian/control if source is set to disabled in debian/config/defines. * linux-perf: explicitly disable the jvmti feature and shared library. * Document pkg.linux.nosource in debian/README.source. + [ Ben Hutchings ] + * debian/rules.d, debian/rules.real: Restore build of userland headers for + tools + -- Luca Boccassi Fri, 18 Jan 2019 19:09:06 +0000 linux (4.19.16-1) unstable; urgency=medium diff --git a/debian/rules.d/Makefile b/debian/rules.d/Makefile index 4a252c5ca..4acd82dd6 100644 --- a/debian/rules.d/Makefile +++ b/debian/rules.d/Makefile @@ -12,11 +12,3 @@ ifneq ($(filter powerpc powerpcspe ppc64,$(DEB_HOST_ARCH)),) endif include $(top_rulesdir)/Makefile.inc - -# Build userland headers first -unexport VERSION -all-local: - mkdir -p headers-tools - $(MAKE) -C $(top_srcdir) ARCH=$(KERNEL_ARCH) O=$(CURDIR)/headers-tools \ - INSTALL_HDR_PATH=$(CURDIR) headers_install -all-recursive: all-local diff --git a/debian/rules.real b/debian/rules.real index 16e777b31..ef860dc93 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -596,7 +596,14 @@ define make-tools +mkdir -p $(BUILD_DIR)/build-tools/$(1) && $(MAKE_CLEAN) -C $(BUILD_DIR)/build-tools/$(1) -f $(CURDIR)/debian/rules.d/$(1)/Makefile top_srcdir=$(CURDIR) top_rulesdir=$(CURDIR)/debian/rules.d OUTDIR=$(1) VERSION=$(VERSION) KERNEL_ARCH=$(KERNEL_ARCH) endef -build-kbuild: +$(STAMPS_DIR)/build-tools-headers: + mkdir -p $(BUILD_DIR)/build-tools/headers-tools + $(MAKE) ARCH=$(KERNEL_ARCH) O=$(BUILD_DIR)/build-tools/headers-tools \ + INSTALL_HDR_PATH=$(CURDIR)/$(BUILD_DIR)/build-tools \ + headers_install + @$(stamp) + +build-kbuild: $(STAMPS_DIR)/build-tools-headers $(call make-tools,scripts) $(call make-tools,tools/objtool) @@ -624,7 +631,7 @@ endif dh_md5sums dh_builddeb -build-cpupower: +build-cpupower: $(STAMPS_DIR)/build-tools-headers $(call make-tools,tools/power/cpupower) ifneq ($(filter i386 amd64 x32,$(DEB_HOST_ARCH)),) $(call make-tools,tools/power/x86) @@ -664,7 +671,7 @@ endif dh_md5sums dh_builddeb -build-perf: +build-perf: $(STAMPS_DIR)/build-tools-headers $(call make-tools,tools/perf) install-perf: PACKAGE_NAME = linux-perf-$(VERSION) @@ -693,7 +700,7 @@ endif dh_md5sums dh_builddeb -build-usbip: +build-usbip: $(STAMPS_DIR)/build-tools-headers $(call make-tools,tools/usb/usbip) install-usbip: DH_OPTIONS = -pusbip @@ -721,7 +728,7 @@ endif dh_md5sums dh_builddeb -build-hyperv-daemons: +build-hyperv-daemons: $(STAMPS_DIR)/build-tools-headers $(call make-tools,tools/hv) install-hyperv-daemons: PACKAGE_NAME = hyperv-daemons @@ -759,7 +766,7 @@ endif dh_md5sums dh_builddeb -build-libbpf: +build-libbpf: $(STAMPS_DIR)/build-tools-headers $(call make-tools,tools/lib/bpf) install-libbpf: DH_OPTIONS = -plibbpf$(VERSION) -plibbpf-dev @@ -787,7 +794,7 @@ endif dh_md5sums dh_builddeb -build-liblockdep: +build-liblockdep: $(STAMPS_DIR)/build-tools-headers $(call make-tools,tools/lib/lockdep) install-liblockdep: DH_OPTIONS = -pliblockdep$(VERSION) -pliblockdep-dev @@ -838,7 +845,7 @@ endif dh_md5sums dh_builddeb -build-bootwrapper: +build-bootwrapper: $(STAMPS_DIR)/build-tools-headers $(call make-tools,arch/powerpc/boot) install-bootwrapper: PACKAGE_NAME = linux-bootwrapper-$(ABINAME)