[Q][PATCH 1/1] UBUNTU: [Packaging] Don't generate list of source files
Juerg Haefliger
juerg.haefliger at canonical.com
Mon Aug 11 12:36:01 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2104911
Generating the list of source files used for the build takes a very long
time on some architecures. Up to 30 mins. Lets not do that. We have all
that information in the debug packages and can collect it from there after
the build.
Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
---
debian.master/control.stub.in | 1 -
debian/rules | 1 -
debian/rules.d/0-common-vars.mk | 7 -------
debian/rules.d/1-maintainer.mk | 1 -
debian/rules.d/2-binary-arch.mk | 14 --------------
5 files changed, 24 deletions(-)
diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in
index 5559498f50e5..53f53d945eb8 100644
--- a/debian.master/control.stub.in
+++ b/debian.master/control.stub.in
@@ -16,7 +16,6 @@ Build-Depends:
debhelper-compat (= 10),
default-jdk-headless:native <!stage1>,
dkms <!stage1>,
- dwarfdump:native <!stage1>,
flex <!stage1>,
gawk <!stage1>,
java-common <!stage1>,
diff --git a/debian/rules b/debian/rules
index e03555f2755d..3ba65aaf46cc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -108,7 +108,6 @@ ifeq ($(do_mainline_build),true)
no_dumpfile=1
$(foreach _m,$(all_dkms_modules),$(eval do_$(_m) = false))
do_skip_checks=true
- do_sources_list = false
endif
# Disable tools build and packaging if do_tools != true
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 6a0c37493fa4..8e16a4f2ada7 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -154,13 +154,6 @@ ifeq ($(DEB_DISTRIBUTION),jammy)
do_zstd_ko=
endif
-# Generate a list of source files used for the build
-ifeq ($(DEB_SOURCE),linux-unstable)
- do_sources_list = false
-else
- do_sources_list = true
-endif
-
# Support parallel=<n> in DEB_BUILD_OPTIONS (see #209008)
#
# These 2 environment variables set the -j value of the kernel build. For example,
diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index 8431c65ca1c5..6892f71b7964 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -71,7 +71,6 @@ printenv:
@echo "do_flavour_header_package = $(do_flavour_header_package)"
@echo "do_common_headers_indep = $(do_common_headers_indep)"
@echo "do_lib_rust = $(do_lib_rust)"
- @echo "do_sources_list = $(do_sources_list)"
@echo "do_tools = $(do_tools)"
@echo "do_tools_common = $(do_tools_common)"
@echo "do_any_tools = $(do_any_tools)"
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 74927753e04d..d6f779f125be 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -68,18 +68,6 @@ ifeq ($(do_linux_tools),true)
endif
endif
endif
-
- # Collect the list of kernel source files used for this build. Need to do this early
- # before modules are stripped. Fail if the resulting file is empty.
-ifeq ($(do_sources_list),true)
- find $(build_dir) \( -name vmlinux -o -name \*.ko \) -exec dwarfdump -i {} \; | \
- grep -E 'DW_AT_(call|decl)_file' | sed -n 's|.*\s/|/|p' | sort -u > \
- $(build_dir)/sources.list
- test -s $(build_dir)/sources.list
-else
- true > $(build_dir)/sources.list
-endif
-
$(stamp)
define build_dkms_sign =
@@ -455,8 +443,6 @@ endif
fi
install -m644 debian/canonical-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-certs.pem
install -m644 debian/canonical-revoked-certs.pem $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/canonical-revoked-certs.pem
- # List of source files used for this build
- install -m644 $(build_dir)/sources.list $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/sources
# Get rid of .o and .cmd artifacts in headers
find $(hdrdir) -name \*.o -or -name \*.cmd -exec rm -f {} \;
--
2.48.1
More information about the kernel-team
mailing list