lkml.org 
[lkml]   [2024]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2] kbuild: allow toggling the `with_devel` RPM macro
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


\
 
 \ /
  Last update: 2024-04-17 06:38    [W:0.773 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site