[L/unstable 07/13] UBUNTU: [Packaging] Remove meaningless code in install-arch-headers
Masahiro Yamada
masahiro.yamada at canonical.com
Mon Dec 5 08:56:13 UTC 2022
install-arch-headers pointlessly constructs the .config before
running 'make headers_install'.
The kernel promises the stable interface to userspace; this is
backward-compatible and of course, independent of the kernel
configuration.
Kbuild does not include include/config/auto.conf for 'make headers*'
targets in the first place. [1]
[1]: https://github.com/torvalds/linux/blob/v6.0/Makefile#L271
Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
---
debian/rules.d/2-binary-arch.mk | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 56353ff6165f..2737638d1134 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -542,7 +542,7 @@ headers_tmp := $(CURDIR)/debian/tmp-headers
headers_dir := $(CURDIR)/debian/linux-libc-dev
hmake := $(MAKE) -C $(CURDIR) O=$(headers_tmp) \
- KERNELVERSION=$(abi_release) INSTALL_HDR_PATH=$(headers_tmp)/install \
+ INSTALL_HDR_PATH=$(headers_tmp)/install \
SHELL="$(SHELL)" ARCH=$(header_arch)
.PHONY: install-arch-headers
@@ -553,25 +553,15 @@ 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/
-
- $(hmake) $(defconfig)
- mv $(headers_tmp)/.config $(headers_tmp)/.config.old
- sed -e 's/^# \(CONFIG_MODVERSIONS\) is not set$$/\1=y/' \
- -e 's/.*CONFIG_LOCALVERSION_AUTO.*/# CONFIG_LOCALVERSION_AUTO is not set/' \
- $(headers_tmp)/.config.old > $(headers_tmp)/.config
- $(hmake) syncconfig
$(hmake) 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
--
2.34.1
More information about the kernel-team
mailing list