public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-dev:musl commit in: sys-apps/keyutils/, sys-apps/keyutils/files/
Date: Sat, 22 Feb 2014 15:52:24 +0000 (UTC)	[thread overview]
Message-ID: <1393022003.4ef60849f56ef3c845614cb877620b45e441ae8f.blueness@gentoo> (raw)

commit:     4ef60849f56ef3c845614cb877620b45e441ae8f
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 21 22:33:23 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Feb 21 22:33:23 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=4ef60849

sys-apps/keyutils: remove key.dns_resolver

Package-Manager: portage-2.2.7
RepoMan-Options: --force

---
 .../files/keyutils-1.5.5-makefile-fixup.patch      | 27 +++++++++
 .../keyutils-1.5.5-remove-key.dns_resolver.patch   | 47 +++++++++++++++
 sys-apps/keyutils/keyutils-1.5.5-r99.ebuild        | 70 ++++++++++++++++++++++
 sys-apps/keyutils/metadata.xml                     |  8 +++
 4 files changed, 152 insertions(+)

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
new file mode 100644
index 0000000..ff4bcfa
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.5-makefile-fixup.patch
@@ -0,0 +1,27 @@
+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.5-remove-key.dns_resolver.patch b/sys-apps/keyutils/files/keyutils-1.5.5-remove-key.dns_resolver.patch
new file mode 100644
index 0000000..26ff334
--- /dev/null
+++ b/sys-apps/keyutils/files/keyutils-1.5.5-remove-key.dns_resolver.patch
@@ -0,0 +1,47 @@
+diff -Naur keyutils-1.5.5.orig/Makefile keyutils-1.5.5/Makefile
+--- keyutils-1.5.5.orig/Makefile	2011-11-30 15:27:43.000000000 +0000
++++ keyutils-1.5.5/Makefile	2014-02-21 22:31:47.224588695 +0000
+@@ -86,7 +86,7 @@
+ # Normal build rule
+ #
+ ###############################################################################
+-all: $(DEVELLIB) keyctl request-key key.dns_resolver
++all: $(DEVELLIB) keyctl request-key
+ 
+ ###############################################################################
+ #
+@@ -137,9 +137,6 @@
+ request-key: request-key.o $(DEVELLIB)
+ 	$(CC) -L. $(CFLAGS) $(LDFLAGS) $(RPATH) -o $@ $< -lkeyutils
+ 
+-key.dns_resolver: key.dns_resolver.o $(DEVELLIB)
+-	$(CC) -L. $(CFLAGS) $(LDFLAGS) $(RPATH) -o $@ $< -lkeyutils -lresolv
+-
+ ###############################################################################
+ #
+ # Install everything
+@@ -156,7 +153,6 @@
+ 	$(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
+-	$(INSTALL) -D key.dns_resolver $(DESTDIR)$(SBINDIR)/key.dns_resolver
+ 	$(INSTALL) -D -m 0644 request-key.conf $(DESTDIR)$(ETCDIR)/request-key.conf
+ 	mkdir -p $(DESTDIR)$(ETCDIR)/request-key.d
+ 	$(INSTALL) -D -m 0644 keyctl.1 $(DESTDIR)$(MAN1)/keyctl.1
+@@ -187,7 +183,6 @@
+ 	$(LNS) recursive_key_scan.3 $(DESTDIR)$(MAN3)/recursive_session_key_scan.3
+ 	$(INSTALL) -D -m 0644 request-key.conf.5 $(DESTDIR)$(MAN5)/request-key.conf.5
+ 	$(INSTALL) -D -m 0644 request-key.8 $(DESTDIR)$(MAN8)/request-key.8
+-	$(INSTALL) -D -m 0644 key.dns_resolver.8 $(DESTDIR)$(MAN8)/key.dns_resolver.8
+ 	$(INSTALL) -D -m 0644 keyutils.h $(DESTDIR)$(INCLUDEDIR)/keyutils.h
+ 
+ ###############################################################################
+@@ -206,7 +201,7 @@
+ clean:
+ 	$(MAKE) -C tests clean
+ 	$(RM) libkeyutils*
+-	$(RM) keyctl request-key key.dns_resolver
++	$(RM) keyctl request-key
+ 	$(RM) *.o *.os *~
+ 	$(RM) debugfiles.list debugsources.list
+ 

diff --git a/sys-apps/keyutils/keyutils-1.5.5-r99.ebuild b/sys-apps/keyutils/keyutils-1.5.5-r99.ebuild
new file mode 100644
index 0000000..b0991c1
--- /dev/null
+++ b/sys-apps/keyutils/keyutils-1.5.5-r99.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/keyutils/keyutils-1.5.5.ebuild,v 1.11 2014/01/18 04:49:23 vapier Exp $
+
+EAPI="3"
+
+inherit multilib eutils toolchain-funcs linux-info
+
+DESCRIPTION="Linux Key Management Utilities"
+HOMEPAGE="http://people.redhat.com/dhowells/keyutils/"
+SRC_URI="http://people.redhat.com/dhowells/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="test"
+
+DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
+
+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 "${FILESDIR}"/${PN}-1.5.5-makefile-fixup.patch
+	epatch "${FILESDIR}"/${PN}-1.5.5-remove-key.dns_resolver.patch
+	sed -i \
+		-e '1iRPATH=' \
+		-e '/^C.*FLAGS/s|:=|+=|' \
+		-e 's:-Werror::' \
+		-e '/^BUILDFOR/s:=.*:=:' \
+		-e "/^LIBDIR/s:=.*:=/usr/$(get_libdir):" \
+		-e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
+		Makefile || die
+
+	# 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}
+}
+
+src_configure() {
+	tc-export CC
+	tc-export AR
+}
+
+src_test() {
+	# Execute the locally compiled code rather than the
+	# older versions already installed in the system.
+	LD_LIBRARY_PATH=${S} \
+	PATH="${S}:${PATH}" \
+	emake test || die
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install || die
+	dodoc README
+	gen_usr_ldscript -a keyutils
+}

diff --git a/sys-apps/keyutils/metadata.xml b/sys-apps/keyutils/metadata.xml
new file mode 100644
index 0000000..035bc6b
--- /dev/null
+++ b/sys-apps/keyutils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<maintainer>
+  <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>


                 reply	other threads:[~2014-02-22 15:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393022003.4ef60849f56ef3c845614cb877620b45e441ae8f.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox