2024-04-17 04:38:56

by Pratham Patel

[permalink] [raw]
Subject: [PATCH 0/2] Enable building of the devel RPM package from Kbuild

This addresses a minor nit where I want a `-devel` RPM package to be
built when I build a binary RPM package with either `binrpm-pkg`
or `rpm-pkg` target(s).

Pratham Patel (2):
kbuild: allow toggling the `with_devel` RPM macro
docs: kbuild: document KBUILD_RPM_WITH_DEVEL

Documentation/kbuild/kbuild.rst | 6 ++++++
scripts/Makefile.package | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)

--
2.42.0



2024-04-17 04:39:22

by Pratham Patel

[permalink] [raw]
Subject: [PATCH 2/2] docs: kbuild: document KBUILD_RPM_WITH_DEVEL

KBUILD_RPM_WITH_DEVEL was added to toggle the `with_devel` RPM macro.
Add brief documentation on its usage.

Signed-off-by: Pratham Patel <[email protected]>
---
Documentation/kbuild/kbuild.rst | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst
index 9c8d1d046ea5..0b7ae268ac67 100644
--- a/Documentation/kbuild/kbuild.rst
+++ b/Documentation/kbuild/kbuild.rst
@@ -310,6 +310,12 @@ These two variables allow to override the user@host string displayed during
boot and in /proc/version. The default value is the output of the commands
whoami and host, respectively.

+KBUILD_RPM_WITH_DEVEL
+---------------------
+This variable dictates weather creating an RPM package also builds a `-devel`
+package or not. Set to 1 if you want a `-devel` package. The default value
+is 0.
+
LLVM
----
If this variable is set to 1, Kbuild will use Clang and LLVM utilities instead
--
2.42.0



2024-04-17 14:51:07

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH 0/2] Enable building of the devel RPM package from Kbuild

On Wed, Apr 17, 2024 at 04:37:32AM +0000, Pratham Patel wrote:
> This addresses a minor nit where I want a `-devel` RPM package to be
> built when I build a binary RPM package with either `binrpm-pkg`
> or `rpm-pkg` target(s).
>
> Pratham Patel (2):
> kbuild: allow toggling the `with_devel` RPM macro
> docs: kbuild: document KBUILD_RPM_WITH_DEVEL
>
> Documentation/kbuild/kbuild.rst | 6 ++++++
> scripts/Makefile.package | 5 ++++-
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> --
> 2.42.0
>

Hmmm, when I execute

$ make -skj"$(nproc)" ARCH=x86_64 O=build mrproper defconfig binrpm-pkg

I end up with

$ ls -1 build/rpmbuild/RPMS/x86_64
kernel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
kernel-devel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
kernel-headers-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm

so it seems like this is already happening?

Cheers,
Nathan

2024-04-17 15:09:32

by Pratham Patel

[permalink] [raw]
Subject: Re: [PATCH 0/2] Enable building of the devel RPM package from Kbuild

On Wed Apr 17, 2024 at 8:18 PM IST, Nathan Chancellor wrote:
> On Wed, Apr 17, 2024 at 04:37:32AM +0000, Pratham Patel wrote:
> > This addresses a minor nit where I want a `-devel` RPM package to be
> > built when I build a binary RPM package with either `binrpm-pkg`
> > or `rpm-pkg` target(s).
> >
> > Pratham Patel (2):
> > kbuild: allow toggling the `with_devel` RPM macro
> > docs: kbuild: document KBUILD_RPM_WITH_DEVEL
> >
> > Documentation/kbuild/kbuild.rst | 6 ++++++
> > scripts/Makefile.package | 5 ++++-
> > 2 files changed, 10 insertions(+), 1 deletion(-)
> >
> > --
> > 2.42.0
> >
>
> Hmmm, when I execute
>
> $ make -skj"$(nproc)" ARCH=x86_64 O=build mrproper defconfig binrpm-pkg
>
> I end up with
>
> $ ls -1 build/rpmbuild/RPMS/x86_64
> kernel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> kernel-devel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> kernel-headers-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
>
> so it seems like this is already happening?
>
> Cheers,
> Nathan

Ah sorry, that was a typo. I meant to say the following:
"This addresses a minor nit where I **don't** want a `-devel` RPM
package to be built when I build a binary RPM package with either
`binrpm-pkg` or `rpm-pkg` target(s)."

That is because on ARM systems where I just need to quickly test the
upstream defconfig, I don't really need the `-devel` package.

Also, I see that in a hurry, I did the opposite of what I wanted in the
patches. This went unnoticed since I had KBUILD_RPM_WITH_DEVEL=0 for me
during testing. Sorry about that!

I'll send a v2 fixing this stupid mistake.

-- Pratham Patel


2024-04-17 15:51:25

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH 0/2] Enable building of the devel RPM package from Kbuild

On Wed, Apr 17, 2024 at 03:08:57PM +0000, Pratham Patel wrote:
> On Wed Apr 17, 2024 at 8:18 PM IST, Nathan Chancellor wrote:
> > On Wed, Apr 17, 2024 at 04:37:32AM +0000, Pratham Patel wrote:
> > > This addresses a minor nit where I want a `-devel` RPM package to be
> > > built when I build a binary RPM package with either `binrpm-pkg`
> > > or `rpm-pkg` target(s).
> > >
> > > Pratham Patel (2):
> > > kbuild: allow toggling the `with_devel` RPM macro
> > > docs: kbuild: document KBUILD_RPM_WITH_DEVEL
> > >
> > > Documentation/kbuild/kbuild.rst | 6 ++++++
> > > scripts/Makefile.package | 5 ++++-
> > > 2 files changed, 10 insertions(+), 1 deletion(-)
> > >
> > > --
> > > 2.42.0
> > >
> >
> > Hmmm, when I execute
> >
> > $ make -skj"$(nproc)" ARCH=x86_64 O=build mrproper defconfig binrpm-pkg
> >
> > I end up with
> >
> > $ ls -1 build/rpmbuild/RPMS/x86_64
> > kernel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > kernel-devel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > kernel-headers-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> >
> > so it seems like this is already happening?
> >
> > Cheers,
> > Nathan
>
> Ah sorry, that was a typo. I meant to say the following:
> "This addresses a minor nit where I **don't** want a `-devel` RPM
> package to be built when I build a binary RPM package with either
> `binrpm-pkg` or `rpm-pkg` target(s)."
>
> That is because on ARM systems where I just need to quickly test the
> upstream defconfig, I don't really need the `-devel` package.
>
> Also, I see that in a hurry, I did the opposite of what I wanted in the
> patches. This went unnoticed since I had KBUILD_RPM_WITH_DEVEL=0 for me
> during testing. Sorry about that!
>
> I'll send a v2 fixing this stupid mistake.

Ah, understood! I am not sure you actually need a v2 though because I
think you can already accomplish what you are looking for by adding

RPMOPTS='--without devel'

to your make command, at least that works for me. Commit 2a291fc315b6
("kbuild: rpm-pkg: introduce %{with_devel} switch to select devel
package") introduced this.

Cheers,
Nathan

2024-04-17 16:13:13

by Pratham Patel

[permalink] [raw]
Subject: Re: [PATCH 0/2] Enable building of the devel RPM package from Kbuild

On Wed Apr 17, 2024 at 9:17 PM IST, Nathan Chancellor wrote:
> On Wed, Apr 17, 2024 at 03:08:57PM +0000, Pratham Patel wrote:
> > On Wed Apr 17, 2024 at 8:18 PM IST, Nathan Chancellor wrote:
> > > On Wed, Apr 17, 2024 at 04:37:32AM +0000, Pratham Patel wrote:
> > > > This addresses a minor nit where I want a `-devel` RPM package to be
> > > > built when I build a binary RPM package with either `binrpm-pkg`
> > > > or `rpm-pkg` target(s).
> > > >
> > > > Pratham Patel (2):
> > > > kbuild: allow toggling the `with_devel` RPM macro
> > > > docs: kbuild: document KBUILD_RPM_WITH_DEVEL
> > > >
> > > > Documentation/kbuild/kbuild.rst | 6 ++++++
> > > > scripts/Makefile.package | 5 ++++-
> > > > 2 files changed, 10 insertions(+), 1 deletion(-)
> > > >
> > > > --
> > > > 2.42.0
> > > >
> > >
> > > Hmmm, when I execute
> > >
> > > $ make -skj"$(nproc)" ARCH=x86_64 O=build mrproper defconfig binrpm-pkg
> > >
> > > I end up with
> > >
> > > $ ls -1 build/rpmbuild/RPMS/x86_64
> > > kernel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > > kernel-devel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > > kernel-headers-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > >
> > > so it seems like this is already happening?
> > >
> > > Cheers,
> > > Nathan
> >
> > Ah sorry, that was a typo. I meant to say the following:
> > "This addresses a minor nit where I **don't** want a `-devel` RPM
> > package to be built when I build a binary RPM package with either
> > `binrpm-pkg` or `rpm-pkg` target(s)."
> >
> > That is because on ARM systems where I just need to quickly test the
> > upstream defconfig, I don't really need the `-devel` package.
> >
> > Also, I see that in a hurry, I did the opposite of what I wanted in the
> > patches. This went unnoticed since I had KBUILD_RPM_WITH_DEVEL=0 for me
> > during testing. Sorry about that!
> >
> > I'll send a v2 fixing this stupid mistake.
>
> Ah, understood! I am not sure you actually need a v2 though because I
> think you can already accomplish what you are looking for by adding
>
> RPMOPTS='--without devel'
>
> to your make command, at least that works for me. Commit 2a291fc315b6
> ("kbuild: rpm-pkg: introduce %{with_devel} switch to select devel
> package") introduced this.
>
> Cheers,
> Nathan

Oh, didn't know that, thank you. :)

-- Pratham Patel


2024-04-20 07:30:03

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 0/2] Enable building of the devel RPM package from Kbuild

On Thu, Apr 18, 2024 at 12:51 AM Pratham Patel
<[email protected]> wrote:
>
> On Wed Apr 17, 2024 at 9:17 PM IST, Nathan Chancellor wrote:
> > On Wed, Apr 17, 2024 at 03:08:57PM +0000, Pratham Patel wrote:
> > > On Wed Apr 17, 2024 at 8:18 PM IST, Nathan Chancellor wrote:
> > > > On Wed, Apr 17, 2024 at 04:37:32AM +0000, Pratham Patel wrote:
> > > > > This addresses a minor nit where I want a `-devel` RPM package to be
> > > > > built when I build a binary RPM package with either `binrpm-pkg`
> > > > > or `rpm-pkg` target(s).
> > > > >
> > > > > Pratham Patel (2):
> > > > > kbuild: allow toggling the `with_devel` RPM macro
> > > > > docs: kbuild: document KBUILD_RPM_WITH_DEVEL
> > > > >
> > > > > Documentation/kbuild/kbuild.rst | 6 ++++++
> > > > > scripts/Makefile.package | 5 ++++-
> > > > > 2 files changed, 10 insertions(+), 1 deletion(-)
> > > > >
> > > > > --
> > > > > 2.42.0
> > > > >
> > > >
> > > > Hmmm, when I execute
> > > >
> > > > $ make -skj"$(nproc)" ARCH=x86_64 O=build mrproper defconfig binrpm-pkg
> > > >
> > > > I end up with
> > > >
> > > > $ ls -1 build/rpmbuild/RPMS/x86_64
> > > > kernel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > > > kernel-devel-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > > > kernel-headers-6.9.0_rc4_00031_g96fca68c4fbf-1.x86_64.rpm
> > > >
> > > > so it seems like this is already happening?
> > > >
> > > > Cheers,
> > > > Nathan
> > >
> > > Ah sorry, that was a typo. I meant to say the following:
> > > "This addresses a minor nit where I **don't** want a `-devel` RPM
> > > package to be built when I build a binary RPM package with either
> > > `binrpm-pkg` or `rpm-pkg` target(s)."
> > >
> > > That is because on ARM systems where I just need to quickly test the
> > > upstream defconfig, I don't really need the `-devel` package.
> > >
> > > Also, I see that in a hurry, I did the opposite of what I wanted in the
> > > patches. This went unnoticed since I had KBUILD_RPM_WITH_DEVEL=0 for me
> > > during testing. Sorry about that!
> > >
> > > I'll send a v2 fixing this stupid mistake.
> >
> > Ah, understood! I am not sure you actually need a v2 though because I
> > think you can already accomplish what you are looking for by adding
> >
> > RPMOPTS='--without devel'
> >
> > to your make command, at least that works for me. Commit 2a291fc315b6
> > ("kbuild: rpm-pkg: introduce %{with_devel} switch to select devel
> > package") introduced this.
> >
> > Cheers,
> > Nathan
>
> Oh, didn't know that, thank you. :)
>
> -- Pratham Patel
>


As explained in the commit description of
a55d4aee76ca72e198a657cb471d2a3b37983072





--
Best Regards
Masahiro Yamada