1 |
commit: 2a5ab18f1a74b1d1e59e5d45ee425da8808eb289 |
2 |
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 26 01:05:05 2017 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 26 01:05:37 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a5ab18f |
7 |
|
8 |
sys-apps/rng-tools: add support for NP_TPM and NO_DRNG options in v6 |
9 |
|
10 |
rng-tools-6 removes the command line options '--no-tpm' and |
11 |
'--no-drng'. Instead, it allows the inclusion and exclusion of a |
12 |
particular entropy source using the command line options '-n' and 'x' |
13 |
respectively. |
14 |
|
15 |
Maintain backwards compatibility by translating the NP_TPM and NO_DRNG |
16 |
options in the conf file to exclusion options. |
17 |
|
18 |
Closes: https://bugs.gentoo.org/630798 |
19 |
Package-Manager: Portage-2.3.8, Repoman-2.3.2 |
20 |
|
21 |
sys-apps/rng-tools/files/rngd-initd-6 | 16 ++++++++++++++++ |
22 |
.../{rng-tools-6.ebuild => rng-tools-6-r1.ebuild} | 2 +- |
23 |
.../{rng-tools-6.1.ebuild => rng-tools-6.1-r1.ebuild} | 2 +- |
24 |
3 files changed, 18 insertions(+), 2 deletions(-) |
25 |
|
26 |
diff --git a/sys-apps/rng-tools/files/rngd-initd-6 b/sys-apps/rng-tools/files/rngd-initd-6 |
27 |
new file mode 100644 |
28 |
index 00000000000..c3b48bf2209 |
29 |
--- /dev/null |
30 |
+++ b/sys-apps/rng-tools/files/rngd-initd-6 |
31 |
@@ -0,0 +1,16 @@ |
32 |
+#!/sbin/openrc-run |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+depend() { |
37 |
+ need localmount |
38 |
+ after urandom |
39 |
+ provide entropy |
40 |
+} |
41 |
+ |
42 |
+command=/usr/sbin/rngd |
43 |
+pidfile="/var/run/${SVCNAME}.pid" |
44 |
+command_args="--pid-file ${pidfile} --background --random-step ${STEP:-64} ${NO_TPM:+-x 1} \ |
45 |
+ ${NO_DRNG:+-x 2} --fill-watermark ${WATERMARK} ${DEVICE:+--rng-device ${DEVICE}}" |
46 |
+start_stop_daemon_args="--wait 1000" |
47 |
+retry="SIGKILL/5000" |
48 |
|
49 |
diff --git a/sys-apps/rng-tools/rng-tools-6.ebuild b/sys-apps/rng-tools/rng-tools-6-r1.ebuild |
50 |
similarity index 95% |
51 |
rename from sys-apps/rng-tools/rng-tools-6.ebuild |
52 |
rename to sys-apps/rng-tools/rng-tools-6-r1.ebuild |
53 |
index 3a559236e0c..0dcc7e1fd35 100644 |
54 |
--- a/sys-apps/rng-tools/rng-tools-6.ebuild |
55 |
+++ b/sys-apps/rng-tools/rng-tools-6-r1.ebuild |
56 |
@@ -40,7 +40,7 @@ src_prepare() { |
57 |
|
58 |
src_install() { |
59 |
default |
60 |
- newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd |
61 |
+ newinitd "${FILESDIR}"/rngd-initd-6 rngd |
62 |
newconfd "${FILESDIR}"/rngd-confd-4.1 rngd |
63 |
systemd_dounit "${FILESDIR}"/rngd.service |
64 |
} |
65 |
|
66 |
diff --git a/sys-apps/rng-tools/rng-tools-6.1.ebuild b/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild |
67 |
similarity index 96% |
68 |
rename from sys-apps/rng-tools/rng-tools-6.1.ebuild |
69 |
rename to sys-apps/rng-tools/rng-tools-6.1-r1.ebuild |
70 |
index 2b37de32bff..2c149789b75 100644 |
71 |
--- a/sys-apps/rng-tools/rng-tools-6.1.ebuild |
72 |
+++ b/sys-apps/rng-tools/rng-tools-6.1-r1.ebuild |
73 |
@@ -54,7 +54,7 @@ src_configure() { |
74 |
|
75 |
src_install() { |
76 |
default |
77 |
- newinitd "${FILESDIR}"/rngd-initd-r1-4.1 rngd |
78 |
+ newinitd "${FILESDIR}"/rngd-initd-6 rngd |
79 |
newconfd "${FILESDIR}"/rngd-confd-4.1 rngd |
80 |
systemd_dounit "${FILESDIR}"/rngd.service |
81 |
} |