]> git.proxmox.com Git - pve-kernel.git/commitdiff
build: conditionalize -dbgsym package
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 21 Jul 2021 12:10:40 +0000 (14:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Jul 2021 16:26:52 +0000 (18:26 +0200)
via a new, namespaced build profile.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/control.in
debian/rules

index 7194d0002a10179ca45d1da6b53a7870f94c02ff..ee91978ebaa3ea5267f2cd8753504173c6ef21bf 100644 (file)
@@ -71,6 +71,7 @@ Architecture: any
 Provides: linux-debug
 Section: devel
 Priority: optional
+Build-Profiles: <pkg.pve-kernel.debug>
 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
index a5007622afc55d9796c42ad4b77fa88403c43cb0..e338a016b1aedf8f1708640d21a267360f74b402 100755 (executable)
@@ -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