Skip to contentSkip to conversation

builddeb: introduce profile excluding the dbg pkg

PATCH Superseded Bastian Germann 1 participant 3 messages Mar 13, 2023 Kbuild

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover builddeb: introduce profile excluding the dbg pkg

Introduce a Debian build profile to exclude the massive debug package during build. This was sent the first time as part of a patch series:
<[email protected]>

Most of the patch series is included in the current work on mkdebian but this is still missing.

A basic test showing better timing.
It is expected that the relative diff will be greater with more symbols:

make tinyconfig
# Enable CONFIG_DEBUG_INFO
time make deb-pkg

real    5m31,104s
user    4m30,960s
sys     0m46,296s

make clean
time make DPKG_FLAGS=--build-profiles=pkg.linux-upstream.nokerneldbg deb-pkg

real    5m28,076s
user    4m25,129s
sys     0m45,489s

Changelog:
v2:
* Align the profile name with the one that ended up in Debian.
v3:
* Prevent the creation of the dbg package when profile is set

Bastian Germann (1):
builddeb: introduce profile excluding the dbg pkg

 scripts/package/builddeb | 4 +++-
 scripts/package/mkdebian | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH v3 1/1 builddeb: introduce profile excluding the dbg pkg

Enabling CONFIG_DEBUG_INFO implies building the binary linux-image-*-dbg. As this increases package build time significantly, one might want to exclude it from being built.

Add build profile pkg.$sourcename.nokerneldbg for that package so it can be excluded via e.g.
make DPKG_FLAGS=--build-profiles=pkg.linux-upstream.nokerneldbg deb-pkg

The name is the same that is used in Debian's linux package since version 5.17~rc4-1~exp1.

---
 scripts/package/builddeb | 4 +++-
 scripts/package/mkdebian | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
scripts/package/builddeb +3 -1
index ff5e7d8e380b..d5320135e588 100755
@@ -128,7 +128,9 @@ parisc|mips|powerpc)
 	installed_image_path="boot/vmlinuz-$version"
 esac
 
-BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
+if [ "$DEB_BUILD_PROFILES" = "*nokerneldbg*" ]; then
+	BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
+fi
 
 # Setup the directory structure
 rm -rf "$tmpdir" "$dbg_dir" debian/files
scripts/package/mkdebian +1 -0
index f74380036bb5..8a7969926e53 100755
@@ -227,6 +227,7 @@ if is_enabled CONFIG_DEBUG_INFO; then
 cat <<EOF >> debian/control
 
 Package: linux-image-$version-dbg
+Build-Profiles: <!pkg.$sourcename.nokerneldbg>
 Section: debug
 Architecture: $debarch
 Description: Linux kernel debugging symbols for $version
Signature · 1 line
2.39.2
#2 lore raw
In reply to Bastian Germann

Am 13.03.23 um 10:41 schrieb Bastian Germann:

Quoted 5 lines

Changelog:
v2:
* Align the profile name with the one that ended up in Debian.
v3:
* Prevent the creation of the dbg package when profile is set

Please ignore v3. Sent the wrong patches.