summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-05-24 18:29:06 +0200
committerLars Wendler <polynomial-c@gentoo.org>2017-05-24 18:30:12 +0200
commit303e55e589bd914b48bfbc3e29880cfb2bac0c91 (patch)
tree38b4c56844f56a653cd9ef89960c89e988abbe26 /sys-apps/keyutils
parentsys-apps/collectl: Bump to version 4.1.3 (diff)
downloadgentoo-303e55e589bd914b48bfbc3e29880cfb2bac0c91.tar.gz
gentoo-303e55e589bd914b48bfbc3e29880cfb2bac0c91.tar.bz2
gentoo-303e55e589bd914b48bfbc3e29880cfb2bac0c91.zip
sys-apps/keyutils: Bump to version 1.5.10
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'sys-apps/keyutils')
-rw-r--r--sys-apps/keyutils/Manifest1
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch51
-rw-r--r--sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch25
-rw-r--r--sys-apps/keyutils/keyutils-1.5.10.ebuild96
4 files changed, 173 insertions, 0 deletions
diff --git a/sys-apps/keyutils/Manifest b/sys-apps/keyutils/Manifest
index 08c5655aca89..c1a203fc277d 100644
--- a/sys-apps/keyutils/Manifest
+++ b/sys-apps/keyutils/Manifest
@@ -1 +1,2 @@
+DIST keyutils-1.5.10.tar.bz2 74190 SHA256 115c3deae7f181778fd0e0ffaa2dad1bf1fe2f5677cf2e0e348cdb7a1c93afb6 SHA512 7f6f956c7e76cdc2aeb52e74fe670b20a5f9a5d9b543fd2ce971d80c48745f37d05235a42f0a8f152b1128a109c7d8bf07e751282a20d2d3f433a99a5308ae8d WHIRLPOOL 09d4c420d26e4089c5d1c460faf5c6a40912dc2f2d4abb3b1aaedfacb3919e7deab8e29c7a4f8306d5b8539c7ab0f3df659cc1cb804e5d43030bb0c331eead9f
DIST keyutils-1.5.9.tar.bz2 74683 SHA256 4da2c5552c688b65ab14d4fd40fbdf720c8b396d8ece643e040cf6e707e083ae SHA512 d4ee1dabb87844e18bfd8d094a5bc9ce792c96720b71e77961b6c36bb1addb9acea2a7004ddfba1d09b167af908368162312e5c3656b22a6266955bb57b887e2 WHIRLPOOL 0509cce076a32d2f319f596506d4aaeb83e1853ee6337e6a3041e6957e9098f4482ae56a9c6455605b72b3f34701a890e9be666b6fdd752ff14a3d3564dcba19
diff --git a/sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch b/sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch
new file mode 100644
index 000000000000..fa82792cddbd
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.10-disable-tests.patch
@@ -0,0 +1,51 @@
+disable tests that mess with system wide settings
+
+https://bugs.gentoo.org/519062
+
+--- keyutils-1.5.10/tests/bugzillas/bz1031154/runtest.sh
++++ keyutils-1.5.10/tests/bugzillas/bz1031154/runtest.sh
+@@ -27,6 +27,8 @@
+
+ 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"`
+@@ -97,6 +99,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
+
+--- keyutils-1.5.10/tests/keyctl/padd/useradd/runtest.sh
++++ keyutils-1.5.10/tests/keyctl/padd/useradd/runtest.sh
+@@ -40,6 +40,8 @@
+ marker "UNLINK KEY"
+ unlink_key $keyid @s
+
++if false ; then
++
+ if [ $skip_root_required = 0 ] && {
+ [ $OSDIST = RHEL ] && ! version_less_than $OSRELEASE 6.6 ||
+ keyutils_at_or_later_than 1.5.6 ;
+@@ -85,6 +87,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 ---
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
new file mode 100644
index 000000000000..c37cca0dbfd7
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.10-makefile-fixup.patch
@@ -0,0 +1,25 @@
+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/keyutils-1.5.10.ebuild b/sys-apps/keyutils/keyutils-1.5.10.ebuild
new file mode 100644
index 000000000000..658882242f2c
--- /dev/null
+++ b/sys-apps/keyutils/keyutils-1.5.10.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2017 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 ~arm-linux ~x86-linux"
+IUSE="static static-libs test"
+
+RDEPEND=""
+DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5.10-makefile-fixup.patch
+ "${FILESDIR}"/${PN}-1.5.10-disable-tests.patch #519062 #522050
+ "${FILESDIR}"/${PN}-1.5.9-header-extern-c.patch
+)
+
+pkg_setup() {
+ CONFIG_CHECK="~KEYS"
+ use test && CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS"
+ ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
+ ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # 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
+}