From ef7a670e1321fa0cac118e0094efd0662db7b91d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 28 Jul 2023 22:38:17 +0900 Subject: [PATCH] UBUNTU: [Packaging] install headers to debian/linux-libc-dev directly 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 Signed-off-by: Andrea Righi --- debian/rules.d/2-binary-arch.mk | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 4242875fe71b..53fbb55c198a 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -558,12 +558,7 @@ ifeq ($(do_libc_dev_package),true) dh_prep -plinux-libc-dev endif rm -rf $(headers_tmp) $(headers_dir) - install -d $(headers_tmp) $(headers_dir)/usr/include/ - $(kmake) O=$(headers_tmp) INSTALL_HDR_PATH=$(headers_tmp)/install $(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/ ) + $(kmake) O=$(headers_tmp) INSTALL_HDR_PATH=$(headers_dir)/usr $(conc_level) headers_install 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)