OSDN Git Service

kbuild: rpm-pkg: skip build dependency check on non-rpm systems
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 22 Jul 2023 04:48:06 +0000 (13:48 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 24 Jul 2023 15:59:33 +0000 (00:59 +0900)
commit783c55ae7a9551f049b0c1a52cde0ec3a5550501
tree0d22138c0185282f403fc248c42a8304c6d60498
parent37477496d6aa91248184238a95b59b7d91d46921
kbuild: rpm-pkg: skip build dependency check on non-rpm systems

Commit 8818039f959b ("kbuild: add ability to make source rpm buildable
using koji") added the BuildRequires: field.

Checking the build dependency is fine, but one annoyance is that
'make (bin)rpm-pkg' fails on non-rpm systems [1]. For example, Debian
provides rpmbuild via 'apt install rpm', but of course cannot meet the
requirement listed in the BuildRequires: field.

It is possible to pass RPMOPTS=--nodeps to work around it, but it is
reasonable to do it automatically.

If 'rpm -q rpm' fails, it is not an RPM-managed system. (The command
'rpm' is not installed at all, or was installed by other means.)

In that case, pass --nodeps to skip the build dependency check.

[1]: https://lore.kernel.org/linux-kbuild/Y6mkdYQYmjUz7bqV@li-4a3a4a4c-28e5-11b2-a85c-a8d192c6f089.ibm.com/

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/Makefile.package