Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/keyutils/files/, sys-apps/keyutils/
Date: Fri, 29 Apr 2022 04:19:44
Message-Id: 1651205949.58a5861e534bf5ae62c70b66989629365a3e39bb.sam@gentoo
1 commit: 58a5861e534bf5ae62c70b66989629365a3e39bb
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 29 04:19:09 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 29 04:19:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58a5861e
7
8 sys-apps/keyutils: fix "command not found" error for rpmspec
9
10 Closes: https://bugs.gentoo.org/760633
11 Thanks-to: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 .../files/keyutils-1.6.3-fix-rpmspec-check.patch | 38 ++++++++++++++++++++++
15 sys-apps/keyutils/keyutils-1.6.3.ebuild | 1 +
16 2 files changed, 39 insertions(+)
17
18 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
19 new file mode 100644
20 index 000000000000..3fb659712aed
21 --- /dev/null
22 +++ b/sys-apps/keyutils/files/keyutils-1.6.3-fix-rpmspec-check.patch
23 @@ -0,0 +1,38 @@
24 +https://bugs.gentoo.org/760633
25 +
26 +From 41077f8901b642d36b63f94b0fc62377a07fc0b2 Mon Sep 17 00:00:00 2001
27 +From: Adrian Ratiu <adrian.ratiu@×××××××××.com>
28 +Date: Tue, 4 Jan 2022 03:51:10 +0200
29 +Subject: [PATCH] Makefile: only run rpmspec if it exists
30 +
31 +keyutils is built on many distros which do not use rpm like
32 +Gentoo, ChromeOS or Arch. Older versions of bash silently
33 +ignored the fact that rpmspec was missing, but newer bash
34 +like v5.1 issue a new error:
35 +
36 +/bin/sh: line 1: rpmspec: command not found
37 +
38 +This happens every time the Makefile is parsed, including
39 +for a simple "make" invocation or "make install" even if
40 +a rpm package is not desired.
41 +
42 +Arch Linux simply ignores this new error but Gentoo and
43 +ChromeOS fail because portage actively monitors the build
44 +log for errors like this. See bug report [1].
45 +
46 +Fix this by calling rpmspec only if it exists.
47 +
48 +[1] https://bugs.gentoo.org/760633
49 +
50 +Signed-off-by: Adrian Ratiu <adrian.ratiu@×××××××××.com>
51 +--- a/Makefile
52 ++++ b/Makefile
53 +@@ -285,7 +285,7 @@ SRCBALL := rpmbuild/SOURCES/$(TARBALL)
54 + ZSRCBALL := rpmbuild/SOURCES/$(ZTARBALL)
55 +
56 + BUILDID := .local
57 +-rpmver0 := $(shell rpmspec -q ./keyutils.spec --define "buildid $(BUILDID)")
58 ++rpmver0 := $(shell if which rpmspec >/dev/null 2>&1; then rpmspec -q ./keyutils.spec --define "buildid $(BUILDID)"; fi)
59 + rpmver1 := $(word 1,$(rpmver0))
60 + rpmver2 := $(subst ., ,$(rpmver1))
61 + rpmver3 := $(lastword $(rpmver2))
62
63 diff --git a/sys-apps/keyutils/keyutils-1.6.3.ebuild b/sys-apps/keyutils/keyutils-1.6.3.ebuild
64 index ec3bdc264953..e42968e1bd57 100644
65 --- a/sys-apps/keyutils/keyutils-1.6.3.ebuild
66 +++ b/sys-apps/keyutils/keyutils-1.6.3.ebuild
67 @@ -22,6 +22,7 @@ PATCHES=(
68 "${FILESDIR}"/${PN}-1.6-makefile-fixup.patch
69 "${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050
70 "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
71 + "${FILESDIR}"/${PN}-1.6.3-fix-rpmspec-check.patch
72 )
73
74 pkg_setup() {