diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-12-28 22:10:14 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-12-30 11:24:49 +0300 |
commit | 02a893bc99757d75b7abb43b74f210dfa3df8c4b (patch) | |
tree | 391b7bde3f09edfc8728e433e8d8a21dc47eedb1 /scripts | |
parent | 63ffe00d8c939eda1a8fa87484ca4537e13a20b7 (diff) | |
download | linux-02a893bc99757d75b7abb43b74f210dfa3df8c4b.tar.xz |
kbuild: rpm-pkg: add libelf-devel as alternative for BuildRequires
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 as 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>
Tested-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Jonathan Toppins <jtoppins@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/package/mkspec | 3 |
1 files changed, 2 insertions, 1 deletions
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 |