summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGokturk Yuksek <gokturk@binghamton.edu>2015-09-22 06:09:09 -0400
committerGokturk Yuksek <gokturk@binghamton.edu>2015-10-01 04:08:52 -0400
commita35142f9dcb21c96f08207fada56341d0ec8e20a (patch)
tree2b2d8ff3427e64343f2f9e4f43ac1dd092c6297c /sys-apps
parentsys-apps/rng-tools: remove unused lines from the init script. (diff)
downloadgentoo-a35142f9dcb21c96f08207fada56341d0ec8e20a.tar.gz
gentoo-a35142f9dcb21c96f08207fada56341d0ec8e20a.tar.bz2
gentoo-a35142f9dcb21c96f08207fada56341d0ec8e20a.zip
sys-apps/rng-tools: do not specify rng device in init script #481254
Linux hw_random driver provides a unified interface for multiple RNGs and the RNG source is exposed through /dev/hwrng device node. There is no need for the init script to look for other device nodes under /dev. By default, rngd uses /dev/hwrng as the entropy source, therefore it's not required to specify it on the command line explicitly. The creation of /dev/hwrng requires CONFIG_DEVTMPFS support in the kernel. Due to the way hw_random module is written, some device managers may fail to create /dev/hwrng successfuly. Mdev, for example, incorrectly creates /dev/hw_random instead of /dev/hwrng, mistaking module's own name for the device node's name (see related bug 561102). However, per gentoo wiki [1], CONFIG_DEVTMPFS is part of the mdev setup and these systems will have two device nodes (/dev/hw_random and /dev/hwrng) that point to the same device. Even in such setups, rngd will successfuly find /dev/hwrng. [1] https://wiki.gentoo.org/index.php?title=Mdev&oldid=246636 Gentoo-Bug: https://bugs.gentoo.org/481254 Package-Manager: portage-2.2.20.1
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/rng-tools/rng-tools-5-r2.ebuild40
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-apps/rng-tools/rng-tools-5-r2.ebuild b/sys-apps/rng-tools/rng-tools-5-r2.ebuild
new file mode 100644
index 000000000000..f32feff5300c
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-5-r2.ebuild
@@ -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-r1-4.1 rngd
+ newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
+ systemd_dounit "${FILESDIR}"/rngd.service
+}