linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/1] builddeb: introduce profile excluding the dbg pkg
@ 2023-03-13 14:17 Bastian Germann
  2023-03-13 14:17 ` [PATCH v4 1/1] " Bastian Germann
  0 siblings, 1 reply; 2+ messages in thread
From: Bastian Germann @ 2023-03-13 14:17 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Bastian Germann, Nathan Chancellor, Nick Desaulniers,
	linux-kbuild, linux-kernel

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:
<20210411101422.7092-6-bage@linutronix.de>

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.
v4:
 * 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(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v4 1/1] builddeb: introduce profile excluding the dbg pkg
  2023-03-13 14:17 [PATCH v4 0/1] builddeb: introduce profile excluding the dbg pkg Bastian Germann
@ 2023-03-13 14:17 ` Bastian Germann
  0 siblings, 0 replies; 2+ messages in thread
From: Bastian Germann @ 2023-03-13 14:17 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Bastian Germann, Nathan Chancellor, Nick Desaulniers,
	linux-kbuild, linux-kernel

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.

Link: https://wiki.debian.org/BuildProfileSpec
Link: https://salsa.debian.org/kernel-team/linux/-/commit/140798ec2789
Signed-off-by: Bastian Germann <bage@linutronix.de>
---
 scripts/package/builddeb | 4 +++-
 scripts/package/mkdebian | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ff5e7d8e380b..30f3948b8c7c 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -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}" = "$DEB_BUILD_PROFILES" ]; then
+	BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
+fi
 
 # Setup the directory structure
 rm -rf "$tmpdir" "$dbg_dir" debian/files
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index f74380036bb5..8a7969926e53 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -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
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-13 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-13 14:17 [PATCH v4 0/1] builddeb: introduce profile excluding the dbg pkg Bastian Germann
2023-03-13 14:17 ` [PATCH v4 1/1] " Bastian Germann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).