diff options
Diffstat (limited to 'sys-apps/keyutils')
15 files changed, 161 insertions, 521 deletions
diff --git a/sys-apps/keyutils/Manifest b/sys-apps/keyutils/Manifest index 7354bfc3ddf5..a4690bb30144 100644 --- a/sys-apps/keyutils/Manifest +++ b/sys-apps/keyutils/Manifest @@ -1,3 +1 @@ -DIST keyutils-1.5.11.tar.bz2 87644 BLAKE2B 1a601b7036bcfe69b6272ae2b4fad44cbb22877aa94722fa26460f8addf105ff8898e851ad7c4f28bc755f7fe293c74bc70cffbe877978e462bc21c428c9a11d SHA512 5f0dc5d5ceb673cf0ba71d3a0b525d09adc8d501a795372aa3dc29215ef393cb8577c72051cecabdb9a46dca4fcaa11e629291fb857290872475a7e445f47d43 -DIST keyutils-1.5.9.tar.bz2 74683 BLAKE2B 8d5133dcc4c1f40e634fcd6584f3e2e56a0fd4ff25ded41c5f94ef3193ef7240ff4a24ef1c5beba6ba835195605a77126bf77aace35a1b4acf025160a2082dcb SHA512 d4ee1dabb87844e18bfd8d094a5bc9ce792c96720b71e77961b6c36bb1addb9acea2a7004ddfba1d09b167af908368162312e5c3656b22a6266955bb57b887e2 -DIST keyutils-1.6.tar.bz2 93973 BLAKE2B 250275852d13fb5f77786350e64175c9c0909d1a7e44750e44b09f79217acb9c40536bd61e15d1abdfe36b9e161832f4c59f11b73915d457356a273ad4999990 SHA512 ee50da165099ea26904066d24b27c5165cb1eb78df6768cba3a534aa318a5c8d926ec6e5322a38c8cedaa768cd79bdcb26ef918aa8447df2e5dfbbe7b8f200ff +DIST keyutils-1.6.3.tar.gz 137022 BLAKE2B b5620b1b6109415fec1268963c2c65d774f3ef7a69eb1ce8d5d8e78b4b807e4fdfda861662a1b5556975ef867add8f985362a31b6608ac2dc198c8d0395d516b SHA512 f65965b8566037078b8eeffa66c6fdbe121c8c2bea7fa5bce04cf7ba5ccc50d5b48e51f4a67ca91e4d5d9a12469e7e3eb3036c920ab25e3feba6e93b4c149cf9 diff --git a/sys-apps/keyutils/files/keyutils-1.5.10-endian-check-1.patch b/sys-apps/keyutils/files/keyutils-1.5.10-endian-check-1.patch deleted file mode 100644 index 99cf23fbb21f..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.10-endian-check-1.patch +++ /dev/null @@ -1,20 +0,0 @@ -fix regexp match against `file /proc/$$/exe` for -fPIE bash -Now that bash is built with PIE enabled, keyutils' check for endianness -fails because file no longer returns "executable", but instead returns -"shared object" for file << 5.33 and "pie executable" for file >= 5.33. - ---- a/tests/toolbox.inc.sh -+++ b/tests/toolbox.inc.sh -@@ -13,10 +13,10 @@ - echo === $OUTPUTFILE === - - endian=`file -L /proc/$$/exe` --if expr "$endian" : '.* MSB \+\(executable\|shared object).*' >&/dev/null -+if expr "$endian" : '.* MSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null - then - endian=BE --elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null -+elif expr "$endian" : '.* LSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null - then - endian=LE - else diff --git a/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch b/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch deleted file mode 100644 index c37cca0dbfd7..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 19b92eb56ca53cb4967e7bd27e3bc5e3b0e29736 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Thu, 16 Mar 2017 09:55:42 +0100 -Subject: [PATCH] depend on $(DEVELLIB) not -lkeyutils - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 824bbbf..8ce3a13 100644 ---- a/Makefile -+++ b/Makefile -@@ -167,7 +167,7 @@ ifeq ($(NO_SOLIB),0) - $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) - $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) - mkdir -p $(DESTDIR)$(USRLIBDIR) -- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) -+ $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) - endif - $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl - $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key --- -2.12.0 - diff --git a/sys-apps/keyutils/files/keyutils-1.5.10-silence-rpm-check.patch b/sys-apps/keyutils/files/keyutils-1.5.10-silence-rpm-check.patch deleted file mode 100644 index dafd7de8dd91..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.10-silence-rpm-check.patch +++ /dev/null @@ -1,20 +0,0 @@ -Hide - -> grep: /etc/rpm: No such file or directory -> grep: /usr/lib/rpm: No such file or directory - -errors. - -Bug: https://bugs.gentoo.org/656446 - ---- a/Makefile -+++ b/Makefile -@@ -245,7 +245,7 @@ SRCBALL := rpmbuild/SOURCES/$(TARBALL) - ZSRCBALL := rpmbuild/SOURCES/$(ZTARBALL) - - BUILDID := .local --dist := $(word 2,$(shell grep -r "^%dist" /etc/rpm /usr/lib/rpm)) -+dist := $(word 2,$(shell grep -r "^%dist" /etc/rpm /usr/lib/rpm 2>/dev/null)) - release := $(word 2,$(shell grep ^Release: $(SPECFILE))) - release := $(subst %{?dist},$(dist),$(release)) - release := $(subst %{?buildid},$(BUILDID),$(release)) diff --git a/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch b/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch deleted file mode 100644 index ff4bcfa94d85..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch +++ /dev/null @@ -1,27 +0,0 @@ -Raw patch edit based on: - -From af14e945bd617bb82ebc4c6c8d4fb948d715f16a Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Fri, 2 Sep 2011 13:30:30 -0400 -Subject: [PATCH] depend on $(DEVELLIB) not -lkeyutils - ---- - Makefile | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/Makefile b/Makefile -index 9e3fa9b..46695d1 100644 ---- a/Makefile -+++ b/Makefile -@@ -91,7 +91,7 @@ - $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) - $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) - mkdir -p $(DESTDIR)$(USRLIBDIR) -- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) -+ $(LNS) $(SONAME) $(DESTDIR)$(LIBDIR)/$(DEVELLIB) - $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl - $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key - $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh --- -1.7.6 - diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch b/sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch deleted file mode 100644 index 0a5a02b3a484..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.9-disable-tests.patch +++ /dev/null @@ -1,51 +0,0 @@ -disable tests that mess with system wide settings - -https://bugs.gentoo.org/519062 - ---- a/tests/bugzillas/bz1031154/runtest.sh -+++ b/tests/bugzillas/bz1031154/runtest.sh -@@ -11,6 +11,8 @@ - result=PASS - echo "++++ BEGINNING TEST" >$OUTPUTFILE - -+if false; then -+ - # we need a reference time to scan the audit log from so as not to pick up old - # results from this test. - base_date=`date +"%x@%X"` -@@ -81,6 +83,10 @@ - fi - fi - -+else -+marker "Gentoo: skipping test due to system wide modifications" -+fi -+ - echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE - - # --- then report the results in the database --- - -https://bugs.gentoo.org/522050 - ---- a/tests/keyctl/padd/useradd/runtest.sh -+++ b/tests/keyctl/padd/useradd/runtest.sh -@@ -40,6 +40,8 @@ - marker "UNLINK KEY" - unlink_key $keyid @s - -+if false; then -+ - # add keys with huge payloads - old_root_quota=`cat /proc/sys/kernel/keys/root_maxbytes` - if [ $old_root_quota -lt 65536 ] -@@ -76,6 +78,10 @@ - sleep 1 - fi - -+else -+marker "Gentoo: skipping test due to system wide modifications" -+fi -+ - echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE - - # --- then report the results in the database --- diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch b/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch deleted file mode 100644 index 18344b94940e..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-1.patch +++ /dev/null @@ -1,43 +0,0 @@ -patch from upstream - -https://bugs.gentoo.org/426424 - -From f0d9a8c15f1525d0404077f32fddccb606a61bac Mon Sep 17 00:00:00 2001 -From: Tyler Hicks <tyhicks@canonical.com> -Date: Mon, 24 Feb 2014 18:52:41 -0600 -Subject: [PATCH] TEST: Make endianness detection work with file 5.14 - -The 5.14 release of file outputs an extra space after [LM]SB: - -$ ./src/file -m magic/magic.mgc -L /proc/$$/exe -/proc/12755/exe: ELF 64-bit LSB executable, ... - -This was due to the elf magic file containing some trailing spaces in -the 5.14 release. - -Signed-off-by: Tyler Hicks <tyhicks@canonical.com> -Signed-off-by: David Howells <dhowells@redhat.com> ---- - tests/toolbox.inc.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh -index cbc49e0fce23..fe3c7f71299a 100644 ---- a/tests/toolbox.inc.sh -+++ b/tests/toolbox.inc.sh -@@ -17,10 +17,10 @@ includes=${includes%/*}/ - echo === $OUTPUTFILE === - - endian=`file -L /proc/$$/exe` --if expr "$endian" : '.* MSB executable.*' >&/dev/null -+if expr "$endian" : '.* MSB \+executable.*' >&/dev/null - then - endian=BE --elif expr "$endian" : '.* LSB executable.*' >&/dev/null -+elif expr "$endian" : '.* LSB \+executable.*' >&/dev/null - then - endian=LE - else --- -2.11.0 - diff --git a/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch b/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch deleted file mode 100644 index bc96dae464b8..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.5.9-endian-check-2.patch +++ /dev/null @@ -1,38 +0,0 @@ -patch from upstream - -https://bugs.gentoo.org/426424 - -From ce92e974b8ecff19cf430b7b58a09b8190645b5c Mon Sep 17 00:00:00 2001 -From: David Howells <dhowells@redhat.com> -Date: Fri, 26 Feb 2016 10:07:00 +0000 -Subject: [PATCH] TEST: Fix endianness determination - -Endianness determination was broken sometime after Fedora 20 when -executables switched to being DYN objects rather than EXEC objects. This -caused the output of file to change. - -Signed-off-by: David Howells <dhowells@redhat.com> ---- - tests/toolbox.inc.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh -index f2463c57b40e..5ac23ffc04fb 100644 ---- a/tests/toolbox.inc.sh -+++ b/tests/toolbox.inc.sh -@@ -13,10 +13,10 @@ - echo === $OUTPUTFILE === - - endian=`file -L /proc/$$/exe` --if expr "$endian" : '.* MSB \+executable.*' >&/dev/null -+if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null - then - endian=BE --elif expr "$endian" : '.* LSB \+executable.*' >&/dev/null -+elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null - then - endian=LE - else --- -2.11.0 - diff --git a/sys-apps/keyutils/files/keyutils-1.6-endian-check-1.patch b/sys-apps/keyutils/files/keyutils-1.6-endian-check-1.patch deleted file mode 100644 index e783ec699c34..000000000000 --- a/sys-apps/keyutils/files/keyutils-1.6-endian-check-1.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0a99778774df85448aeda0a37b85c43bc8868a9e Mon Sep 17 00:00:00 2001 -From: Lars Wendler <polynomial-c@gentoo.org> -Date: Fri, 16 Nov 2018 12:37:29 +0100 -Subject: [PATCH] fix regexp match against `file /proc/$$/exe` for -fPIE bash - -Now that bash is built with PIE enabled, keyutils' check for endianness -fails because file no longer returns "executable", but instead returns -"shared object" for file << 5.33 and "pie executable" for file >= 5.33. ---- - tests/toolbox.inc.sh | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh -index 0ce6db0..712c5bd 100644 ---- a/tests/toolbox.inc.sh -+++ b/tests/toolbox.inc.sh -@@ -13,10 +13,10 @@ - echo === $OUTPUTFILE === - - endian=`file -L /proc/$$/exe` --if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null -+if expr "$endian" : '.* MSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null - then - endian=BE --elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null -+elif expr "$endian" : '.* LSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null - then - endian=LE - else --- -2.19.1 - 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 <adrian.ratiu@collabora.com> +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 <adrian.ratiu@collabora.com> +--- 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/files/keyutils-1.6.3-tests.patch b/sys-apps/keyutils/files/keyutils-1.6.3-tests.patch new file mode 100644 index 000000000000..d9414e800a6c --- /dev/null +++ b/sys-apps/keyutils/files/keyutils-1.6.3-tests.patch @@ -0,0 +1,76 @@ +https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/commit/?id=c076dff259e99d84d3822b4d2ad7f3f66532f411 + +From c076dff259e99d84d3822b4d2ad7f3f66532f411 Mon Sep 17 00:00:00 2001 +From: Pavel Reichl <preichl@redhat.com> +Date: Tue, 20 Dec 2022 14:13:29 +0100 +Subject: test: Fix test expectation based on kernel config + +Some test results are dependent on the kernel configuration option +CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE. + +Check the kernel configuration file for its presence and expect appropriate +test results. + +Function has_kernel_config is based on its xfstsests counterpart. + +Signed-off-by: Pavel Reichl <preichl@redhat.com> +Signed-off-by: David Howells <dhowells@redhat.com> +--- a/tests/features/builtin_trusted/runtest.sh ++++ b/tests/features/builtin_trusted/runtest.sh +@@ -33,7 +33,11 @@ expect_error EACCES + create_key --fail user a a $stk + expect_error EOPNOTSUPP + create_key --fail user a a $blk +-expect_error EACCES ++if has_kernel_config "CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE"; then ++ expect_error EOPNOTSUPP ++else ++ expect_error EACCES ++fi + + # Try adding a key to the keyrings + marker "TRY ADDING ASYMMETRIC KEYS" +@@ -89,7 +93,11 @@ expect_error EACCES + create_key --fail -x asymmetric "" "$x509" $stk + expect_error ENOKEY + create_key --fail -x asymmetric "" "$x509" $blk +-expect_error EACCES ++if has_kernel_config "CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE"; then ++ expect_error EOPNOTSUPP ++else ++ expect_error EACCES ++fi + + echo "++++ FINISHED TEST: $result" >>$OUTPUTFILE + +--- a/tests/prepare.inc.sh ++++ b/tests/prepare.inc.sh +@@ -4,6 +4,26 @@ + includes=${BASH_SOURCE[0]} + includes=${includes%/*}/ + ++# Check if currently running kernel has option set ++function has_kernel_config() ++{ ++ local option=$1 ++ local uname=$(uname -r) ++ local config_list="$KCONFIG_PATH ++ /lib/modules/$uname/build/.config ++ /boot/config-$uname ++ /lib/kernel/config-$uname" ++ ++ for config in $config_list; do ++ [ ! -f $config ] && continue ++ grep -qE "^${option}=[my]" $config ++ return ++ done ++ ++ echo "Failed to find kernel configuration file" ++ return false ++} ++ + # --- need to run in own session keyring + watch_fd=0 + if [ "$1" != "--inside-test-session" ] +-- +cgit 1.2.3-korg diff --git a/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild b/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild deleted file mode 100644 index 23be07210bad..000000000000 --- a/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit multilib toolchain-funcs linux-info multilib-minimal - -DESCRIPTION="Linux Key Management Utilities" -HOMEPAGE="https://people.redhat.com/dhowells/keyutils/" -SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0/1.7" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="static static-libs test" - -RDEPEND="" -DEPEND="app-crypt/mit-krb5 - !prefix? ( >=sys-kernel/linux-headers-2.6.11 )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.5.10-endian-check-1.patch - "${FILESDIR}"/${PN}-1.5.10-makefile-fixup.patch - "${FILESDIR}"/${PN}-1.5.10-silence-rpm-check.patch #656446 - "${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050 - "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch -) - -pkg_setup() { - # To prevent a failure in test phase and false positive bug reports - # we are enforcing the following options because testsuite expects - # that these options are available. I.e. testsuite only decides based - # on kernel version which tests will be called, no feature checking. - if use test ; then - CONFIG_CHECK="KEYS" - ERROR_KEYS="You must have CONFIG_KEYS to run the package testsuite!" - - if kernel_is -ge 2 6 10 && kernel_is -lt 4 0 0 ; then - CONFIG_CHECK="${CONFIG_CHECK} KEYS_DEBUG_PROC_KEYS" - ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!" - fi - - if kernel_is -ge 4 7 ; then - CONFIG_CHECK="${CONFIG_CHECK} KEY_DH_OPERATIONS" - ERROR_KEY_DH_OPERATIONS="You must have CONFIG_KEY_DH_OPERATIONS to run the package testsuite!" - fi - else - CONFIG_CHECK="~KEYS" - ERROR_KEYS="You will be unable to use this package on this system because CONFIG_KEYS is not set!" - - if kernel_is -ge 4 7 ; then - CONFIG_CHECK="${CONFIG_CHECK} ~KEY_DH_OPERATIONS" - ERROR_KEY_DH_OPERATIONS="You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!" - fi - fi - - linux-info_pkg_setup -} - -src_prepare() { - default - - # The lsb check is useless, so avoid spurious command not found messages. - sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die - # All the test files are bash, but try to execute via `sh`. - sed -i -r \ - -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \ - tests/{Makefile*,*.sh} || die - find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} + - # Some tests call the kernel which calls userspace, but that will - # run the install keyutils rather than the locally compiled one, - # so disable round trip tests. - rm -rf tests/keyctl/requesting/{bad-args,piped,valid} - - multilib_copy_sources -} - -multilib_src_compile() { - tc-export AR CC - sed -i \ - -e "1iRPATH = $(usex static -static '')" \ - -e '/^C.*FLAGS/s|:=|+=|' \ - -e 's:-Werror::' \ - -e '/^BUILDFOR/s:=.*:=:' \ - -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \ - -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \ - -e "s: /: ${EPREFIX}/:g" \ - -e '/^NO_ARLIB/d' \ - Makefile || die - - # We need the static lib in order to statically link programs. - if use static ; then - export NO_ARLIB=0 - # Hack the progs to depend on the static lib instead. - sed -i \ - -e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB) $(SONAME):' \ - Makefile || die - else - export NO_ARLIB=$(usex static-libs 0 1) - fi - emake -} - -multilib_src_test() { - # Execute the locally compiled code rather than the - # older versions already installed in the system. - LD_LIBRARY_PATH=${BUILD_DIR} \ - PATH="${BUILD_DIR}:${PATH}" \ - emake test -} - -multilib_src_install() { - # Possibly undo the setting for USE=static (see src_compile). - export NO_ARLIB=$(usex static-libs 0 1) - - default - use static || gen_usr_ldscript -a keyutils -} - -multilib_src_install_all() { - dodoc README -} diff --git a/sys-apps/keyutils/keyutils-1.5.9-r4.ebuild b/sys-apps/keyutils/keyutils-1.5.9-r4.ebuild deleted file mode 100644 index 9270c709bd7f..000000000000 --- a/sys-apps/keyutils/keyutils-1.5.9-r4.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit multilib eutils toolchain-funcs linux-info multilib-minimal - -DESCRIPTION="Linux Key Management Utilities" -HOMEPAGE="https://people.redhat.com/dhowells/keyutils/" -SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux" -IUSE="static static-libs test" - -RDEPEND="" -DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )" - -pkg_setup() { - CONFIG_CHECK="~KEYS" - ERROR_KEYS="You must have CONFIG_KEYS to use this package!" - - if use test && kernel_is lt 4 0 0; then - CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS" - ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!" - fi - linux-info_pkg_setup -} - -src_prepare() { - epatch "${FILESDIR}"/${PN}-1.5.5-makefile-fixup.patch - epatch "${FILESDIR}"/${PN}-1.5.9-endian-check-{1,2}.patch #426424 - epatch "${FILESDIR}"/${PN}-1.5.9-disable-tests.patch #519062 #522050 - epatch "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch - - # The lsb check is useless, so avoid spurious command not found messages. - sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die - # All the test files are bash, but try to execute via `sh`. - sed -i -r \ - -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \ - tests/{Makefile*,*.sh} || die - find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} + - # Some tests call the kernel which calls userspace, but that will - # run the install keyutils rather than the locally compiled one, - # so disable round trip tests. - rm -rf tests/keyctl/requesting/{bad-args,piped,valid} - - # Delete man pages that are included in the common package now. #612640 - rm man/*-keyring.7 man/keyrings.7 || die - - multilib_copy_sources -} - -multilib_src_compile() { - tc-export AR CC - sed -i \ - -e "1iRPATH = $(usex static -static '')" \ - -e '/^C.*FLAGS/s|:=|+=|' \ - -e 's:-Werror::' \ - -e '/^BUILDFOR/s:=.*:=:' \ - -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \ - -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \ - -e "s: /: ${EPREFIX}/:g" \ - -e '/^NO_ARLIB/d' \ - Makefile || die - - # We need the static lib in order to statically link programs. - if use static ; then - export NO_ARLIB=0 - # Hack the progs to depend on the static lib instead. - sed -i \ - -e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB):' \ - Makefile || die - else - export NO_ARLIB=$(usex static-libs 0 1) - fi - emake -} - -multilib_src_test() { - # Execute the locally compiled code rather than the - # older versions already installed in the system. - LD_LIBRARY_PATH=${BUILD_DIR} \ - PATH="${BUILD_DIR}:${PATH}" \ - emake test -} - -multilib_src_install() { - # Possibly undo the setting for USE=static (see src_compile). - export NO_ARLIB=$(usex static-libs 0 1) - - default - use static || gen_usr_ldscript -a keyutils -} - -multilib_src_install_all() { - dodoc README -} diff --git a/sys-apps/keyutils/keyutils-1.6.ebuild b/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild index eeca7d4ac1f6..6d09620c632a 100644 --- a/sys-apps/keyutils/keyutils-1.6.ebuild +++ b/sys-apps/keyutils/keyutils-1.6.3-r1.ebuild @@ -1,28 +1,29 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 -inherit multilib toolchain-funcs linux-info multilib-minimal +inherit toolchain-funcs linux-info multilib-minimal DESCRIPTION="Linux Key Management Utilities" -HOMEPAGE="https://people.redhat.com/dhowells/keyutils/" -SRC_URI="https://people.redhat.com/dhowells/${PN}/${P}.tar.bz2" +HOMEPAGE="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/${P}.tar.gz" LICENSE="GPL-2 LGPL-2.1" -SLOT="0/1.8" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +SLOT="0/1.9" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux" IUSE="static static-libs test" +RESTRICT="!test? ( test )" RDEPEND="" DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )" PATCHES=( - "${FILESDIR}"/${PN}-1.6-endian-check-1.patch "${FILESDIR}"/${PN}-1.6-makefile-fixup.patch - "${FILESDIR}"/${PN}-1.5.10-silence-rpm-check.patch #656446 "${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 + "${FILESDIR}"/${P}-tests.patch ) pkg_setup() { @@ -61,11 +62,6 @@ src_prepare() { # The lsb check is useless, so avoid spurious command not found messages. sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die - # All the test files are bash, but try to execute via `sh`. - sed -i -r \ - -e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \ - tests/{Makefile*,*.sh} || die - find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} + || die # Some tests call the kernel which calls userspace, but that will # run the install keyutils rather than the locally compiled one, # so disable round trip tests. @@ -74,30 +70,38 @@ src_prepare() { multilib_copy_sources } +mymake() { + local args=( + PREFIX="${EPREFIX}/usr" + ETCDIR="${EPREFIX}/etc" + BINDIR="${EPREFIX}/bin" + SBINDIR="${EPREFIX}/sbin" + SHAREDIR="${EPREFIX}/usr/share/keyutils" + MANDIR="${EPREFIX}/usr/share/man" + INCLUDEDIR="${EPREFIX}/usr/include" + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + USRLIBDIR="${EPREFIX}/usr/$(get_libdir)" + CFLAGS="${CFLAGS}" + CXXFLAGS="${CXXFLAGS}" + RPATH=$(usex static -static '') + BUILDFOR= + NO_ARLIB="${NO_ARLIB}" + ) + if use static; then + args+=( LIB_DEPENDENCY='$(ARLIB)' ) + fi + emake "${args[@]}" "$@" +} + multilib_src_compile() { - tc-export AR CC - sed -i \ - -e "1iRPATH = $(usex static -static '')" \ - -e '/^C.*FLAGS/s|:=|+=|' \ - -e 's:-Werror::' \ - -e '/^BUILDFOR/s:=.*:=:' \ - -e "/^LIBDIR/s:=.*:= /usr/$(get_libdir):" \ - -e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \ - -e "s: /: ${EPREFIX}/:g" \ - -e '/^NO_ARLIB/d' \ - Makefile || die - - # We need the static lib in order to statically link programs. - if use static ; then - export NO_ARLIB=0 - # Hack the progs to depend on the static lib instead. - sed -i \ - -e '/^.*:.*[$](DEVELLIB)$/s:$(DEVELLIB):$(ARLIB) $(SONAME):' \ - Makefile || die + local NO_ARLIB + if use static; then + NO_ARLIB=0 else - export NO_ARLIB=$(usex static-libs 0 1) + NO_ARLIB=$(usex static-libs 0 1) fi - emake + tc-export AR CC CXX + mymake } multilib_src_test() { @@ -105,15 +109,13 @@ multilib_src_test() { # older versions already installed in the system. LD_LIBRARY_PATH=${BUILD_DIR} \ PATH="${BUILD_DIR}:${PATH}" \ - emake test + mymake test } multilib_src_install() { # Possibly undo the setting for USE=static (see src_compile). - export NO_ARLIB=$(usex static-libs 0 1) - - default - use static || gen_usr_ldscript -a keyutils + local NO_ARLIB=$(usex static-libs 0 1) + mymake DESTDIR="${D}" install } multilib_src_install_all() { diff --git a/sys-apps/keyutils/metadata.xml b/sys-apps/keyutils/metadata.xml index 58a06dbe3359..f16b3424c619 100644 --- a/sys-apps/keyutils/metadata.xml +++ b/sys-apps/keyutils/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>robbat2@gentoo.org</email> @@ -8,6 +8,9 @@ <email>base-system@gentoo.org</email> <name>Gentoo Base System</name> </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:keyutils_project:keyutils</remote-id> + </upstream> <slots> <subslots>Reflect ABI compatibility for libkeyutils.so.</subslots> </slots> |