commit: 58a5861e534bf5ae62c70b66989629365a3e39bb Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Apr 29 04:19:09 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Apr 29 04:19:09 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58a5861e
sys-apps/keyutils: fix "command not found" error for rpmspec Closes: https://bugs.gentoo.org/760633 Thanks-to: Adrian Ratiu <adrian.ratiu <AT> collabora.com> Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/keyutils-1.6.3-fix-rpmspec-check.patch | 38 ++++++++++++++++++++++ sys-apps/keyutils/keyutils-1.6.3.ebuild | 1 + 2 files changed, 39 insertions(+) diff --git a/sys-apps/keyutils/files/keyutils-1.6.3-fix-rpmspec-check.patch b/sys-apps/keyutils/files/keyutils-1.6.3-fix-rpmspec-check.patch new file mode 100644 index 000000000000..3fb659712aed --- /dev/null +++ b/sys-apps/keyutils/files/keyutils-1.6.3-fix-rpmspec-check.patch @@ -0,0 +1,38 @@ +https://bugs.gentoo.org/760633 + +From 41077f8901b642d36b63f94b0fc62377a07fc0b2 Mon Sep 17 00:00:00 2001 +From: Adrian Ratiu <[email protected]> +Date: Tue, 4 Jan 2022 03:51:10 +0200 +Subject: [PATCH] Makefile: only run rpmspec if it exists + +keyutils is built on many distros which do not use rpm like +Gentoo, ChromeOS or Arch. Older versions of bash silently +ignored the fact that rpmspec was missing, but newer bash +like v5.1 issue a new error: + +/bin/sh: line 1: rpmspec: command not found + +This happens every time the Makefile is parsed, including +for a simple "make" invocation or "make install" even if +a rpm package is not desired. + +Arch Linux simply ignores this new error but Gentoo and +ChromeOS fail because portage actively monitors the build +log for errors like this. See bug report [1]. + +Fix this by calling rpmspec only if it exists. + +[1] https://bugs.gentoo.org/760633 + +Signed-off-by: Adrian Ratiu <[email protected]> +--- a/Makefile ++++ b/Makefile +@@ -285,7 +285,7 @@ SRCBALL := rpmbuild/SOURCES/$(TARBALL) + ZSRCBALL := rpmbuild/SOURCES/$(ZTARBALL) + + BUILDID := .local +-rpmver0 := $(shell rpmspec -q ./keyutils.spec --define "buildid $(BUILDID)") ++rpmver0 := $(shell if which rpmspec >/dev/null 2>&1; then rpmspec -q ./keyutils.spec --define "buildid $(BUILDID)"; fi) + rpmver1 := $(word 1,$(rpmver0)) + rpmver2 := $(subst ., ,$(rpmver1)) + rpmver3 := $(lastword $(rpmver2)) diff --git a/sys-apps/keyutils/keyutils-1.6.3.ebuild b/sys-apps/keyutils/keyutils-1.6.3.ebuild index ec3bdc264953..e42968e1bd57 100644 --- a/sys-apps/keyutils/keyutils-1.6.3.ebuild +++ b/sys-apps/keyutils/keyutils-1.6.3.ebuild @@ -22,6 +22,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.6-makefile-fixup.patch "${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050 "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch + "${FILESDIR}"/${PN}-1.6.3-fix-rpmspec-check.patch ) pkg_setup() {
