Skip to content

Commit

Permalink
sys-apps/rng-tools: add support for NP_TPM and NO_DRNG options in v6
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gktrk committed Oct 26, 2017
1 parent 36af3e6 commit 2a5ab18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions sys-apps/rng-tools/files/rngd-initd-6
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 2a5ab18

Please sign in to comment.