public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2015-10-05 17:05 Michał Górny
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2015-10-05 17:05 UTC (permalink / raw
  To: gentoo-commits

commit:     2b90c55c6656d33d8a2dc6a679a85c6f8d29310d
Author:     Gokturk Yuksek <gokturk <AT> binghamton <DOT> edu>
AuthorDate: Thu Oct  1 08:06:35 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Oct  1 08:09:46 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b90c55c

sys-apps/rng-tools: open entropy src with O_NOCTTY flag #556456

This revision patches the source file 'rngd_entsource.c', adding 'O_NOCTTY'
flag to the open() call that opens the entropy source for rngd.

Gentoo-Bug: https://bugs.gentoo.org/556456

Package-Manager: portage-2.2.20.1

 .../rng-tools/files/rng-tools-5-fix-noctty.patch   | 45 ++++++++++++++++++++++
 sys-apps/rng-tools/rng-tools-5-r2.ebuild           |  1 +
 2 files changed, 46 insertions(+)

diff --git a/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch b/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch
new file mode 100644
index 0000000..a48b235
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch
@@ -0,0 +1,45 @@
+From: Gokturk Yuksek <gokturk@binghamton.edu>
+Subject: [PATCH] Fix rngd to open the entropy source with 'O_NOCTTY' flag
+
+When start-stop-daemon starts a rngd instance configured to use a tty
+device as its entropy source, the application crashes due to not being
+able to read from the entropy device. This is caused by
+start-stop-daemon calling setsid() before executing rngd, which
+disassociates the controlling terminal. When rngd attempts to open a
+hardware entropy source that's a tty device, per POSIX rules, the
+device becomes the controlling terminal for the process. Then rngd
+calls daemon(), which internally calls setsid(), and consequently
+disassociates the controlling terminal for the child. Meanwhile the
+parent rngd process exits. This results in tty device hanging up. By
+looking at the strace logs attached to the bug, it can be observed
+that although the parent rngd process is able to read() from the
+entropy source successfully, further attempts to read() by the child
+rngd process return 0. This complies with the POSIX, which states that
+read() calls on a hung up terminal shall return 0.
+
+Note that when rngd is started without start-stop-daemon, this problem
+does not happen because at the time of opening the entropy source rngd
+already has a controlling terminal.
+
+Prevent the entropy source from becoming the controlling terminal by
+passing 'O_NOCTTY' flag to open() when opening an entropy source. This
+flag prevents a tty device from becoming the controlling terminal for
+a process without a controlling terminal at the time of open().
+
+Thanks to John Bowler <jbowler@acm.org> for debugging the problem and
+pinpointing the issue as well as confirming the fix.
+
+Gentoo-Bug-URL: https://bugs.gentoo.org/556456
+Reported-By: John Bowler <jbowler@acm.org>
+
+--- rngd_entsource.c
++++ rngd_entsource.c
+@@ -175,7 +175,7 @@
+  */
+ int init_entropy_source(struct rng *ent_src)
+ {
+-	ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY);
++	ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY | O_NOCTTY);
+ 	if (ent_src->rng_fd == -1) {
+ 		return 1;
+ 	}

diff --git a/sys-apps/rng-tools/rng-tools-5-r2.ebuild b/sys-apps/rng-tools/rng-tools-5-r2.ebuild
index 61e60b0..a104f8b 100644
--- a/sys-apps/rng-tools/rng-tools-5-r2.ebuild
+++ b/sys-apps/rng-tools/rng-tools-5-r2.ebuild
@@ -26,6 +26,7 @@ src_prepare() {
 	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
+	epatch "${FILESDIR}"/${P}-fix-noctty.patch #556456
 	eautoreconf
 
 	sed -i '/^AR /d' Makefile.in || die


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2018-09-26 17:50 Göktürk Yüksek
  0 siblings, 0 replies; 8+ messages in thread
From: Göktürk Yüksek @ 2018-09-26 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     846e3534c81b11e9acad30f82451734cc9ab0521
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 26 17:48:35 2018 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed Sep 26 17:50:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=846e3534

sys-apps/rng-tools: bump to v6.5

Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
Package-Manager: Portage-2.3.49, Repoman-2.3.11

 sys-apps/rng-tools/Manifest                        |  1 +
 ...6.5-jitterentropy-automagic-detection-fix.patch | 60 +++++++++++++++++++
 sys-apps/rng-tools/rng-tools-6.5.ebuild            | 69 ++++++++++++++++++++++
 3 files changed, 130 insertions(+)

diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest
index 8146fd915f2..a95823f89e7 100644
--- a/sys-apps/rng-tools/Manifest
+++ b/sys-apps/rng-tools/Manifest
@@ -4,4 +4,5 @@ DIST rng-tools-6.2.tar.gz 30421 BLAKE2B 646628095cbc611aee4113198e0874b5f0672cd7
 DIST rng-tools-6.3.1.tar.gz 31797 BLAKE2B 00d75d8436b4b49798bca8fb76e43a98feac8805b47a57d2315c22e72ed3dff30c6305b206168531c85c0576dc1d9864585eb3d4c2af833e9bec8dc5a478e19b SHA512 cb85674e6448e8152f92b4a82e944a9258dcc9ce68349404c0000c09378ac5f6fb298c50ed2d9a1b18d76c5f35b0a4884d5efd0f4dd434ec0952107e0738b937
 DIST rng-tools-6.3.tar.gz 31474 BLAKE2B 4d3924b3ca85d31d1999ceb45908cf64e8d2978d2e0aa638d9bbd3054a11a41251f9db54db35583c8fc080fd0667387cd63792c15486048d1f52300217e02fa9 SHA512 c00ac28c059ba689f114480958fe993e2199a1428137b151779a0331b9cc5a667f08770aa7b28d98c801166a509e8bd40d6b92f5c29b6ff73eb50a1cb0f2dd13
 DIST rng-tools-6.4.tar.gz 41248 BLAKE2B 16000e0779cf7aa25936a95661a0c40d4f0f12ed91fa36160924782d22a1057838bfb466f60614f91ef6c5576e0a29b6c1028bb72d5f5403c9a61d8f5ec16edd SHA512 12da9819b6e9a9ea688e82d1689642a690f6c9d78ad5fcf159a71b37a49f79120c8f62d4e1b8e81a496eac46a28137c5c87973499b31e1881a7866de99a168f0
+DIST rng-tools-6.5.tar.gz 51484 BLAKE2B 92700cbe1b48244effeae4f058507c27f8c9714f9bb5435ee7c6c08e260ce57891084208ea62391ab68b6551a3d95997c91d88020e9541564488abcf2041e479 SHA512 ae356ae18cb8584a594519038789d17e0f1b3d30122c058f86f3919a9c5ebfe0c48f8d7bfa6154b37d4f92d89c8b8a4a91007de0d1262ce5b86af19248c57bd0
 DIST rng-tools-6.tar.gz 26024 BLAKE2B a523328fcce56997e2847940cdc096abd5a539135f857f0a4cd3d782a1659f4d2978870149caac47b839c80788df6a3d891adcd39371d5968149dd29bc46bc62 SHA512 2aea947c4dba5e8c4df33396957f7224b62200be0e3d10aac08c84155fa473a67df5f49e07a07b2cbea4dfd772d90c1b194e8fce3d8eea762463a7f4a16d6ce4

diff --git a/sys-apps/rng-tools/files/rng-tools-6.5-jitterentropy-automagic-detection-fix.patch b/sys-apps/rng-tools/files/rng-tools-6.5-jitterentropy-automagic-detection-fix.patch
new file mode 100644
index 00000000000..b03960180ed
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-6.5-jitterentropy-automagic-detection-fix.patch
@@ -0,0 +1,60 @@
+From 76cfc06afb69019dcf0bbd9938f6378168e37411 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?G=C3=B6kt=C3=BCrk=20Y=C3=BCksek?= <gokturk@gentoo.org>
+Date: Wed, 26 Sep 2018 13:32:39 -0400
+Subject: [PATCH] configure.ac: control jitterentropy support using
+ --with-jitter
+
+Replace automagic detection of jitterentropy DSO with an AC_ARG_WITH
+macro so that rngd can be compiled without jitter support even when
+the jitterentropy library is available on the system.
+---
+ configure.ac | 26 +++++++++++++++++++-------
+ 1 file changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b1544d9..1e58184 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,6 +40,13 @@ AC_ARG_WITH([nistbeacon],
+ 	[with_nistbeacon=check]
+ )
+ 
++AC_ARG_WITH([jitter],
++	AS_HELP_STRING([--without-jitter],
++		[Disable jitter entropy library support. ]),
++	[],
++	[with_jitter=check]
++)
++
+ dnl Make sure anyone changing configure.ac/Makefile.am has a clue
+ AM_MAINTAINER_MODE
+ AM_PROG_AS
+@@ -61,13 +68,18 @@ AS_IF([test $target_cpu = powerpc64le], [AC_DEFINE([HAVE_DARN],1,[Enable DARN])]
+ 
+ AM_CONDITIONAL([JITTER], [false])
+ AM_CONDITIONAL([JITTER_DSO], [false])
+-AS_IF([test -f jitterentropy-library/Makefile],
+-		[AM_CONDITIONAL([JITTER], [true])
+-		 AC_DEFINE([HAVE_JITTER],1,[Enable JITTER])],
+-		[AC_SEARCH_LIBS(jent_version,jitterentropy,
+-			[AM_CONDITIONAL([JITTER_DSO], [true])
+-			 AC_DEFINE([HAVE_JITTER],1,[Enable JITTER])],
+-			[AC_MSG_NOTICE([Disabling JITTER entropy source])])])
++AS_IF(
++	[ test "x$with_jitter" != "xno" ],
++	[
++		AS_IF([test -f jitterentropy-library/Makefile],
++				[AM_CONDITIONAL([JITTER], [true])
++				 AC_DEFINE([HAVE_JITTER],1,[Enable JITTER])],
++				[AC_SEARCH_LIBS(jent_version,jitterentropy,
++					[AM_CONDITIONAL([JITTER_DSO], [true])
++					 AC_DEFINE([HAVE_JITTER],1,[Enable JITTER])],
++					[AC_MSG_NOTICE([Disabling JITTER entropy source])])])
++	]
++)
+ 
+ #AM_CONDITIONAL([JITTER], [test -f jitterentropy-library/Makefile])
+ #AS_IF([test -f jitterentropy-library/Makefile], [AC_DEFINE([HAVE_JITTER],1,[Enable JITTER])],[AC_MSG_NOTICE([Disabling JITTER entropy source])])
+-- 
+2.19.0
+

diff --git a/sys-apps/rng-tools/rng-tools-6.5.ebuild b/sys-apps/rng-tools/rng-tools-6.5.ebuild
new file mode 100644
index 00000000000..23bb96b4215
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-6.5.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="https://github.com/nhorman/rng-tools"
+SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86"
+IUSE="jitterentropy nistbeacon selinux"
+
+DEPEND="dev-libs/libgcrypt:0
+	dev-libs/libgpg-error
+	sys-fs/sysfsutils
+	jitterentropy? (
+		app-crypt/jitterentropy:=
+	)
+	nistbeacon? (
+		net-misc/curl[ssl]
+		dev-libs/libxml2:2=
+		dev-libs/openssl:0=
+	)
+"
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-rngd )"
+DEPEND="${DEPEND}
+	nistbeacon? (
+		virtual/pkgconfig
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/test-for-argp.patch
+	"${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962
+	"${FILESDIR}"/${PN}-6.5-jitterentropy-automagic-detection-fix.patch
+)
+
+src_prepare() {
+	echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+	default
+
+	mv README.md README || die
+
+	eautoreconf
+
+	sed -i '/^AR /d' Makefile.in || die
+	tc-export AR
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_with nistbeacon)
+		$(use_with jitterentropy jitter)
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	newinitd "${FILESDIR}"/rngd-initd-6 rngd
+	newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
+	systemd_dounit "${FILESDIR}"/rngd.service
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2018-12-29  2:12 Göktürk Yüksek
  0 siblings, 0 replies; 8+ messages in thread
From: Göktürk Yüksek @ 2018-12-29  2:12 UTC (permalink / raw
  To: gentoo-commits

commit:     fcd29101d4458d6715c5aaa96c75da29e93f80b4
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 29 02:11:42 2018 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Sat Dec 29 02:12:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcd29101

sys-apps/rng-tools: rewrite initd and confd (6.6-r1 only)

Restructure the openrc init script and the accompanying confd file to
reflect the recent changes to rngd.

- Instead of having individual NO_FOO="1" style variables in the confd
  file for each entropy source, maintain a single list of entropy
  sources to enable. Likewise, maintain a list of entropy sources to
  disable.
- Allow per-entropy-source options to be set inside the confd file.
- The init file defines $description now.
- Use $command_args_background instead of $command_args to specify the
  daemon behavior.
- Allow default setting of --fill-watermark.
- Allow extra arguments to be passed to rngd from the confd file.

Bug: https://bugs.gentoo.org/650622
Bug: https://bugs.gentoo.org/673120
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>

 sys-apps/rng-tools/files/rngd-confd-6      | 82 ++++++++++++++++++++++++++++++
 sys-apps/rng-tools/files/rngd-initd-6-r1   | 60 ++++++++++++++++++++++
 sys-apps/rng-tools/rng-tools-6.6-r1.ebuild | 68 +++++++++++++++++++++++++
 3 files changed, 210 insertions(+)

diff --git a/sys-apps/rng-tools/files/rngd-confd-6 b/sys-apps/rng-tools/files/rngd-confd-6
new file mode 100644
index 00000000000..a30e8c4fdad
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-confd-6
@@ -0,0 +1,82 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/rngd
+# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
+
+# Space-delimited list of entropy sources to enable
+# Note that some of the entropy sources may require certain USE flags
+# to be enabled or require hardware support to function properly
+# Entropy sources not specified here (or in the exclude list below)
+# will be enabled/disabled based on rngd default behavior
+#
+# Choose from the list:
+#         hwrng:  Hardware RNG Device
+#         tpm:    TPM RNG Device (Deprecated)
+#         rdrand: Intel RDRAND Instruction RNG
+#         darn:   Power9 DARN Instruction RNG
+#         nist:   NIST Network Entropy Beacon
+#                 (UNSAFE for cryptographic operations)
+#         jitter: JITTER Entropy generator
+#
+#INCLUDE_ENTROPY_SOURCES="hwrng tpm rdrand darn nist jitter"
+
+
+# Space-delimited list of entropy sources to disable
+# This is useful for disabling certain entropy sources even
+# when they are supported on the system
+#
+#EXCLUDE_ENTROPY_SOURCES="nist tpm"
+
+
+# Entropy source specific options:
+#
+#
+# hwrng device used for random number input:
+#
+#HWRNG_DEVICE="/dev/hwrng"
+#
+#
+# rdrand options:
+#         use_aes:(BOOLEAN)
+#
+#RDRAND_OPTIONS="use_aes:1"
+#
+#
+# darn options:
+#         use_aes:(BOOLEAN)
+#
+#DARN_OPTIONS="use_aes:1"
+#
+#
+# jitter options:
+#         thread_count:(INTEGER)
+#         buffer_size:(INTEGER)
+#         refill_thresh:(INTEGER)
+#         retry_count:(INTEGER)
+#         retry_delay:(INTEGER)
+#         use_aes:(BOOLEAN)
+#
+#JITTER_OPTIONS="thread_count:4 buffer_size:16535 refill_thresh:16535"
+#JITTER_OPTIONS="${JITTER_OPTIONS} retry_count:1 retry_delay:-1 use_aes:1"
+
+
+# Kernel device used for random number output
+#
+#RANDOM_DEVICE="/dev/random"
+
+
+# Random step (Number of bytes written to random-device at a time):
+#
+#STEP=64
+
+
+# Fill watermark
+# 0 <= n <= `sysctl kernel.random.poolsize`
+#
+#WATERMARK=2048
+
+
+# Any extra arguments for rngd
+#
+#EXTRA_ARGS=""

diff --git a/sys-apps/rng-tools/files/rngd-initd-6-r1 b/sys-apps/rng-tools/files/rngd-initd-6-r1
new file mode 100644
index 00000000000..5d89dd7a186
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-initd-6-r1
@@ -0,0 +1,60 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	need localmount
+	after urandom
+	provide entropy
+}
+
+command="/usr/sbin/rngd"
+description="Check and feed random data from hardware device to kernel entropy pool."
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command_args=""
+command_args_background="--pid-file ${pidfile} --background"
+start_stop_daemon_args="--wait 1000"
+retry="SIGKILL/5000"
+
+
+# Parse rngd confd file for extra command line arguments
+start_pre() {
+    for entsrc in ${INCLUDE_ENTROPY_SOURCES}; do
+	command_args="${command_args} -n ${entsrc}"
+    done
+
+    for entsrc in ${EXCLUDE_ENTROPY_SOURCES}; do
+	command_args="${command_args} -x ${entsrc}"
+    done
+
+    if [ "x${HWRNG_DEVICE}" != "x" ]; then
+	command_args="${command_args} --rng-device=${HWRNG_DEVICE}"
+    fi
+
+    for entsrc_opt in ${RDRAND_OPTIONS}; do
+	command_args="${command_args} -O rdrand:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${DARN_OPTIONS}; do
+	command_args="${command_args} -O darn:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${JITTER_OPTIONS}; do
+	command_args="${command_args} -O jitter:${entsrc_opt}"
+    done
+
+    if [ "x${RANDOM_DEVICE}" != "x" ]; then
+	command_args="${command_args} --random-device=${RANDOM_DEVICE}"
+    fi
+
+    if [ "x${STEP}" != "x" ]; then
+	command_args="${command_args} --random-step=${STEP}"
+    fi
+
+    if [ "x${WATERMARK}" != "x" ]; then
+	command_args="${command_args} --fill-watermark=${WATERMARK}"
+    fi
+
+    command_args="${command_args} ${EXTRA_ARGS}"
+    return 0
+}

diff --git a/sys-apps/rng-tools/rng-tools-6.6-r1.ebuild b/sys-apps/rng-tools/rng-tools-6.6-r1.ebuild
new file mode 100644
index 00000000000..49e8d55e554
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-6.6-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="https://github.com/nhorman/rng-tools"
+SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86"
+IUSE="jitterentropy nistbeacon selinux"
+
+DEPEND="dev-libs/libgcrypt:0
+	dev-libs/libgpg-error
+	sys-fs/sysfsutils
+	jitterentropy? (
+		app-crypt/jitterentropy:=
+	)
+	nistbeacon? (
+		net-misc/curl[ssl]
+		dev-libs/libxml2:2=
+		dev-libs/openssl:0=
+	)
+"
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-rngd )"
+DEPEND="${DEPEND}
+	nistbeacon? (
+		virtual/pkgconfig
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/test-for-argp.patch
+	"${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962
+)
+
+src_prepare() {
+	echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+	default
+
+	mv README.md README || die
+
+	eautoreconf
+
+	sed -i '/^AR /d' Makefile.in || die
+	tc-export AR
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_with nistbeacon)
+		$(use_enable jitterentropy)
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	newinitd "${FILESDIR}"/rngd-initd-6-r1 rngd
+	newconfd "${FILESDIR}"/rngd-confd-6 rngd
+	systemd_dounit "${FILESDIR}"/rngd.service
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2019-03-13  0:42 Göktürk Yüksek
  0 siblings, 0 replies; 8+ messages in thread
From: Göktürk Yüksek @ 2019-03-13  0:42 UTC (permalink / raw
  To: gentoo-commits

commit:     3fa5252444ce5650f59bfb3b6d83a9ecd5b6e1e8
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 13 00:24:24 2019 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed Mar 13 00:41:39 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fa52524

sys-apps/rng-tools: bump to 6.7 #679122

Closes: https://bugs.gentoo.org/679122
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>

 sys-apps/rng-tools/Manifest             |  1 +
 sys-apps/rng-tools/files/rngd-confd-6.7 | 90 +++++++++++++++++++++++++++++++++
 sys-apps/rng-tools/files/rngd-initd-6.7 | 64 +++++++++++++++++++++++
 sys-apps/rng-tools/metadata.xml         |  3 ++
 sys-apps/rng-tools/rng-tools-6.7.ebuild | 89 ++++++++++++++++++++++++++++++++
 5 files changed, 247 insertions(+)

diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest
index a941e025d1f..d17b7055c3c 100644
--- a/sys-apps/rng-tools/Manifest
+++ b/sys-apps/rng-tools/Manifest
@@ -6,4 +6,5 @@ DIST rng-tools-6.3.tar.gz 31474 BLAKE2B 4d3924b3ca85d31d1999ceb45908cf64e8d2978d
 DIST rng-tools-6.4.tar.gz 41248 BLAKE2B 16000e0779cf7aa25936a95661a0c40d4f0f12ed91fa36160924782d22a1057838bfb466f60614f91ef6c5576e0a29b6c1028bb72d5f5403c9a61d8f5ec16edd SHA512 12da9819b6e9a9ea688e82d1689642a690f6c9d78ad5fcf159a71b37a49f79120c8f62d4e1b8e81a496eac46a28137c5c87973499b31e1881a7866de99a168f0
 DIST rng-tools-6.5.tar.gz 51484 BLAKE2B 92700cbe1b48244effeae4f058507c27f8c9714f9bb5435ee7c6c08e260ce57891084208ea62391ab68b6551a3d95997c91d88020e9541564488abcf2041e479 SHA512 ae356ae18cb8584a594519038789d17e0f1b3d30122c058f86f3919a9c5ebfe0c48f8d7bfa6154b37d4f92d89c8b8a4a91007de0d1262ce5b86af19248c57bd0
 DIST rng-tools-6.6.tar.gz 51468 BLAKE2B 47231c60d78a48ade07855dfe8a807d6c10b8e27dc662ff7d98cf232b50e6c32f24197291a813d6ed6d15325a33fe9683d82943109a80cac1d9e348fc30cb849 SHA512 00bbe7f817d8f228f357a79ca270c27c62c0e588a99cd76917ecb7e88dfb627028c66497a59c9918205f3551aaf631963c8fd6504cb4198ddf57f714204c21c4
+DIST rng-tools-6.7.tar.gz 52792 BLAKE2B 3789aa4c6e2f024dcaef6b9b51521e206d65500a94ab456db61dc45c69ac5e4849a1e74abbe0f7640827ffb4bb20675c1f639a5be852d21d0d1a3c6b2e96bb5e SHA512 2f09edacb5448087041257326faf570c303b42f90bb695a1999b2c7543f20a28b15cdf705a2eca55cae8e9cf9fb5205c056fc26cfaf6af958bcda2cde1952b4d
 DIST rng-tools-6.tar.gz 26024 BLAKE2B a523328fcce56997e2847940cdc096abd5a539135f857f0a4cd3d782a1659f4d2978870149caac47b839c80788df6a3d891adcd39371d5968149dd29bc46bc62 SHA512 2aea947c4dba5e8c4df33396957f7224b62200be0e3d10aac08c84155fa473a67df5f49e07a07b2cbea4dfd772d90c1b194e8fce3d8eea762463a7f4a16d6ce4

diff --git a/sys-apps/rng-tools/files/rngd-confd-6.7 b/sys-apps/rng-tools/files/rngd-confd-6.7
new file mode 100644
index 00000000000..20aa3281d53
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-confd-6.7
@@ -0,0 +1,90 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/rngd
+# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
+
+# Space-delimited list of entropy sources to enable
+# Note that some of the entropy sources may require certain USE flags
+# to be enabled or require hardware support to function properly
+# Entropy sources not specified here (or in the exclude list below)
+# will be enabled/disabled based on rngd default behavior
+#
+# Choose from the list:
+#         hwrng:  Hardware RNG Device
+#         tpm:    TPM RNG Device (Deprecated)
+#         rdrand: Intel RDRAND Instruction RNG
+#         darn:   Power9 DARN Instruction RNG
+#         nist:   NIST Network Entropy Beacon
+#                 (UNSAFE for cryptographic operations)
+#         jitter: JITTER Entropy Generator
+#         pkcs11: PKCS11 Entropy Generator
+#
+#INCLUDE_ENTROPY_SOURCES="hwrng tpm rdrand darn nist jitter pkcs11"
+
+
+# Space-delimited list of entropy sources to disable
+# This is useful for disabling certain entropy sources even
+# when they are supported on the system
+#
+#EXCLUDE_ENTROPY_SOURCES="nist tpm"
+
+
+# Entropy source specific options:
+#
+#
+# hwrng device used for random number input:
+#
+#HWRNG_DEVICE="/dev/hwrng"
+#
+#
+# rdrand options:
+#         use_aes:(BOOLEAN)
+#
+#RDRAND_OPTIONS="use_aes:1"
+#
+#
+# darn options:
+#         use_aes:(BOOLEAN)
+#
+#DARN_OPTIONS="use_aes:1"
+#
+#
+# jitter options:
+#         thread_count:(INTEGER)
+#         buffer_size:(INTEGER)
+#         refill_thresh:(INTEGER)
+#         retry_count:(INTEGER)
+#         retry_delay:(INTEGER)
+#         use_aes:(BOOLEAN)
+#
+#JITTER_OPTIONS="thread_count:4 buffer_size:16535 refill_thresh:16535"
+#JITTER_OPTIONS="${JITTER_OPTIONS} retry_count:1 retry_delay:-1 use_aes:1"
+#
+#
+# pkcs11 options:
+#         engine_path:(STRING)
+#         chunk_size:(INTEGER)
+#
+#PKCS11_OPTIONS="engine_path:/usr/lib64/opensc-pkcs11.so chunk_size:1"
+
+
+# Kernel device used for random number output
+#
+#RANDOM_DEVICE="/dev/random"
+
+
+# Random step (Number of bytes written to random-device at a time):
+#
+#STEP=64
+
+
+# Fill watermark
+# 0 <= n <= `sysctl kernel.random.poolsize`
+#
+#WATERMARK=2048
+
+
+# Any extra arguments for rngd
+#
+#EXTRA_ARGS=""

diff --git a/sys-apps/rng-tools/files/rngd-initd-6.7 b/sys-apps/rng-tools/files/rngd-initd-6.7
new file mode 100644
index 00000000000..e85581ba6cb
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-initd-6.7
@@ -0,0 +1,64 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	need localmount
+	after urandom
+	provide entropy
+}
+
+command="/usr/sbin/rngd"
+description="Check and feed random data from hardware device to kernel entropy pool."
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command_args=""
+command_args_background="--pid-file ${pidfile} --background"
+start_stop_daemon_args="--wait 1000"
+retry="SIGKILL/5000"
+
+
+# Parse rngd confd file for extra command line arguments
+start_pre() {
+    for entsrc in ${INCLUDE_ENTROPY_SOURCES}; do
+	command_args="${command_args} -n ${entsrc}"
+    done
+
+    for entsrc in ${EXCLUDE_ENTROPY_SOURCES}; do
+	command_args="${command_args} -x ${entsrc}"
+    done
+
+    if [ "x${HWRNG_DEVICE}" != "x" ]; then
+	command_args="${command_args} --rng-device=${HWRNG_DEVICE}"
+    fi
+
+    for entsrc_opt in ${RDRAND_OPTIONS}; do
+	command_args="${command_args} -O rdrand:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${DARN_OPTIONS}; do
+	command_args="${command_args} -O darn:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${JITTER_OPTIONS}; do
+	command_args="${command_args} -O jitter:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${PKCS11_OPTIONS}; do
+	command_args="${command_args} -O pkcs11:${entsrc_opt}"
+    done
+
+    if [ "x${RANDOM_DEVICE}" != "x" ]; then
+	command_args="${command_args} --random-device=${RANDOM_DEVICE}"
+    fi
+
+    if [ "x${STEP}" != "x" ]; then
+	command_args="${command_args} --random-step=${STEP}"
+    fi
+
+    if [ "x${WATERMARK}" != "x" ]; then
+	command_args="${command_args} --fill-watermark=${WATERMARK}"
+    fi
+
+    command_args="${command_args} ${EXTRA_ARGS}"
+    return 0
+}

diff --git a/sys-apps/rng-tools/metadata.xml b/sys-apps/rng-tools/metadata.xml
index 911b7587f66..69907447109 100644
--- a/sys-apps/rng-tools/metadata.xml
+++ b/sys-apps/rng-tools/metadata.xml
@@ -16,6 +16,9 @@
 	<flag name="nistbeacon">
 		Enable NIST beacon entropy support
 	</flag>
+	<flag name="pkcs11">
+		Enable PKCS11 entropy support
+	</flag>
 </use>
 <upstream>
 	<remote-id type="github">nhorman/rng-tools</remote-id>

diff --git a/sys-apps/rng-tools/rng-tools-6.7.ebuild b/sys-apps/rng-tools/rng-tools-6.7.ebuild
new file mode 100644
index 00000000000..3259cb07f84
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-6.7.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools systemd readme.gentoo-r1 toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="https://github.com/nhorman/rng-tools"
+SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86"
+IUSE="jitterentropy nistbeacon pkcs11 selinux"
+
+DEPEND="dev-libs/libgcrypt:0
+	dev-libs/libgpg-error
+	sys-fs/sysfsutils
+	jitterentropy? (
+		app-crypt/jitterentropy:=
+	)
+	nistbeacon? (
+		net-misc/curl[ssl]
+		dev-libs/libxml2:2=
+		dev-libs/openssl:0=
+	)
+	pkcs11? (
+		dev-libs/libp11:=
+	)
+	elibc_musl? ( sys-libs/argp-standalone )
+"
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-rngd )"
+DEPEND="${DEPEND}
+	nistbeacon? (
+		virtual/pkgconfig
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}"/test-for-argp.patch
+	"${FILESDIR}"/${PN}-5-fix-textrels-on-PIC-x86.patch #469962
+)
+
+src_prepare() {
+	echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
+	default
+
+	mv README.md README || die
+
+	eautoreconf
+
+	sed -i '/^AR /d' Makefile.in || die
+	tc-export AR
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_enable jitterentropy)
+		$(use_with nistbeacon)
+		$(use_with pkcs11)
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	newinitd "${FILESDIR}"/rngd-initd-6.7 rngd
+	newconfd "${FILESDIR}"/rngd-confd-6.7 rngd
+	systemd_dounit "${FILESDIR}"/rngd.service
+
+	if use pkcs11; then
+		local DISABLE_AUTOFORMATTING=1
+		local DOC_CONTENTS="
+The PKCS11 entropy source may require extra packages (e.g. 'dev-libs/opensc')
+to support various smartcard readers. Make sure 'PKCS11_OPTIONS' in:
+	'${EROOT%/}/etc/conf.d/rngd'
+reflects the correct PKCS11 engine path to be used by rngd.
+"
+		readme.gentoo_create_doc
+	fi
+
+}
+
+pkg_postinst() {
+	use pkcs11 && readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2019-06-05 18:17 Göktürk Yüksek
  0 siblings, 0 replies; 8+ messages in thread
From: Göktürk Yüksek @ 2019-06-05 18:17 UTC (permalink / raw
  To: gentoo-commits

commit:     8c6132ee689913fa10285b0caa9a8e86bec524ba
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  5 18:09:16 2019 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed Jun  5 18:17:38 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c6132ee

sys-apps/rng-tools: use '/run' instead of '/var/run' #685326

Closes: https://bugs.gentoo.org/685326
Package-Manager: Portage-2.3.67, Repoman-2.3.12
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>

 sys-apps/rng-tools/files/{rngd-initd-6.7 => rngd-initd-6.7-r1}       | 2 +-
 sys-apps/rng-tools/{rng-tools-6.7.ebuild => rng-tools-6.7-r1.ebuild} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-apps/rng-tools/files/rngd-initd-6.7 b/sys-apps/rng-tools/files/rngd-initd-6.7-r1
similarity index 97%
rename from sys-apps/rng-tools/files/rngd-initd-6.7
rename to sys-apps/rng-tools/files/rngd-initd-6.7-r1
index e85581ba6cb..4a284b4f505 100644
--- a/sys-apps/rng-tools/files/rngd-initd-6.7
+++ b/sys-apps/rng-tools/files/rngd-initd-6.7-r1
@@ -10,7 +10,7 @@ depend() {
 
 command="/usr/sbin/rngd"
 description="Check and feed random data from hardware device to kernel entropy pool."
-pidfile="/var/run/${RC_SVCNAME}.pid"
+pidfile="/run/${RC_SVCNAME}.pid"
 command_args=""
 command_args_background="--pid-file ${pidfile} --background"
 start_stop_daemon_args="--wait 1000"

diff --git a/sys-apps/rng-tools/rng-tools-6.7.ebuild b/sys-apps/rng-tools/rng-tools-6.7-r1.ebuild
similarity index 97%
rename from sys-apps/rng-tools/rng-tools-6.7.ebuild
rename to sys-apps/rng-tools/rng-tools-6.7-r1.ebuild
index ca5962d6923..c112d9e0d3f 100644
--- a/sys-apps/rng-tools/rng-tools-6.7.ebuild
+++ b/sys-apps/rng-tools/rng-tools-6.7-r1.ebuild
@@ -75,7 +75,7 @@ src_configure() {
 
 src_install() {
 	default
-	newinitd "${FILESDIR}"/rngd-initd-6.7 rngd
+	newinitd "${FILESDIR}"/rngd-initd-6.7-r1 rngd
 	newconfd "${FILESDIR}"/rngd-confd-6.7 rngd
 	systemd_dounit "${FILESDIR}"/rngd.service
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2021-03-06  6:04 Göktürk Yüksek
  0 siblings, 0 replies; 8+ messages in thread
From: Göktürk Yüksek @ 2021-03-06  6:04 UTC (permalink / raw
  To: gentoo-commits

commit:     0531b6667d7908ed3e8f09559cc51172d39d3873
Author:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  6 04:16:40 2021 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Sat Mar  6 06:03:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0531b666

sys-apps/rng-tools: fix the v6.11 bump

- Add support for the "use_aes" NIST option in initd and confd
- Ship the upstream systemd unit instead of the downstream one

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>

 sys-apps/rng-tools/files/rngd-confd-6.11           | 96 ++++++++++++++++++++++
 sys-apps/rng-tools/files/rngd-initd-6.11           | 68 +++++++++++++++
 ...-tools-6.11.ebuild => rng-tools-6.11-r1.ebuild} |  6 +-
 3 files changed, 167 insertions(+), 3 deletions(-)

diff --git a/sys-apps/rng-tools/files/rngd-confd-6.11 b/sys-apps/rng-tools/files/rngd-confd-6.11
new file mode 100644
index 00000000000..ad4a6f29897
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-confd-6.11
@@ -0,0 +1,96 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/rngd
+# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
+
+# Space-delimited list of entropy sources to enable
+# Note that some of the entropy sources may require certain USE flags
+# to be enabled or require hardware support to function properly
+# Entropy sources not specified here (or in the exclude list below)
+# will be enabled/disabled based on rngd default behavior
+#
+# Choose from the list:
+#         hwrng:  Hardware RNG Device
+#         tpm:    TPM RNG Device (Deprecated)
+#         rdrand: Intel RDRAND Instruction RNG
+#         darn:   Power9 DARN Instruction RNG
+#         nist:   NIST Network Entropy Beacon
+#                 (UNSAFE for cryptographic operations)
+#         jitter: JITTER Entropy Generator
+#         pkcs11: PKCS11 Entropy Generator
+#
+#INCLUDE_ENTROPY_SOURCES="hwrng tpm rdrand darn nist jitter pkcs11"
+
+
+# Space-delimited list of entropy sources to disable
+# This is useful for disabling certain entropy sources even
+# when they are supported on the system
+#
+#EXCLUDE_ENTROPY_SOURCES="nist tpm"
+
+
+# Entropy source specific options:
+#
+#
+# hwrng device used for random number input:
+#
+#HWRNG_DEVICE="/dev/hwrng"
+#
+#
+# rdrand options:
+#         use_aes:(BOOLEAN)
+#
+#RDRAND_OPTIONS="use_aes:1"
+#
+#
+# darn options:
+#         use_aes:(BOOLEAN)
+#
+#DARN_OPTIONS="use_aes:1"
+#
+#
+# nist options:
+#         use_aes:(BOOLEAN)
+#
+#NIST_OPTIONS="use_aes:1"
+#
+#
+# jitter options:
+#         thread_count:(INTEGER)
+#         buffer_size:(INTEGER)
+#         refill_thresh:(INTEGER)
+#         retry_count:(INTEGER)
+#         retry_delay:(INTEGER)
+#         use_aes:(BOOLEAN)
+#
+#JITTER_OPTIONS="thread_count:4 buffer_size:16535 refill_thresh:16535"
+#JITTER_OPTIONS="${JITTER_OPTIONS} retry_count:1 retry_delay:-1 use_aes:1"
+#
+#
+# pkcs11 options:
+#         engine_path:(STRING)
+#         chunk_size:(INTEGER)
+#
+#PKCS11_OPTIONS="engine_path:/usr/lib64/opensc-pkcs11.so chunk_size:1"
+
+
+# Kernel device used for random number output
+#
+#RANDOM_DEVICE="/dev/random"
+
+
+# Random step (Number of bytes written to random-device at a time):
+#
+#STEP=64
+
+
+# Fill watermark
+# 0 <= n <= `sysctl kernel.random.poolsize`
+#
+#WATERMARK=2048
+
+
+# Any extra arguments for rngd
+#
+#EXTRA_ARGS=""

diff --git a/sys-apps/rng-tools/files/rngd-initd-6.11 b/sys-apps/rng-tools/files/rngd-initd-6.11
new file mode 100644
index 00000000000..25d4c6b5e49
--- /dev/null
+++ b/sys-apps/rng-tools/files/rngd-initd-6.11
@@ -0,0 +1,68 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+	need localmount
+	after urandom
+	provide entropy
+}
+
+command="/usr/sbin/rngd"
+description="Check and feed random data from hardware device to kernel entropy pool."
+pidfile="/run/${RC_SVCNAME}.pid"
+command_args=""
+command_args_background="--pid-file ${pidfile} --background"
+start_stop_daemon_args="--wait 1000"
+retry="SIGKILL/5000"
+
+
+# Parse rngd confd file for extra command line arguments
+start_pre() {
+    for entsrc in ${INCLUDE_ENTROPY_SOURCES}; do
+	command_args="${command_args} -n ${entsrc}"
+    done
+
+    for entsrc in ${EXCLUDE_ENTROPY_SOURCES}; do
+	command_args="${command_args} -x ${entsrc}"
+    done
+
+    if [ "x${HWRNG_DEVICE}" != "x" ]; then
+	command_args="${command_args} --rng-device=${HWRNG_DEVICE}"
+    fi
+
+    for entsrc_opt in ${RDRAND_OPTIONS}; do
+	command_args="${command_args} -O rdrand:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${DARN_OPTIONS}; do
+	command_args="${command_args} -O darn:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${NIST_OPTIONS}; do
+	command_args="${command_args} -O nist:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${JITTER_OPTIONS}; do
+	command_args="${command_args} -O jitter:${entsrc_opt}"
+    done
+
+    for entsrc_opt in ${PKCS11_OPTIONS}; do
+	command_args="${command_args} -O pkcs11:${entsrc_opt}"
+    done
+
+    if [ "x${RANDOM_DEVICE}" != "x" ]; then
+	command_args="${command_args} --random-device=${RANDOM_DEVICE}"
+    fi
+
+    if [ "x${STEP}" != "x" ]; then
+	command_args="${command_args} --random-step=${STEP}"
+    fi
+
+    if [ "x${WATERMARK}" != "x" ]; then
+	command_args="${command_args} --fill-watermark=${WATERMARK}"
+    fi
+
+    command_args="${command_args} ${EXTRA_ARGS}"
+    return 0
+}

diff --git a/sys-apps/rng-tools/rng-tools-6.11.ebuild b/sys-apps/rng-tools/rng-tools-6.11-r1.ebuild
similarity index 92%
rename from sys-apps/rng-tools/rng-tools-6.11.ebuild
rename to sys-apps/rng-tools/rng-tools-6.11-r1.ebuild
index 3e3aa014ffe..7b183b63ef9 100644
--- a/sys-apps/rng-tools/rng-tools-6.11.ebuild
+++ b/sys-apps/rng-tools/rng-tools-6.11-r1.ebuild
@@ -63,9 +63,9 @@ src_configure() {
 
 src_install() {
 	default
-	newinitd "${FILESDIR}"/rngd-initd-6.7-r1 rngd
-	newconfd "${FILESDIR}"/rngd-confd-6.7 rngd
-	systemd_dounit "${FILESDIR}"/rngd.service
+	newinitd "${FILESDIR}"/rngd-initd-6.11 rngd
+	newconfd "${FILESDIR}"/rngd-confd-6.11 rngd
+	systemd_dounit "${S}"/rngd.service
 
 	if use pkcs11; then
 		local DISABLE_AUTOFORMATTING=1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2021-05-13 22:11 David Seifert
  0 siblings, 0 replies; 8+ messages in thread
From: David Seifert @ 2021-05-13 22:11 UTC (permalink / raw
  To: gentoo-commits

commit:     5cbef54df05545fb34254d6d02aeaf78817ef527
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu May 13 22:10:48 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu May 13 22:10:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cbef54d

sys-apps/rng-tools: Remove old 6.10-r1, 6.11-r1

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-apps/rng-tools/Manifest                 |  2 -
 sys-apps/rng-tools/files/rngd-confd-6.7     | 90 -----------------------------
 sys-apps/rng-tools/files/rngd-initd-6.7-r1  | 64 --------------------
 sys-apps/rng-tools/files/rngd.service       |  8 ---
 sys-apps/rng-tools/rng-tools-6.10-r1.ebuild | 84 ---------------------------
 sys-apps/rng-tools/rng-tools-6.11-r1.ebuild | 84 ---------------------------
 6 files changed, 332 deletions(-)

diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest
index 478bde82743..9498feec57d 100644
--- a/sys-apps/rng-tools/Manifest
+++ b/sys-apps/rng-tools/Manifest
@@ -1,3 +1 @@
-DIST rng-tools-6.10.tar.gz 56806 BLAKE2B 6cce0579a47f638cd90b51ba5216712fe39bf92dd59b288691a5e9783d520212cfb62e875a7e8f85de7a932568fdf0287cbea6f4869c9616a4c9325a111b0243 SHA512 b72d8918f709989ebc70cb9ea9c8b3dabf53041b24bc3f3a6de1bea318861dfd6c1a6110bd750041dc4819406db4a2b28f5137af5f5d5f2beb666f607913b389
-DIST rng-tools-6.11.tar.gz 57366 BLAKE2B d613502bcb24560638c0abc956987e57ec54b6594bed414ce2b70086716f73a9a9eec4800c86097c4a14b91401f0f28be62f5182ee01c328c9a32cd79eaec561 SHA512 0058ca5d0c1ddb554284fe8e6b9c0b85f130e0b9e0b9f0f0219f434302766e07c321d4fc0c01bdeb59053d5cd14dab67dc1c306422ef35a62a267af9fbdf7deb
 DIST rng-tools-6.12.tar.gz 57309 BLAKE2B d7a12b50889065f885cb15cda9686d63950fcc1ac9099893ed9c9236a9a930627c9541980c410318b40104637df688f5622681ce1d80eee7d4aaaf696c6bc3c5 SHA512 56dd334b65dcec1456f8dbdbee5d83590de27cb6ee1b7715828b5316a913557fd178e264139dc92a82e09635ca15b1eb5f6169bfb4412fbe1b06ea28a5064c64

diff --git a/sys-apps/rng-tools/files/rngd-confd-6.7 b/sys-apps/rng-tools/files/rngd-confd-6.7
deleted file mode 100644
index 20aa3281d53..00000000000
--- a/sys-apps/rng-tools/files/rngd-confd-6.7
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# /etc/conf.d/rngd
-# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
-
-# Space-delimited list of entropy sources to enable
-# Note that some of the entropy sources may require certain USE flags
-# to be enabled or require hardware support to function properly
-# Entropy sources not specified here (or in the exclude list below)
-# will be enabled/disabled based on rngd default behavior
-#
-# Choose from the list:
-#         hwrng:  Hardware RNG Device
-#         tpm:    TPM RNG Device (Deprecated)
-#         rdrand: Intel RDRAND Instruction RNG
-#         darn:   Power9 DARN Instruction RNG
-#         nist:   NIST Network Entropy Beacon
-#                 (UNSAFE for cryptographic operations)
-#         jitter: JITTER Entropy Generator
-#         pkcs11: PKCS11 Entropy Generator
-#
-#INCLUDE_ENTROPY_SOURCES="hwrng tpm rdrand darn nist jitter pkcs11"
-
-
-# Space-delimited list of entropy sources to disable
-# This is useful for disabling certain entropy sources even
-# when they are supported on the system
-#
-#EXCLUDE_ENTROPY_SOURCES="nist tpm"
-
-
-# Entropy source specific options:
-#
-#
-# hwrng device used for random number input:
-#
-#HWRNG_DEVICE="/dev/hwrng"
-#
-#
-# rdrand options:
-#         use_aes:(BOOLEAN)
-#
-#RDRAND_OPTIONS="use_aes:1"
-#
-#
-# darn options:
-#         use_aes:(BOOLEAN)
-#
-#DARN_OPTIONS="use_aes:1"
-#
-#
-# jitter options:
-#         thread_count:(INTEGER)
-#         buffer_size:(INTEGER)
-#         refill_thresh:(INTEGER)
-#         retry_count:(INTEGER)
-#         retry_delay:(INTEGER)
-#         use_aes:(BOOLEAN)
-#
-#JITTER_OPTIONS="thread_count:4 buffer_size:16535 refill_thresh:16535"
-#JITTER_OPTIONS="${JITTER_OPTIONS} retry_count:1 retry_delay:-1 use_aes:1"
-#
-#
-# pkcs11 options:
-#         engine_path:(STRING)
-#         chunk_size:(INTEGER)
-#
-#PKCS11_OPTIONS="engine_path:/usr/lib64/opensc-pkcs11.so chunk_size:1"
-
-
-# Kernel device used for random number output
-#
-#RANDOM_DEVICE="/dev/random"
-
-
-# Random step (Number of bytes written to random-device at a time):
-#
-#STEP=64
-
-
-# Fill watermark
-# 0 <= n <= `sysctl kernel.random.poolsize`
-#
-#WATERMARK=2048
-
-
-# Any extra arguments for rngd
-#
-#EXTRA_ARGS=""

diff --git a/sys-apps/rng-tools/files/rngd-initd-6.7-r1 b/sys-apps/rng-tools/files/rngd-initd-6.7-r1
deleted file mode 100644
index 4a284b4f505..00000000000
--- a/sys-apps/rng-tools/files/rngd-initd-6.7-r1
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
-	need localmount
-	after urandom
-	provide entropy
-}
-
-command="/usr/sbin/rngd"
-description="Check and feed random data from hardware device to kernel entropy pool."
-pidfile="/run/${RC_SVCNAME}.pid"
-command_args=""
-command_args_background="--pid-file ${pidfile} --background"
-start_stop_daemon_args="--wait 1000"
-retry="SIGKILL/5000"
-
-
-# Parse rngd confd file for extra command line arguments
-start_pre() {
-    for entsrc in ${INCLUDE_ENTROPY_SOURCES}; do
-	command_args="${command_args} -n ${entsrc}"
-    done
-
-    for entsrc in ${EXCLUDE_ENTROPY_SOURCES}; do
-	command_args="${command_args} -x ${entsrc}"
-    done
-
-    if [ "x${HWRNG_DEVICE}" != "x" ]; then
-	command_args="${command_args} --rng-device=${HWRNG_DEVICE}"
-    fi
-
-    for entsrc_opt in ${RDRAND_OPTIONS}; do
-	command_args="${command_args} -O rdrand:${entsrc_opt}"
-    done
-
-    for entsrc_opt in ${DARN_OPTIONS}; do
-	command_args="${command_args} -O darn:${entsrc_opt}"
-    done
-
-    for entsrc_opt in ${JITTER_OPTIONS}; do
-	command_args="${command_args} -O jitter:${entsrc_opt}"
-    done
-
-    for entsrc_opt in ${PKCS11_OPTIONS}; do
-	command_args="${command_args} -O pkcs11:${entsrc_opt}"
-    done
-
-    if [ "x${RANDOM_DEVICE}" != "x" ]; then
-	command_args="${command_args} --random-device=${RANDOM_DEVICE}"
-    fi
-
-    if [ "x${STEP}" != "x" ]; then
-	command_args="${command_args} --random-step=${STEP}"
-    fi
-
-    if [ "x${WATERMARK}" != "x" ]; then
-	command_args="${command_args} --fill-watermark=${WATERMARK}"
-    fi
-
-    command_args="${command_args} ${EXTRA_ARGS}"
-    return 0
-}

diff --git a/sys-apps/rng-tools/files/rngd.service b/sys-apps/rng-tools/files/rngd.service
deleted file mode 100644
index 04793437e2d..00000000000
--- a/sys-apps/rng-tools/files/rngd.service
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Hardware RNG Entropy Gatherer Daemon
-
-[Service]
-ExecStart=/usr/sbin/rngd -f
-
-[Install]
-WantedBy=multi-user.target

diff --git a/sys-apps/rng-tools/rng-tools-6.10-r1.ebuild b/sys-apps/rng-tools/rng-tools-6.10-r1.ebuild
deleted file mode 100644
index a46c160a80f..00000000000
--- a/sys-apps/rng-tools/rng-tools-6.10-r1.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools systemd readme.gentoo-r1 toolchain-funcs
-
-DESCRIPTION="Daemon to use hardware random number generators"
-HOMEPAGE="https://github.com/nhorman/rng-tools"
-SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 ~riscv x86"
-IUSE="jitterentropy nistbeacon pkcs11 selinux"
-
-DEPEND="
-	dev-libs/openssl:0=
-	sys-fs/sysfsutils
-	jitterentropy? (
-		app-crypt/jitterentropy:=
-	)
-	nistbeacon? (
-		dev-libs/jansson
-		dev-libs/libxml2:2=
-		net-misc/curl[ssl]
-	)
-	pkcs11? (
-		dev-libs/libp11:=
-	)
-	elibc_musl? ( sys-libs/argp-standalone )
-"
-RDEPEND="${DEPEND}
-	selinux? ( sec-policy/selinux-rngd )"
-BDEPEND="
-	virtual/pkgconfig
-"
-
-src_prepare() {
-	echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
-
-	default
-
-	mv README.md README || die
-
-	eautoreconf
-
-	sed -i '/^AR /d' Makefile.in || die
-	tc-export AR
-}
-
-src_configure() {
-	local myeconfargs=(
-		$(use_enable jitterentropy)
-		$(use_with nistbeacon)
-		$(use_with pkcs11)
-		--without-rtlsdr # no librtlsdr in the tree
-	)
-
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	newinitd "${FILESDIR}"/rngd-initd-6.7-r1 rngd
-	newconfd "${FILESDIR}"/rngd-confd-6.7 rngd
-	systemd_dounit "${FILESDIR}"/rngd.service
-
-	if use pkcs11; then
-		local DISABLE_AUTOFORMATTING=1
-		local DOC_CONTENTS="
-The PKCS11 entropy source may require extra packages (e.g. 'dev-libs/opensc')
-to support various smartcard readers. Make sure 'PKCS11_OPTIONS' in:
-	'${EPREFIX}/etc/conf.d/rngd'
-reflects the correct PKCS11 engine path to be used by rngd.
-"
-		readme.gentoo_create_doc
-	fi
-
-}
-
-pkg_postinst() {
-	use pkcs11 && readme.gentoo_print_elog
-}

diff --git a/sys-apps/rng-tools/rng-tools-6.11-r1.ebuild b/sys-apps/rng-tools/rng-tools-6.11-r1.ebuild
deleted file mode 100644
index 8a63aedded7..00000000000
--- a/sys-apps/rng-tools/rng-tools-6.11-r1.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools systemd readme.gentoo-r1 toolchain-funcs
-
-DESCRIPTION="Daemon to use hardware random number generators"
-HOMEPAGE="https://github.com/nhorman/rng-tools"
-SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 ~riscv x86"
-IUSE="jitterentropy nistbeacon pkcs11 selinux"
-
-DEPEND="
-	dev-libs/openssl:0=
-	sys-fs/sysfsutils
-	jitterentropy? (
-		app-crypt/jitterentropy:=
-	)
-	nistbeacon? (
-		dev-libs/jansson
-		dev-libs/libxml2:2=
-		net-misc/curl[ssl]
-	)
-	pkcs11? (
-		dev-libs/libp11:=
-	)
-	elibc_musl? ( sys-libs/argp-standalone )
-"
-RDEPEND="${DEPEND}
-	selinux? ( sec-policy/selinux-rngd )"
-BDEPEND="
-	virtual/pkgconfig
-"
-
-src_prepare() {
-	echo 'bin_PROGRAMS = randstat' >> contrib/Makefile.am || die
-
-	default
-
-	mv README.md README || die
-
-	eautoreconf
-
-	sed -i '/^AR /d' Makefile.in || die
-	tc-export AR
-}
-
-src_configure() {
-	local myeconfargs=(
-		$(use_enable jitterentropy)
-		$(use_with nistbeacon)
-		$(use_with pkcs11)
-		--without-rtlsdr # no librtlsdr in the tree
-	)
-
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	newinitd "${FILESDIR}"/rngd-initd-6.11 rngd
-	newconfd "${FILESDIR}"/rngd-confd-6.11 rngd
-	systemd_dounit "${S}"/rngd.service
-
-	if use pkcs11; then
-		local DISABLE_AUTOFORMATTING=1
-		local DOC_CONTENTS="
-The PKCS11 entropy source may require extra packages (e.g. 'dev-libs/opensc')
-to support various smartcard readers. Make sure 'PKCS11_OPTIONS' in:
-	'${EPREFIX}/etc/conf.d/rngd'
-reflects the correct PKCS11 engine path to be used by rngd.
-"
-		readme.gentoo_create_doc
-	fi
-
-}
-
-pkg_postinst() {
-	use pkcs11 && readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/
@ 2021-06-13  8:41 David Seifert
  0 siblings, 0 replies; 8+ messages in thread
From: David Seifert @ 2021-06-13  8:41 UTC (permalink / raw
  To: gentoo-commits

commit:     01f3fe8d243477a650529bb734a452d8887394e3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 13 08:40:51 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jun 13 08:40:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01f3fe8d

sys-apps/rng-tools: add 6.13

Closes: https://github.com/gentoo/gentoo/pull/21210
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-apps/rng-tools/Manifest                        |  1 +
 .../rng-tools-6.13-various-autotools-fixups.patch  | 78 ++++++++++++++++++++++
 sys-apps/rng-tools/rng-tools-6.13.ebuild           | 73 ++++++++++++++++++++
 3 files changed, 152 insertions(+)

diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest
index 426e7b32088..684eb563631 100644
--- a/sys-apps/rng-tools/Manifest
+++ b/sys-apps/rng-tools/Manifest
@@ -1,2 +1,3 @@
 DIST rng-tools-6.11.tar.gz 57366 BLAKE2B d613502bcb24560638c0abc956987e57ec54b6594bed414ce2b70086716f73a9a9eec4800c86097c4a14b91401f0f28be62f5182ee01c328c9a32cd79eaec561 SHA512 0058ca5d0c1ddb554284fe8e6b9c0b85f130e0b9e0b9f0f0219f434302766e07c321d4fc0c01bdeb59053d5cd14dab67dc1c306422ef35a62a267af9fbdf7deb
 DIST rng-tools-6.12.tar.gz 57309 BLAKE2B d7a12b50889065f885cb15cda9686d63950fcc1ac9099893ed9c9236a9a930627c9541980c410318b40104637df688f5622681ce1d80eee7d4aaaf696c6bc3c5 SHA512 56dd334b65dcec1456f8dbdbee5d83590de27cb6ee1b7715828b5316a913557fd178e264139dc92a82e09635ca15b1eb5f6169bfb4412fbe1b06ea28a5064c64
+DIST rng-tools-6.13.tar.gz 59311 BLAKE2B e4601a2fa8158775a8ef7188edbe61a5eb1df35dccc9e1a0ab6b31b559f2f11dd67b682cf9995f0a67834690417e283d443ae6fa54e99ab6462a1185f9b9e09b SHA512 def5f2dcdd1771e8fe5af9476de866ff89a225065416672165af6019cbb166f874fae936b3705221aa47dc13ae99fa63d054d7d49b612f3151cd922a0a129490

diff --git a/sys-apps/rng-tools/files/rng-tools-6.13-various-autotools-fixups.patch b/sys-apps/rng-tools/files/rng-tools-6.13-various-autotools-fixups.patch
new file mode 100644
index 00000000000..4ad2348dad9
--- /dev/null
+++ b/sys-apps/rng-tools/files/rng-tools-6.13-various-autotools-fixups.patch
@@ -0,0 +1,78 @@
+https://github.com/nhorman/rng-tools/pull/132
+
+From 16b728f9a5bb138386fa770de817ec244a158be5 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sat, 12 Jun 2021 22:15:06 +0200
+Subject: [PATCH 1/3] Use `AM_PROG_AR` over `AC_CHECK_TOOLS`
+
+* `AM_PROG_AR` is the canonical way to detect the archiver
+  and includes workarounds for Cygwin.
+--- a/configure.ac
++++ b/configure.ac
+@@ -62,10 +62,9 @@ AM_PROG_AS
+ dnl Checks for programs
+ AC_PROG_CC
+ AC_PROG_RANLIB
++AM_PROG_AR
+ AC_PROG_GCC_TRADITIONAL
+ 
+-AC_CHECK_TOOLS([AR], [ar gar], :)
+-
+ AX_PTHREAD
+ 
+ AM_CONDITIONAL([RDRAND], [test $target_cpu = x86_64 -o $target_cpu = i686])
+
+From 2ce93190cb0111fcab2f622a539689d70960643a Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sat, 12 Jun 2021 22:15:09 +0200
+Subject: [PATCH 2/3] Build `randstat` binary
+--- a/contrib/Makefile.am
++++ b/contrib/Makefile.am
+@@ -1,3 +1,2 @@
+-
+-EXTRA_DIST = randstat.c
+-
++bin_PROGRAMS = randstat
++randstat_SOURCES = randstat.c
+
+From 3adf2613e262efbda0a3455e59c8cb3390271563 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sat, 12 Jun 2021 22:15:12 +0200
+Subject: [PATCH 3/3] `AC_CANONICAL_TARGET` -> `AC_CANONICAL_HOST`
+
+* `AC_CANONICAL_TARGET` is the type of system for which code
+  will be produced, not on which it will run. This is a common
+  confusion with Autoconf's target triplet.
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,7 +20,8 @@ dnl Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335  USA
+ AC_INIT(rng-tools, 6.13, [Neil Horman <nhorman@tuxdriver.com>])
+ AC_PREREQ(2.52)
+ AC_CONFIG_SRCDIR([rngd.c])
+-AC_CANONICAL_TARGET
++AC_CANONICAL_HOST
++AC_CANONICAL_TARGET dnl required for broken AX_PTHREAD
+ AM_INIT_AUTOMAKE([foreign])
+ AC_CONFIG_HEADERS([rng-tools-config.h])
+ AC_CONFIG_MACRO_DIRS([m4])
+@@ -67,14 +68,14 @@ AC_PROG_GCC_TRADITIONAL
+ 
+ AX_PTHREAD
+ 
+-AM_CONDITIONAL([RDRAND], [test $target_cpu = x86_64 -o $target_cpu = i686])
+-AS_IF([test $target_cpu = x86_64 -o $target_cpu = i686], [AC_DEFINE([HAVE_RDRAND],1,[Enable RDRAND])],[])
++AM_CONDITIONAL([RDRAND], [test $host_cpu = x86_64 || $host_cpu = i686])
++AS_IF([test $host_cpu = x86_64 || $host_cpu = i686], [AC_DEFINE([HAVE_RDRAND],1,[Enable RDRAND])],[])
+ 
+-AM_CONDITIONAL([DARN], [test $target_cpu = powerpc64le])
+-AS_IF([test $target_cpu = powerpc64le], [AC_DEFINE([HAVE_DARN],1,[Enable DARN])],[])
++AM_CONDITIONAL([DARN], [test $host_cpu = powerpc64le])
++AS_IF([test $host_cpu = powerpc64le], [AC_DEFINE([HAVE_DARN],1,[Enable DARN])],[])
+ 
+-AM_CONDITIONAL([RNDR], [test $target_cpu = aarch64])
+-AS_IF([test $target_cpu = aarch64], [AC_DEFINE([HAVE_RNDR],1,[Enable RNDR])],[])
++AM_CONDITIONAL([RNDR], [test $host_cpu = aarch64])
++AS_IF([test $host_cpu = aarch64], [AC_DEFINE([HAVE_RNDR],1,[Enable RNDR])],[])
+ AM_CONDITIONAL([JITTER], [false])
+ 
+ AC_ARG_ENABLE(jitterentropy,

diff --git a/sys-apps/rng-tools/rng-tools-6.13.ebuild b/sys-apps/rng-tools/rng-tools-6.13.ebuild
new file mode 100644
index 00000000000..b4a1ee5c700
--- /dev/null
+++ b/sys-apps/rng-tools/rng-tools-6.13.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools systemd readme.gentoo-r1 toolchain-funcs
+
+DESCRIPTION="Daemon to use hardware random number generators"
+HOMEPAGE="https://github.com/nhorman/rng-tools"
+SRC_URI="https://github.com/nhorman/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~x86"
+IUSE="jitterentropy nistbeacon pkcs11 selinux"
+
+DEPEND="
+	dev-libs/openssl:0=
+	jitterentropy? ( app-crypt/jitterentropy:= )
+	nistbeacon? (
+		dev-libs/jansson
+		dev-libs/libxml2:2=
+		net-misc/curl[ssl]
+	)
+	pkcs11? ( dev-libs/libp11:= )
+	elibc_musl? ( sys-libs/argp-standalone )"
+RDEPEND="${DEPEND}
+	selinux? ( sec-policy/selinux-rngd )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	# backport, remove on bump
+	"${FILESDIR}"/${P}-various-autotools-fixups.patch
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		$(use_enable jitterentropy)
+		$(use_with nistbeacon)
+		$(use_with pkcs11)
+		--without-rtlsdr # no librtlsdr in the tree
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	newinitd "${FILESDIR}"/rngd-initd-6.11 rngd
+	newconfd "${FILESDIR}"/rngd-confd-6.11 rngd
+	systemd_dounit rngd.service
+
+	if use pkcs11; then
+		local DISABLE_AUTOFORMATTING=1
+		local DOC_CONTENTS="
+The PKCS11 entropy source may require extra packages (e.g. 'dev-libs/opensc')
+to support various smartcard readers. Make sure 'PKCS11_OPTIONS' in:
+	'${EPREFIX}/etc/conf.d/rngd'
+reflects the correct PKCS11 engine path to be used by rngd.
+"
+		readme.gentoo_create_doc
+	fi
+}
+
+pkg_postinst() {
+	use pkcs11 && readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-06-13  8:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-29  2:12 [gentoo-commits] repo/gentoo:master commit in: sys-apps/rng-tools/, sys-apps/rng-tools/files/ Göktürk Yüksek
  -- strict thread matches above, loose matches on Subject: below --
2021-06-13  8:41 David Seifert
2021-05-13 22:11 David Seifert
2021-03-06  6:04 Göktürk Yüksek
2019-06-05 18:17 Göktürk Yüksek
2019-03-13  0:42 Göktürk Yüksek
2018-09-26 17:50 Göktürk Yüksek
2015-10-05 17:05 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox