summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGöktürk Yüksek <gokturk@gentoo.org>2019-03-12 20:24:24 -0400
committerGöktürk Yüksek <gokturk@gentoo.org>2019-03-12 20:41:39 -0400
commit3fa5252444ce5650f59bfb3b6d83a9ecd5b6e1e8 (patch)
tree28969a84f0b3541528ba8d7f49c4a2676db65f9e /sys-apps/rng-tools/files
parentnet-fs/davfs2: leave manpage compression to the package manager (diff)
downloadgentoo-3fa5252444ce5650f59bfb3b6d83a9ecd5b6e1e8.tar.gz
gentoo-3fa5252444ce5650f59bfb3b6d83a9ecd5b6e1e8.tar.bz2
gentoo-3fa5252444ce5650f59bfb3b6d83a9ecd5b6e1e8.zip
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@gentoo.org>
Diffstat (limited to 'sys-apps/rng-tools/files')
-rw-r--r--sys-apps/rng-tools/files/rngd-confd-6.790
-rw-r--r--sys-apps/rng-tools/files/rngd-initd-6.764
2 files changed, 154 insertions, 0 deletions
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 000000000000..20aa3281d535
--- /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 000000000000..e85581ba6cb4
--- /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
+}