summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-08-03 19:10:14 +0200
committerLars Wendler <polynomial-c@gentoo.org>2019-08-03 19:10:14 +0200
commit4210c50f3da3805e7570247e9f68b482919f33d8 (patch)
treebb22725d9336c373a6e2a7f43bd9e001db8c5f7e /sys-apps
parentsys-kernel/linux-firmware: manually call mount-boot functions (diff)
downloadgentoo-4210c50f3da3805e7570247e9f68b482919f33d8.tar.gz
gentoo-4210c50f3da3805e7570247e9f68b482919f33d8.tar.bz2
gentoo-4210c50f3da3805e7570247e9f68b482919f33d8.zip
sys-apps/keyutils: Bump to version 1.6.1
Package-Manager: Portage-2.3.70, Repoman-2.3.16 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/keyutils/Manifest1
-rw-r--r--sys-apps/keyutils/files/keyutils-1.6.1-silence-rpm-check.patch20
-rw-r--r--sys-apps/keyutils/keyutils-1.6.1.ebuild121
3 files changed, 142 insertions, 0 deletions
diff --git a/sys-apps/keyutils/Manifest b/sys-apps/keyutils/Manifest
index 7354bfc3ddf5..e04efd6f15ca 100644
--- a/sys-apps/keyutils/Manifest
+++ b/sys-apps/keyutils/Manifest
@@ -1,3 +1,4 @@
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.1.tar.gz 119065 BLAKE2B b0c65d8a1ee8cab1ac712820a8bf073777eacd558ddd007fa0fd50467d1de86cff238c1c0e6b33b5ff4da7dfd7e2fd673ce5706c39780e1a4fbee7d9653f3bc9 SHA512 a717d9bc6142edefc02da9e92242db352e0bc835483c303629c236e6d9cc51fb495b03fdf9e0e9f0864d7e755c92b7a67f018e806a5de1944673e60e317134a2
DIST keyutils-1.6.tar.bz2 93973 BLAKE2B 250275852d13fb5f77786350e64175c9c0909d1a7e44750e44b09f79217acb9c40536bd61e15d1abdfe36b9e161832f4c59f11b73915d457356a273ad4999990 SHA512 ee50da165099ea26904066d24b27c5165cb1eb78df6768cba3a534aa318a5c8d926ec6e5322a38c8cedaa768cd79bdcb26ef918aa8447df2e5dfbbe7b8f200ff
diff --git a/sys-apps/keyutils/files/keyutils-1.6.1-silence-rpm-check.patch b/sys-apps/keyutils/files/keyutils-1.6.1-silence-rpm-check.patch
new file mode 100644
index 000000000000..f68d7d111a0c
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.6.1-silence-rpm-check.patch
@@ -0,0 +1,20 @@
+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
+
+--- keyutils-1.6.1/Makefile
++++ keyutils-1.6.1/Makefile
+@@ -267,7 +267,7 @@
+ 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))
+ release3:= $(word 2,$(shell grep ^Release: $(SPECFILE)))
+ release2:= $(subst %{?dist},$(dist),$(release3))
+ release1:= $(subst %{?buildid},$(BUILDID),$(release2))
diff --git a/sys-apps/keyutils/keyutils-1.6.1.ebuild b/sys-apps/keyutils/keyutils-1.6.1.ebuild
new file mode 100644
index 000000000000..9bb0b02d6775
--- /dev/null
+++ b/sys-apps/keyutils/keyutils-1.6.1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multilib toolchain-funcs linux-info multilib-minimal usr-ldscript
+
+DESCRIPTION="Linux Key Management Utilities"
+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.9"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="static static-libs 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.6.1-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:' {} + || 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.
+ 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
+}