All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires
@ 2022-12-28 19:10 Masahiro Yamada
  2022-12-29  0:26 ` Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Masahiro Yamada @ 2022-12-28 19:10 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Alexander Gordeev, Masahiro Yamada, Guoqing Jiang,
	Ivan Vecera, Jonathan Toppins, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, Íñigo Huguet

Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b
("kbuild: add ability to make source rpm buildable using koji").
The relevant package name in openSUSE is libelf-devel.

Add it an alternative package.

BTW, if it is impossible to solve the build requirement, the final
resort would be:

    $ make RPMOPTS=--nodeps rpm-pkg

This passes --nodeps to the rpmbuild command so it will not verify
build dependencies. This is useful to test rpm builds on non-rpm
system. On Debian/Ubuntu, for example, you can install rpmbuild by
'apt-get install rpm'.

NOTE1:
  Likewise, it is possible to bypass the build dependency check for
  debian package builds:

    $ make DPKG_FLAGS=-d deb-pkg

NOTE2:
  The 'or' operator is supported since RPM 4.13. So, old distros such
  as CentOS 7 will break. I suggest installing newer rpmbuild in such
  cases.

Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u
Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji")
Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/package/mkspec | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index dda00a948a01..adab28fa7f89 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -51,7 +51,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
 	URL: https://www.kernel.org
 $S	Source: kernel-$__KERNELRELEASE.tar.gz
 	Provides: $PROVIDES
-$S	BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex
+$S	BuildRequires: bc binutils bison dwarves
+$S	BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
 $S	BuildRequires: gcc make openssl openssl-devel perl python3 rsync
 
 	# $UTS_MACHINE as a fallback of _arch in case
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires
  2022-12-28 19:10 [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires Masahiro Yamada
@ 2022-12-29  0:26 ` Nathan Chancellor
  2022-12-29  2:08 ` Guoqing Jiang
  2022-12-29  8:08 ` Jonathan Toppins
  2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2022-12-29  0:26 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, linux-kernel, Alexander Gordeev, Guoqing Jiang,
	Ivan Vecera, Jonathan Toppins, Nick Desaulniers, Nicolas Schier,
	Íñigo Huguet

On Thu, Dec 29, 2022 at 04:10:14AM +0900, Masahiro Yamada wrote:
> Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
> to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b
> ("kbuild: add ability to make source rpm buildable using koji").
> The relevant package name in openSUSE is libelf-devel.
> 
> Add it an alternative package.
> 
> BTW, if it is impossible to solve the build requirement, the final
> resort would be:
> 
>     $ make RPMOPTS=--nodeps rpm-pkg
> 
> This passes --nodeps to the rpmbuild command so it will not verify
> build dependencies. This is useful to test rpm builds on non-rpm
> system. On Debian/Ubuntu, for example, you can install rpmbuild by
> 'apt-get install rpm'.
> 
> NOTE1:
>   Likewise, it is possible to bypass the build dependency check for
>   debian package builds:
> 
>     $ make DPKG_FLAGS=-d deb-pkg
> 
> NOTE2:
>   The 'or' operator is supported since RPM 4.13. So, old distros such
>   as CentOS 7 will break. I suggest installing newer rpmbuild in such
>   cases.
> 
> Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u
> Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji")
> Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
> 
>  scripts/package/mkspec | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index dda00a948a01..adab28fa7f89 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -51,7 +51,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
>  	URL: https://www.kernel.org
>  $S	Source: kernel-$__KERNELRELEASE.tar.gz
>  	Provides: $PROVIDES
> -$S	BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex
> +$S	BuildRequires: bc binutils bison dwarves
> +$S	BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
>  $S	BuildRequires: gcc make openssl openssl-devel perl python3 rsync
>  
>  	# $UTS_MACHINE as a fallback of _arch in case
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires
  2022-12-28 19:10 [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires Masahiro Yamada
  2022-12-29  0:26 ` Nathan Chancellor
@ 2022-12-29  2:08 ` Guoqing Jiang
  2022-12-29  8:08 ` Jonathan Toppins
  2 siblings, 0 replies; 4+ messages in thread
From: Guoqing Jiang @ 2022-12-29  2:08 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Alexander Gordeev, Ivan Vecera, Jonathan Toppins,
	Nathan Chancellor, Nick Desaulniers, Nicolas Schier,
	Íñigo Huguet



On 12/29/22 03:10, Masahiro Yamada wrote:
> Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
> to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b
> ("kbuild: add ability to make source rpm buildable using koji").
> The relevant package name in openSUSE is libelf-devel.
>
> Add it an alternative package.
>
> BTW, if it is impossible to solve the build requirement, the final
> resort would be:
>
>      $ make RPMOPTS=--nodeps rpm-pkg
>
> This passes --nodeps to the rpmbuild command so it will not verify
> build dependencies. This is useful to test rpm builds on non-rpm
> system. On Debian/Ubuntu, for example, you can install rpmbuild by
> 'apt-get install rpm'.
>
> NOTE1:
>    Likewise, it is possible to bypass the build dependency check for
>    debian package builds:
>
>      $ make DPKG_FLAGS=-d deb-pkg
>
> NOTE2:
>    The 'or' operator is supported since RPM 4.13. So, old distros such
>    as CentOS 7 will break. I suggest installing newer rpmbuild in such
>    cases.
>
> Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u
> Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji")
> Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>   scripts/package/mkspec | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index dda00a948a01..adab28fa7f89 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -51,7 +51,8 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
>   	URL: https://www.kernel.org
>   $S	Source: kernel-$__KERNELRELEASE.tar.gz
>   	Provides: $PROVIDES
> -$S	BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex
> +$S	BuildRequires: bc binutils bison dwarves
> +$S	BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
>   $S	BuildRequires: gcc make openssl openssl-devel perl python3 rsync
>   
>   	# $UTS_MACHINE as a fallback of _arch in case

Thanks for the quick fix! I verified the above works for openSUSE leap 15.4.

Tested-by: Guoqing Jiang <guoqing.jiang@linux.dev>

Thanks,
Guoqing

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires
  2022-12-28 19:10 [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires Masahiro Yamada
  2022-12-29  0:26 ` Nathan Chancellor
  2022-12-29  2:08 ` Guoqing Jiang
@ 2022-12-29  8:08 ` Jonathan Toppins
  2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Toppins @ 2022-12-29  8:08 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kbuild
  Cc: linux-kernel, Alexander Gordeev, Guoqing Jiang, Ivan Vecera,
	Nathan Chancellor, Nick Desaulniers, Nicolas Schier,
	Íñigo Huguet

On 12/28/22 14:10, Masahiro Yamada wrote:
> Guoqing Jiang reports that openSUSE cannot compile the kernel rpm due
> to "BuildRequires: elfutils-libelf-devel" added by commit 8818039f959b
> ("kbuild: add ability to make source rpm buildable using koji").
> The relevant package name in openSUSE is libelf-devel.
> 
> Add it an alternative package.
> 
> BTW, if it is impossible to solve the build requirement, the final
> resort would be:
> 
>      $ make RPMOPTS=--nodeps rpm-pkg
> 
> This passes --nodeps to the rpmbuild command so it will not verify
> build dependencies. This is useful to test rpm builds on non-rpm
> system. On Debian/Ubuntu, for example, you can install rpmbuild by
> 'apt-get install rpm'.
> 
> NOTE1:
>    Likewise, it is possible to bypass the build dependency check for
>    debian package builds:
> 
>      $ make DPKG_FLAGS=-d deb-pkg
> 
> NOTE2:
>    The 'or' operator is supported since RPM 4.13. So, old distros such
>    as CentOS 7 will break. I suggest installing newer rpmbuild in such
>    cases.
> 
> Link: https://lore.kernel.org/linux-kbuild/ee227d24-9c94-bfa3-166a-4ee6b5dfea09@linux.dev/T/#u
> Fixes: 8818039f959b ("kbuild: add ability to make source rpm buildable using koji")
> Reported-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Acked-by: Jonathan Toppins <jtoppins@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-29  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28 19:10 [PATCH] kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires Masahiro Yamada
2022-12-29  0:26 ` Nathan Chancellor
2022-12-29  2:08 ` Guoqing Jiang
2022-12-29  8:08 ` Jonathan Toppins

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.