summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-10-23 17:19:32 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-10-23 17:19:32 +0000
commitf4003c8aa0ed03226347d1b5cb69d083a4d5a7aa (patch)
tree57424d9681a15d5bbced6642687480b8b20be33f /app-crypt/ekey-egd-linux
parentia64/sparc stable wrt #315775 (diff)
downloadgentoo-2-f4003c8aa0ed03226347d1b5cb69d083a4d5a7aa.tar.gz
gentoo-2-f4003c8aa0ed03226347d1b5cb69d083a4d5a7aa.tar.bz2
gentoo-2-f4003c8aa0ed03226347d1b5cb69d083a4d5a7aa.zip
Add ekey-egd-linux client ebuild, proxy maintained by Jaervosz from bug #342079 (with a bit of polishing).
(Portage version: 2.2.0_alpha1/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/ekey-egd-linux')
-rw-r--r--app-crypt/ekey-egd-linux/ChangeLog12
-rw-r--r--app-crypt/ekey-egd-linux/ekey-egd-linux-1.1.3.ebuild73
-rw-r--r--app-crypt/ekey-egd-linux/files/ekey-egd-linux-1.1.3-ldflags.patch13
-rw-r--r--app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf10
-rw-r--r--app-crypt/ekey-egd-linux/files/ekey-egd-linux.init30
-rw-r--r--app-crypt/ekey-egd-linux/metadata.xml16
6 files changed, 154 insertions, 0 deletions
diff --git a/app-crypt/ekey-egd-linux/ChangeLog b/app-crypt/ekey-egd-linux/ChangeLog
new file mode 100644
index 000000000000..674d40d9dea2
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for app-crypt/ekey-egd-linux
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/ChangeLog,v 1.1 2010/10/23 17:19:32 flameeyes Exp $
+
+*ekey-egd-linux-1.1.3 (23 Oct 2010)
+
+ 23 Oct 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +ekey-egd-linux-1.1.3.ebuild, +files/ekey-egd-linux-1.1.3-ldflags.patch,
+ +files/ekey-egd-linux.conf, +files/ekey-egd-linux.init, +metadata.xml:
+ Add ekey-egd-linux client ebuild, proxy maintained by Jaervosz from bug
+ #342079 (with a bit of polishing).
+
diff --git a/app-crypt/ekey-egd-linux/ekey-egd-linux-1.1.3.ebuild b/app-crypt/ekey-egd-linux/ekey-egd-linux-1.1.3.ebuild
new file mode 100644
index 000000000000..62bfe099f967
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/ekey-egd-linux-1.1.3.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/ekey-egd-linux-1.1.3.ebuild,v 1.1 2010/10/23 17:19:32 flameeyes Exp $
+
+EAPI=2
+
+inherit eutils toolchain-funcs
+
+MY_P="ekeyd-${PV}"
+DESCRIPTION="EGD client from Entropy Key"
+HOMEPAGE="http://www.entropykey.co.uk/"
+SRC_URI="http://www.entropykey.co.uk/res/download/${MY_P}.tar.gz"
+
+LICENSE="as-is" # yes, truly
+
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ # avoid using -Werror
+ sed -i -e 's:-Werror::' daemon/Makefile || die
+
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+}
+
+src_compile() {
+ local osname
+
+ # Override automatic detection: upstream provides this with uname,
+ # we don't like using uname.
+ case ${CHOST} in
+ *-linux-*)
+ osname=linux;;
+ *-freebsd*)
+ osname=freebsd;;
+ *-kfrebsd-gnu)
+ osname=gnukfreebsd;;
+ *-openbsd*)
+ osname=openbsd;;
+ *)
+ die "Unsupported operating system!"
+ ;;
+ esac
+
+ emake -C daemon \
+ CC="$(tc-getCC)" \
+ LUA_V= LUA_INC= \
+ OSNAME=${osname} \
+ OPT="${CFLAGS}" \
+ egd-linux || die "emake failed"
+}
+
+src_install() {
+ exeinto /usr/libexec
+ newexe "${S}"/daemon/egd-linux ${PN} || die
+ doman daemon/${PN}.8 || die
+
+ newconfd "${FILESDIR}"/${PN}.conf ${PN} || die
+ newinitd "${FILESDIR}"/${PN}.init ${PN} || die
+}
+
+pkg_postinst() {
+ elog "Sysctl write support have to be enabled in order for the init script"
+ elog "modify the kernel.random.write_wakeup_threshold sysctl entry."
+}
diff --git a/app-crypt/ekey-egd-linux/files/ekey-egd-linux-1.1.3-ldflags.patch b/app-crypt/ekey-egd-linux/files/ekey-egd-linux-1.1.3-ldflags.patch
new file mode 100644
index 000000000000..7d939d239c09
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/files/ekey-egd-linux-1.1.3-ldflags.patch
@@ -0,0 +1,13 @@
+Index: ekeyd-1.1.3/daemon/Makefile
+===================================================================
+--- ekeyd-1.1.3.orig/daemon/Makefile
++++ ekeyd-1.1.3/daemon/Makefile
+@@ -118,7 +118,7 @@ daemonise_ulusbd.o: daemonise.c
+ $(COMPILE.c) $(OUTPUT_OPTION) $(PTHFLAGS) $^
+
+ egd-linux: egd-linux.o daemonise.o
+- $(CC) $(CFLAGS) -o $@ $^
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+ ekeyd: ekeyd.o daemonise.o lstate.o connection.o stream.o frame.o packet.o keydb.o util.o fds.o krnlop.o foldback.o stats.o nonce.o ../device/frames/pem.o ../device/skeinwrap.o ../device/skein/skein.o ../device/skein/skein_block.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
diff --git a/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf b/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf
new file mode 100644
index 000000000000..c72da63e1c78
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf
@@ -0,0 +1,10 @@
+# Host IP address to connect to.
+HOST="localhost"
+# Port number to connect to.
+PORT="1234"
+# Time between reconnect attempts.
+RECONNECTINTERVAL=10
+# Set the number of 1024 bit blocks to request each time
+BLOCKS=2
+# Low level entropy to trigger egd-linux entropy read
+WATERMARK=1024
diff --git a/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init b/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init
new file mode 100644
index 000000000000..ad9476e780c2
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 2009-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init,v 1.1 2010/10/23 17:19:32 flameeyes Exp $
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting EntropyKey EGD client"
+ start-stop-daemon \
+ --start --pidfile "/var/run/${SVCNAME}.pid" \
+ --exec /usr/libexec/ekey-egd-linux -- \
+ -H ${HOST} -p ${PORT} \
+ -r ${RECONNECTINTERVAL} \
+ -b ${BLOCKS} \
+ -D "/var/run/${SVCNAME}.pid"
+ sysctl kernel.random.write_wakeup_threshold=$WATERMARK >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping EntropyKey EGD client"
+ start-stop-daemon \
+ --stop --pidfile "/var/run/${SVCNAME}.pid" \
+ --exec /usr/libexec/ekey-egd-linux
+ eend $?
+}
+
diff --git a/app-crypt/ekey-egd-linux/metadata.xml b/app-crypt/ekey-egd-linux/metadata.xml
new file mode 100644
index 000000000000..07e3fd691b09
--- /dev/null
+++ b/app-crypt/ekey-egd-linux/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>jaervosz@gentoo.org</email>
+ <name>Sune Kloppenborg Jeppesen</name>
+ <description>Proxied co-maintainer, assign bugs to him</description>
+ </maintainer>
+
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego Elio Pettenò</name>
+ <description>Proxy maintainer, CC him on bugs</description>
+ </maintainer>
+</pkgmetadata>