NAK: [L/unstable 10/13] UBUNTU: [Packaging] install headers to debian/linux-libc-dev directly
Andrea Righi
andrea.righi at canonical.com
Fri Mar 10 17:30:01 UTC 2023
On Mon, Dec 05, 2022 at 05:56:16PM +0900, Masahiro Yamada wrote:
> 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>
> ---
FYI, I've reverted this patch in lunar/linux, because with this change
we're adding .cmd and binary files to linux-libc-dev that are
introducing regressions, see LP: #2009355.
-Andrea
> 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
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list