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 59b2bd05f5),
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@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
Masahiro Yamada
2023-07-28 22:38:17 +09:00
committed by Paolo Pisati
parent c1250cc308
commit ef7a670e13
+1 -6
View File
@@ -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)