diff options
Diffstat (limited to 'sys-apps/rng-tools')
-rw-r--r-- | sys-apps/rng-tools/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/rng-tools/files/rngd-confd-6.11 | 96 | ||||
-rw-r--r-- | sys-apps/rng-tools/files/rngd-initd-6.11 | 68 | ||||
-rw-r--r-- | sys-apps/rng-tools/rng-tools-6.11-r1.ebuild (renamed from sys-apps/rng-tools/rng-tools-6.11.ebuild) | 6 |
4 files changed, 170 insertions, 4 deletions
diff --git a/sys-apps/rng-tools/Manifest b/sys-apps/rng-tools/Manifest index 902982b37619..3bd2c00c49eb 100644 --- a/sys-apps/rng-tools/Manifest +++ b/sys-apps/rng-tools/Manifest @@ -1,8 +1,10 @@ +AUX rngd-confd-6.11 2321 BLAKE2B 6cdf4cf7d61e33415df1c41933d1c38c398fd96370cb4c4e257f60479a3e69428d3735802d480e1a25714854de9bc6ed997856c1c4dbbf289b7a014026522aea SHA512 32c52316ebdffef7ec07dd97b45f124c2ecced3d0f49d75ad8d226f6eff478739dab6b008e0b1f4e55bc81bf615feee9860c45f35f0994c7c65d4d439501621f AUX rngd-confd-6.7 2245 BLAKE2B 7643525d9a57479ba1b725ea6f976421c3df990c56d9f694b6fd2d3283c51ccf42e1be403a2208be70bc09dbd946c0cb803bfb303ae3999e97b3c3baa1162aaf SHA512 f16c5bc417e7bae86311397b3bf51927cc2cfbb0b4ee14a835fff5b62f4d12ab194329942e21cae4eec56953e4271b1fc655dcfa0be4ccbff1df1f1defdc70d8 +AUX rngd-initd-6.11 1789 BLAKE2B 317c6d3d1b7ad10e137c6b5b615354ba7a6deb256da5ef9d75253a7f84c265536db1b70b290e0029cfaf40e565c8b280e3b1ec79ab93c8f659c969b5dedc7dab SHA512 60bf2c2d4984a1db8fcfaeaebd5249ed6d428c9ccb8412813ce97e146f3143efae23058475ac8baa1c2e88b00012fc119411bcfc14b04a0128696ee69641d98d AUX rngd-initd-6.7-r1 1683 BLAKE2B 34bea128a94f2fc8479ebd8e8a398a01bb96dcbe8dd74876f8b8725f701862908448deca3768437d1cd98b138c9203106c199942910f63e7c95598d3e1b27818 SHA512 c1e3d94509d5cd3301836961598e221ef0db2e7310386f0467a4f3068eada8ad4010b063202b8a8c3d163d39799aea7d6a4dcb4d8ca569fe7b51f5c870100b6d AUX rngd.service 133 BLAKE2B 1c3059e7ee924b42bc6567f5142973d550282248b3e49053b96782039ebd63096a0a8960d3e5a43cfac1d505c57e71015ad706099f06ac2809adf52c0b108d7c SHA512 51e9ea84b624cda8d3689d6a9a8d60da4a556aa9d2a1a04e698d9a1490717aa47172e152c93711f8d04be8a5b68b1dfd568a762bd8ee7219afb7cdfff15657d2 DIST rng-tools-6.10.tar.gz 56806 BLAKE2B 6cce0579a47f638cd90b51ba5216712fe39bf92dd59b288691a5e9783d520212cfb62e875a7e8f85de7a932568fdf0287cbea6f4869c9616a4c9325a111b0243 SHA512 b72d8918f709989ebc70cb9ea9c8b3dabf53041b24bc3f3a6de1bea318861dfd6c1a6110bd750041dc4819406db4a2b28f5137af5f5d5f2beb666f607913b389 DIST rng-tools-6.11.tar.gz 57366 BLAKE2B d613502bcb24560638c0abc956987e57ec54b6594bed414ce2b70086716f73a9a9eec4800c86097c4a14b91401f0f28be62f5182ee01c328c9a32cd79eaec561 SHA512 0058ca5d0c1ddb554284fe8e6b9c0b85f130e0b9e0b9f0f0219f434302766e07c321d4fc0c01bdeb59053d5cd14dab67dc1c306422ef35a62a267af9fbdf7deb EBUILD rng-tools-6.10-r1.ebuild 1859 BLAKE2B dbed15bdab91852dc931b593aa9c5a625aa77b7721827d9edbbf5005beaad20d88aa086b6deebbc3dbccd59179c36a0c24e8758fb50d6527ed3a405759d9f9a8 SHA512 5125b29f1a842e590e94e3808617378a0a05908a584c52f1ad52ae60880c163c6cdda72b2b78269a47f912482163d5807b9b282b50418bcb45c8b763f67a0399 -EBUILD rng-tools-6.11.ebuild 1865 BLAKE2B 84fbbe4c5bb4af42c2f31c8be67ff8c3fa0b9b838bcbbfc6c0cf7a04881f748b847038e0df3c7caad3540108997eb67e280a3e9462452f6831e754eb1996fd3f SHA512 356a1f6752423100229b3159d0c2a538ed9afd84e35fc88bd43976e22d5bea13ed829357b1d38c48fb9210045b0b070809473a25517eab14a701a212cf78dfd1 +EBUILD rng-tools-6.11-r1.ebuild 1857 BLAKE2B 89421ba2239d8f83a4ab41e8bea6100efac735b0ad1689fa818625d3e04b99697365b776da572d634348846d3aaaad12ac275a742a1a768c9c606eda47d655cf SHA512 c0a11820afb9d429254b930706b8d887f3b3ec01884373d51d13e06442ac72558723d931ba2494af7293c24a70dae8333f650f791a861a1b56ae94cb70500c53 MISC metadata.xml 713 BLAKE2B c05a29fb9b1c47eff6e8fbdf72bcd911bff431d72e1fb432e40f5ef760d82c26ec29322ccef9d06816b5d137708922b8c44df7ed0c1c60a07eba3b319fa0e1f5 SHA512 65b2454b2161f61cf187bb14b66f8cac59de3b023ed007e7780338533b8bc5c6aa0cff00d99d958f33b566b3fd9d2a597d698275c3a7914541233a9f9336cd64 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 000000000000..ad4a6f29897a --- /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 000000000000..25d4c6b5e49a --- /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 index 3e3aa014ffe5..7b183b63ef91 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 |