all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH kernel 1/2] build: conditionalize -dbgsym package
Date: Wed, 21 Jul 2021 14:10:40 +0200	[thread overview]
Message-ID: <20210721121041.2921637-1-f.gruenbichler@proxmox.com> (raw)

via a new, namespaced build profile.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
test-built with and without build-profile enabled, no content difference
in the other debs.

 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: <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
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.30.2





             reply	other threads:[~2021-07-21 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 12:10 Fabian Grünbichler [this message]
2021-07-21 12:10 ` [pve-devel] [PATCH kernel 2/2] readme: document " Fabian Grünbichler
2021-07-29 15:19 ` [pve-devel] applied-series: Re: [PATCH kernel 1/2] build: conditionalize " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210721121041.2921637-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal