sys-apps/rng-tools: improve the man pages #555094 #555106
authorMike Frysinger <vapier@gentoo.org>
Fri, 14 Aug 2015 06:54:46 +0000 (02:54 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 14 Aug 2015 06:55:34 +0000 (02:55 -0400)
sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch [new file with mode: 0644]
sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch [new file with mode: 0644]
sys-apps/rng-tools/rng-tools-5-r1.ebuild [new file with mode: 0644]

diff --git a/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch b/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch
new file mode 100644 (file)
index 0000000..4cedf8f
--- /dev/null
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/555094
+
+patch by Gokturk Yuksek <gokturk@binghamton.edu>
+
+--- rngd.8.in
++++ rngd.8.in
+@@ -66,7 +66,9 @@
+ .TP
+ \fB\-W\fI n\fR, \fB\-\-fill\-watermark=\fInnn\fR
+ Once we start doing it, feed entropy to \fIrandom-device\fR until at least
+-\fIfill-watermark\fR bits of entropy are available in its entropy pool (default: 2048).
++\fIfill-watermark\fR bits of entropy are available in its entropy pool.
++By default, this value is set to 75% of the entropy pool size or 2048 bits
++if the entropy pool size couldn't be determined.
+ Setting this too high will cause \fIrngd\fR to dominate the contents of the
+ entropy pool.  Low values will hurt system performance during entropy 
+ starves.  Do not set \fIfill-watermark\fR above the size of the
diff --git a/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch b/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch
new file mode 100644 (file)
index 0000000..fd6b97e
--- /dev/null
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/555106
+
+patch by Gokturk Yuksek <gokturk@binghamton.edu>
+
+--- rngd.8.in
++++ rngd.8.in
+@@ -59,7 +59,7 @@
+ .TP
+ \fB\-r\fI file\fR, \fB\-\-rng-device=\fIfile\fR
+ Kernel device used for random number input
+-(default: /dev/hwrandom)
++(default: /dev/hwrng)
+ .TP
+ \fB\-s\fI nnn\fR, \fB\-\-random-step=\fInnn\fR
+ Number of bytes written to random-device at a time (default: 64)
diff --git a/sys-apps/rng-tools/rng-tools-5-r1.ebuild b/sys-apps/rng-tools/rng-tools-5-r1.ebuild
new file mode 100644 (file)
index 0000000..5b7caf9
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools systemd toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="http://gkernel.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gkernel/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ppc ~x86"
+IUSE="selinux"
+
+DEPEND="dev-libs/libgcrypt:0
+       dev-libs/libgpg-error"
+RDEPEND="${DEPEND}
+       selinux? ( sec-policy/selinux-rngd )"
+
+src_prepare() {
+       echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am
+       epatch "${FILESDIR}"/test-for-argp.patch
+       epatch "${FILESDIR}"/${P}-fix-textrels-on-PIC-x86.patch #469962
+       epatch "${FILESDIR}"/${P}-man-fill-watermark.patch #555094
+       epatch "${FILESDIR}"/${P}-man-rng-device.patch #555106
+       eautoreconf
+
+       sed -i '/^AR /d' Makefile.in || die
+       tc-export AR
+}
+
+src_install() {
+       default
+       newinitd "${FILESDIR}"/rngd-initd-4.1 rngd
+       newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
+       systemd_dounit "${FILESDIR}"/rngd.service
+}