sys-apps/rng-tools: add support for NP_TPM and NO_DRNG options in v6
authorGöktürk Yüksek <gokturk@gentoo.org>
Thu, 26 Oct 2017 01:05:05 +0000 (21:05 -0400)
committerGöktürk Yüksek <gokturk@gentoo.org>
Thu, 26 Oct 2017 01:05:37 +0000 (21:05 -0400)
rng-tools-6 removes the command line options '--no-tpm' and
'--no-drng'. Instead, it allows the inclusion and exclusion of a
particular entropy source using the command line options '-n' and 'x'
respectively.

Maintain backwards compatibility by translating the NP_TPM and NO_DRNG
options in the conf file to exclusion options.

Closes: https://bugs.gentoo.org/630798
Package-Manager: Portage-2.3.8, Repoman-2.3.2

sys-apps/rng-tools/files/rngd-initd-6 [new file with mode: 0644]
sys-apps/rng-tools/rng-tools-6-r1.ebuild [moved from sys-apps/rng-tools/rng-tools-6.ebuild with 95% similarity]
sys-apps/rng-tools/rng-tools-6.1-r1.ebuild [moved from sys-apps/rng-tools/rng-tools-6.1.ebuild with 96% similarity]

diff --git a/sys-apps/rng-tools/files/rngd-initd-6 b/sys-apps/rng-tools/files/rngd-initd-6
new file mode 100644 (file)
index 0000000..c3b48bf
--- /dev/null
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+       need localmount
+       after urandom
+       provide entropy
+}
+
+command=/usr/sbin/rngd
+pidfile="/var/run/${SVCNAME}.pid"
+command_args="--pid-file ${pidfile} --background --random-step ${STEP:-64} ${NO_TPM:+-x 1} \
+       ${NO_DRNG:+-x 2} --fill-watermark ${WATERMARK} ${DEVICE:+--rng-device ${DEVICE}}"
+start_stop_daemon_args="--wait 1000"
+retry="SIGKILL/5000"
similarity index 95%
rename from sys-apps/rng-tools/rng-tools-6.ebuild
rename to sys-apps/rng-tools/rng-tools-6-r1.ebuild
index 3a559236e0c79b374d8d6de0acf3c4d7e781b215..0dcc7e1fd35b11aa4333b42fdb2a83dcd9cd2899 100644 (file)
@@ -40,7 +40,7 @@ src_prepare() {
 
 src_install() {
        default
-       newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd
+       newinitd "${FILESDIR}"/rngd-initd-6 rngd
        newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
        systemd_dounit "${FILESDIR}"/rngd.service
 }
similarity index 96%
rename from sys-apps/rng-tools/rng-tools-6.1.ebuild
rename to sys-apps/rng-tools/rng-tools-6.1-r1.ebuild
index 2b37de32bff9359df9a54fc0ae675256fbac9365..2c149789b757f402788e285992b8e135a6744626 100644 (file)
@@ -54,7 +54,7 @@ src_configure() {
 
 src_install() {
        default
-       newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd
+       newinitd "${FILESDIR}"/rngd-initd-6 rngd
        newconfd "${FILESDIR}"/rngd-confd-4.1 rngd
        systemd_dounit "${FILESDIR}"/rngd.service
 }