From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3697D138BED for ; Mon, 5 Oct 2015 17:05:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8341E0835; Mon, 5 Oct 2015 17:05:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1A13BE0835 for ; Mon, 5 Oct 2015 17:05:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CE963340752 for ; Mon, 5 Oct 2015 17:05:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F76B761 for ; Mon, 5 Oct 2015 17:05:41 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1443686932.a35142f9dcb21c96f08207fada56341d0ec8e20a.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/rng-tools/rng-tools-5-r2.ebuild X-VCS-Directories: sys-apps/rng-tools/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: a35142f9dcb21c96f08207fada56341d0ec8e20a X-VCS-Branch: master Date: Mon, 5 Oct 2015 17:05:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b689d3f3-d3c4-488d-91b9-c0e8864cc8b2 X-Archives-Hash: 2e68cc26d800bd0c97b1cc5e86f01dc9 commit: a35142f9dcb21c96f08207fada56341d0ec8e20a Author: Gokturk Yuksek binghamton edu> AuthorDate: Tue Sep 22 10:09:09 2015 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Oct 1 08:08:52 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a35142f9 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 sys-apps/rng-tools/rng-tools-5-r2.ebuild | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) 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 0000000..f32feff --- /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 +}