[L/unstable 10/13] UBUNTU: [Packaging] install headers to debian/linux-libc-dev directly
Masahiro Yamada
masahiro.yamada at canonical.com
Mon Dec 5 08:56:16 UTC 2022
The header installation is somewhat complex; 'make headers_install'
installs headers to debian/tmp-headers, then cpio copies them to
debian/linux-libc-dev, pruning '.*' files.
My best guess for the reason of this indirection is to avoid garbage
files contained in the packages.
In fact, "make headers_install" used to create dot files '.install'
and '.check' in the install destination.
Since Linux 5.3 (or more specifically since commit 59b2bd05f5f4),
headers_install does not install any dot files.
Specify the final destination to INSTALL_HDR_PATH, and you can get
clean installation.
Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 3d03ee610d0b..40a4e2d6feef 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -538,11 +538,10 @@ ifneq ($(full_build),false)
endif
@touch $@
-headers_tmp := $(CURDIR)/debian/tmp-headers
headers_dir := $(CURDIR)/debian/linux-libc-dev
-hmake := $(MAKE) -C $(CURDIR) O=$(headers_tmp) \
- INSTALL_HDR_PATH=$(headers_tmp)/install \
+hmake := $(MAKE) -C $(CURDIR) O=$(headers_dir) \
+ INSTALL_HDR_PATH=$(headers_dir)/install \
SHELL="$(SHELL)" ARCH=$(header_arch)
.PHONY: install-arch-headers
@@ -553,16 +552,11 @@ install-arch-headers:
ifeq ($(do_libc_dev_package),true)
dh_prep -plinux-libc-dev
endif
- rm -rf $(headers_tmp)
- install -d $(headers_tmp) $(headers_dir)/usr/include/
+ rm -rf $(headers_dir)
+ install -d $(headers_dir)/usr/include/
$(hmake) $(conc_level) headers_install
- ( cd $(headers_tmp)/install/include/ && \
- find . -name '.' -o -name '.*' -prune -o -print | \
- cpio -pvd --preserve-modification-time \
- $(headers_dir)/usr/include/ )
mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)
mv $(headers_dir)/usr/include/asm $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/
- rm -rf $(headers_tmp)
define dh_all
dh_installchangelogs -p$(1)
--
2.34.1
More information about the kernel-team
mailing list