lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230313094106.46770-2-bage@linutronix.de>
Date:   Mon, 13 Mar 2023 10:41:06 +0100
From:   Bastian Germann <bage@...utronix.de>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Bastian Germann <bage@...utronix.de>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [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.

Link: https://wiki.debian.org/BuildProfileSpec
Link: https://salsa.debian.org/kernel-team/linux/-/commit/140798ec2789
Signed-off-by: Bastian Germann <bage@...utronix.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..d5320135e588 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*" ]; 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ