public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Pratham Patel <prathampatel@thefossguy.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	Jonathan Corbet <corbet@lwn.net>
Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Pratham Patel <prathampatel@thefossguy.com>,
	thefirst1322@gmail.com
Subject: [PATCH 1/2] kbuild: allow toggling the `with_devel` RPM macro
Date: Wed, 17 Apr 2024 04:37:46 +0000	[thread overview]
Message-ID: <20240417043654.60662-2-prathampatel@thefossguy.com> (raw)
In-Reply-To: <20240417043654.60662-1-prathampatel@thefossguy.com>

As it stands, there is no way to toggle the `with_devel` RPM macro
that is defined in the scripts/package/kernel.spec file, without
manually building the RPM.

Introduce the Kbuild variable KBUILD_RPM_WITH_DEVEL to toggle the
`with_devel` macro when building the binary PRM package.

The prior default of not building the `-devel` RPM package is preserved.

Signed-off-by: Pratham Patel <prathampatel@thefossguy.com>
---
 scripts/Makefile.package | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 38653f3e8108..715e068eae60 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -47,6 +47,8 @@ $(linux-tarballs): .tmp_HEAD FORCE
 # rpm-pkg srcrpm-pkg binrpm-pkg
 # ---------------------------------------------------------------------------
 
+export KBUILD_RPM_WITH_DEVEL ?= 0
+
 quiet_cmd_mkspec = GEN     $@
       cmd_mkspec = $(srctree)/scripts/package/mkspec $@
 
@@ -71,7 +73,8 @@ rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec
 	+$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \
 	--define='_topdir $(abspath rpmbuild)' \
 	$(if $(filter a b, $(build-type)), \
-		--target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \
+		--target $(UTS_MACHINE)-linux --build-in-place --noprep \
+		--define='_smp_mflags %{nil}' --define='with_devel $(KBUILD_RPM_WITH_DEVEL)' \
 		$$(rpm -q rpm >/dev/null 2>&1 || echo --nodeps)) \
 	$(RPMOPTS))
 
-- 
2.42.0



  reply	other threads:[~2024-04-17  4:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  4:37 [PATCH 0/2] Enable building of the devel RPM package from Kbuild Pratham Patel
2024-04-17  4:37 ` Pratham Patel [this message]
2024-04-17  4:37 ` [PATCH 2/2] docs: kbuild: document KBUILD_RPM_WITH_DEVEL Pratham Patel
2024-04-17 14:48 ` [PATCH 0/2] Enable building of the devel RPM package from Kbuild Nathan Chancellor
2024-04-17 15:08   ` Pratham Patel
2024-04-17 15:47     ` Nathan Chancellor
2024-04-17 15:50       ` Pratham Patel
2024-04-20  7:29         ` Masahiro Yamada

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=20240417043654.60662-2-prathampatel@thefossguy.com \
    --to=prathampatel@thefossguy.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=thefirst1322@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox