From 04f7144d550119b7fd125a21f6ce74a659c7cfe4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 21 Jul 2021 14:10:40 +0200 Subject: [PATCH] build: conditionalize -dbgsym package MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit via a new, namespaced build profile. Signed-off-by: Fabian Grünbichler --- debian/control.in | 1 + debian/rules | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/control.in b/debian/control.in index 7194d00..ee91978 100644 --- a/debian/control.in +++ b/debian/control.in @@ -71,6 +71,7 @@ Architecture: any Provides: linux-debug Section: devel Priority: optional +Build-Profiles: Description: The Proxmox PVE Kernel debug image This package provides the kernel debug image for version @KVNAME@. The debug kernel image contained in this package is NOT meant to boot from - it is diff --git a/debian/rules b/debian/rules index a500762..e338a01 100755 --- a/debian/rules +++ b/debian/rules @@ -138,7 +138,10 @@ binary: install # remove firmware rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware - # debug package +ifeq ($(filter pkg.pve-kernel.debug,$(DEB_BUILD_PROFILES)),) + echo "'pkg.pve-kernel.debug' build profile disabled, skipping -dbgsym creation" +else + echo "'pkg.pve-kernel.debug' build profile enabled, creating -dbgsym contents" mkdir -p debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME} mkdir debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot install -m 644 ${KERNEL_SRC}/vmlinux debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot/vmlinux-${KVNAME} @@ -146,6 +149,7 @@ binary: install rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/source rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/build rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/modules.* +endif # strip debug info find debian/${PVE_KERNEL_PKG}/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done -- 2.39.2