summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2012-03-06 11:23:51 +0100
committerSebastian Pipping <sebastian@pipping.org>2012-03-06 11:23:51 +0100
commitd8075e4e9f4caebf202e3cd5b1bb279e5d29a753 (patch)
tree2a9d15a7dc05cb20709266bd77af11b9c2eadf4e /sys-apps
parentgames-board/gnuchess: Remove 5.9.91 as 6.0.2 is in CVS now (diff)
downloadbetagarden-d8075e4e9f4caebf202e3cd5b1bb279e5d29a753.tar.gz
betagarden-d8075e4e9f4caebf202e3cd5b1bb279e5d29a753.tar.bz2
betagarden-d8075e4e9f4caebf202e3cd5b1bb279e5d29a753.zip
sys-apps/rng-tools: 2_p14
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/rng-tools/Manifest4
-rw-r--r--sys-apps/rng-tools/files/2/rngd36
-rw-r--r--sys-apps/rng-tools/files/2/rngd-conf9
-rw-r--r--sys-apps/rng-tools/rng-tools-2_p14.ebuild44
4 files changed, 93 insertions, 0 deletions
diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest
new file mode 100644
index 0000000..4743d12
--- /dev/null
+++ b/sys-apps/rng-tools/Manifest
@@ -0,0 +1,4 @@
+AUX 2/rngd 1488 RMD160 eb3628986ba3896deb8dfaf6765c052cb2d673ae SHA1 ce333b36be8144f24d55397c06dbf0eea4f3563d SHA256 00f8d05292565feb750d20af4ff6ff8ee20a14ae09c0164ec7b6b4b1ee67028d
+AUX 2/rngd-conf 259 RMD160 278957b8acad462fd5c888344fb21a52dffd1c6b SHA1 a3fe13793fffe10577f94398946b20142eae0771 SHA256 4dff7a0c8406f5344f71d236e755877388e93ff6728eedfdfe6921b3de41d137
+DIST rng-tools_2-unofficial-mt.14.orig.tar.bz2 68365 RMD160 d8e2ecc8316ada8bd7fd7b18588ab87f2f520a56 SHA1 afab5172172231ede6d4cf3ac1a694ea6b6ceba8 SHA256 a3791d566106873c361e19819f79c4fff44514cdf65c10f8a16e9ee3840f04ee
+EBUILD rng-tools-2_p14.ebuild 1090 RMD160 cc3a200b7ab7f2d2f920f7192691abbfae2f2703 SHA1 52538ee353dcd14556a8b1998c227abcdf98ff0b SHA256 1db027a83c9e2043037b7b1478448a5a1c49fbfcc9aad2ae3faf7de248a93bf3
diff --git a/sys-apps/rng-tools/files/2/rngd b/sys-apps/rng-tools/files/2/rngd
new file mode 100644
index 0000000..e114255
--- /dev/null
+++ b/sys-apps/rng-tools/files/2/rngd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/rng-tools/files/2/rngd,v 1.2 2009/07/15 19:47:25 nelchael Exp $
+
+depend() {
+ need localmount
+ after random
+}
+
+start() {
+ ebegin "Starting hardware RNG daemon"
+ if [ -e /dev/hw_random ]; then
+ start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -s ${STEP-64} -t ${TIMEOUT-60} -b -r /dev/hw_random
+ eend $? "Failed to start hardware RNG daemon"
+ elif [ -e /dev/hwrandom ]; then
+ start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -s ${STEP-64} -t ${TIMEOUT-60} -b -r /dev/hwrandom
+ eend $? "Failed to start hardware RNG daemon"
+ elif [ -e /dev/i810_rng ]; then
+ start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -s ${STEP-64} -t ${TIMEOUT-60} -b -r /dev/i810_rng
+ eend $? "Failed to start hardware RNG daemon"
+ elif [ -e /dev/hwrng ]; then
+ start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -s ${STEP-64} -t ${TIMEOUT-60} -b -r /dev/hwrng
+ eend $? "Failed to start hardware RNG daemon"
+ else
+ einfo "No hardware RNG found, using /dev/urandom as feedback input"
+ start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -s ${STEP-64} -t ${TIMEOUT-60} -b -r /dev/urandom
+ eend $? "Failed to start hardware RNG daemon"
+ fi
+}
+
+stop() {
+ ebegin "Stopping hardware RNG daemon"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rngd
+ eend $? "Failed to stop hardware RNG daemon"
+}
diff --git a/sys-apps/rng-tools/files/2/rngd-conf b/sys-apps/rng-tools/files/2/rngd-conf
new file mode 100644
index 0000000..17c17ec
--- /dev/null
+++ b/sys-apps/rng-tools/files/2/rngd-conf
@@ -0,0 +1,9 @@
+# /etc/conf.d/rngd
+
+# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
+
+# Random step (Number of bytes written to random-device at a time):
+STEP=64
+
+# Timeout (Interval written to random-device when the entropy pool is full):
+TIMEOUT=60
diff --git a/sys-apps/rng-tools/rng-tools-2_p14.ebuild b/sys-apps/rng-tools/rng-tools-2_p14.ebuild
new file mode 100644
index 0000000..78e6a7f
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-2_p14.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/rng-tools/rng-tools-2-r1.ebuild,v 1.1 2009/09/03 20:27:20 williamh Exp $
+
+EAPI="3"
+
+inherit autotools
+
+MY_PV=${PV/_p/-unofficial-mt.}
+DESCRIPTION="Daemon to use hardware random number generators."
+HOMEPAGE="http://gkernel.sourceforge.net/"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV}.orig.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~x86"
+IUSE=""
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+src_prepare() {
+ # we want this extra tool
+ echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-syslogfacility=DAEMON \
+ --with-pidfile=/var/run/rngd.pid \
+ --with-kernelrng=/dev/random \
+ --with-hwrng=/dev/hwrng \
+ --enable-viapadlock \
+ || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+
+ dodoc AUTHORS ChangeLog || die
+ doinitd "${FILESDIR}/2/rngd" || die
+ newconfd "${FILESDIR}/2/rngd-conf" rngd || die
+}