summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2020-12-09 20:56:20 -0500
committerMatt Turner <mattst88@gentoo.org>2020-12-09 21:13:02 -0500
commitcddca1c62d1e8ba51f493e8082e54716ca3ee779 (patch)
tree809580f6c4ed7d31cfb821771ec23ed61ad74ad7 /sys-apps/rng-tools/files
parentsys-apps/rng-tools: Propagate stable keywords (diff)
downloadgentoo-cddca1c62d1e8ba51f493e8082e54716ca3ee779.tar.gz
gentoo-cddca1c62d1e8ba51f493e8082e54716ca3ee779.tar.bz2
gentoo-cddca1c62d1e8ba51f493e8082e54716ca3ee779.zip
sys-apps/rng-tools: Drop old versions
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'sys-apps/rng-tools/files')
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch45
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch100
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch17
-rw-r--r--sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch15
-rw-r--r--sys-apps/rng-tools/files/rngd-confd-4.122
-rw-r--r--sys-apps/rng-tools/files/rngd-confd-682
-rw-r--r--sys-apps/rng-tools/files/rngd-initd-6-r160
-rw-r--r--sys-apps/rng-tools/files/rngd-initd-r1-4.116
-rw-r--r--sys-apps/rng-tools/files/rngd-shutdown.patch37
-rw-r--r--sys-apps/rng-tools/files/test-for-argp.patch43
10 files changed, 0 insertions, 437 deletions
diff --git a/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch b/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch
deleted file mode 100644
index 568ebe04589d..000000000000
--- a/sys-apps/rng-tools/files/rng-tools-5-fix-noctty.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Gokturk Yuksek <gokturk@binghamton.edu>
-Subject: [PATCH] Fix rngd to open the entropy source with 'O_NOCTTY' flag
-
-When start-stop-daemon starts a rngd instance configured to use a tty
-device as its entropy source, the application crashes due to not being
-able to read from the entropy device. This is caused by
-start-stop-daemon calling setsid() before executing rngd, which
-disassociates the controlling terminal. When rngd attempts to open a
-hardware entropy source that's a tty device, per POSIX rules, the
-device becomes the controlling terminal for the process. Then rngd
-calls daemon(), which internally calls setsid(), and consequently
-disassociates the controlling terminal for the child. Meanwhile the
-parent rngd process exits. This results in tty device hanging up. By
-looking at the strace logs attached to the bug, it can be observed
-that although the parent rngd process is able to read() from the
-entropy source successfully, further attempts to read() by the child
-rngd process return 0. This complies with the POSIX, which states that
-read() calls on a hung up terminal shall return 0.
-
-Note that when rngd is started without start-stop-daemon, this problem
-does not happen because at the time of opening the entropy source rngd
-already has a controlling terminal.
-
-Prevent the entropy source from becoming the controlling terminal by
-passing 'O_NOCTTY' flag to open() when opening an entropy source. This
-flag prevents a tty device from becoming the controlling terminal for
-a process without a controlling terminal at the time of open().
-
-Thanks to John Bowler <jbowler@acm.org> for debugging the problem and
-pinpointing the issue as well as confirming the fix.
-
-Gentoo-Bug-URL: https://bugs.gentoo.org/556456
-Reported-By: John Bowler <jbowler@acm.org>
-
---- a/rngd_entsource.c
-+++ b/rngd_entsource.c
-@@ -175,7 +175,7 @@
- */
- int init_entropy_source(struct rng *ent_src)
- {
-- ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY);
-+ ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY | O_NOCTTY);
- if (ent_src->rng_fd == -1) {
- return 1;
- }
diff --git a/sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch b/sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch
deleted file mode 100644
index 5fa5f0b4ecf7..000000000000
--- a/sys-apps/rng-tools/files/rng-tools-5-fix-textrels-on-PIC-x86.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
-Subject: [PATCH] Fix assemby textrels on rdrand_asm.S on PIC x86
-
-This patch updates the fixes in the assembly in rdrand_asm.S in
-sys-apps/rng-tools-5 so it won't generate textrels on PIC systems.
-The main fixes are in the use of leal in SETPTR for such systems, the rest is
-the usual PIC support stuff.
-
-This should fix Gentoo bug #469962 and help fix #518210
-
-This patch is released under the GPLv2 or a higher version license as is the
-original file as long as the author and the tester are credited.
-
-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=469962
-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=518210
-Upstream-status: Not sent yet
-Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
-Reported-by: cilly <cilly@cilly.mine.nu>
-Reported-by: Manuel Rüger <mrueg@gentoo.org>
-Tested-by: Anthony Basile <blueness@gentoo.org>
-
---- rng-tools/rdrand_asm.S
-+++ rng-tools/rdrand_asm.S
-@@ -2,6 +2,7 @@
- * Copyright (c) 2011-2014, Intel Corporation
- * Authors: Fenghua Yu <fenghua.yu@intel.com>,
- * H. Peter Anvin <hpa@linux.intel.com>
-+ * PIC code by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
-@@ -174,7 +175,19 @@
- jmp 4b
- ENDPROC(x86_rdseed_or_rdrand_bytes)
-
-+#if defined(__PIC__)
-+#define INIT_PIC() \
-+ pushl %ebx ; \
-+ call __x86.get_pc_thunk.bx ; \
-+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
-+#define END_PIC() \
-+ popl %ebx
-+#define SETPTR(var,ptr) leal (var)@GOTOFF(%ebx),ptr
-+#else
-+#define INIT_PIC()
-+#define END_PIC()
- #define SETPTR(var,ptr) movl $(var),ptr
-+#endif
- #define PTR0 %eax
- #define PTR1 %edx
- #define PTR2 %ecx
-@@ -190,6 +203,7 @@
- movl 8(%ebp), %eax
- movl 12(%ebp), %edx
- push %esi
-+ INIT_PIC()
- #endif
- movl $512, CTR3 /* Number of rounds */
-
-@@ -280,6 +294,7 @@
- movdqa %xmm7, (7*16)(PTR1)
-
- #ifdef __i386__
-+ END_PIC()
- pop %esi
- pop %ebp
- #endif
-@@ -294,6 +309,7 @@
- push %ebp
- mov %esp, %ebp
- movl 8(%ebp), %eax
-+ INIT_PIC()
- #endif
-
- SETPTR(aes_round_keys, PTR1)
-@@ -323,6 +339,7 @@
- call 1f
-
- #ifdef __i386__
-+ END_PIC()
- pop %ebp
- #endif
- ret
-@@ -343,6 +360,16 @@
-
- ENDPROC(x86_aes_expand_key)
-
-+#if defined(__i386__) && defined(__PIC__)
-+ .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
-+ .globl __x86.get_pc_thunk.bx
-+ .hidden __x86.get_pc_thunk.bx
-+ .type __x86.get_pc_thunk.bx, @function
-+__x86.get_pc_thunk.bx:
-+ movl (%esp), %ebx
-+ ret
-+#endif
-+
- .bss
- .balign 64
- aes_round_keys:
diff --git a/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch b/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch
deleted file mode 100644
index ea249a5ebdfb..000000000000
--- a/sys-apps/rng-tools/files/rng-tools-5-man-fill-watermark.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-https://bugs.gentoo.org/555094
-
-patch by Gokturk Yuksek <gokturk@binghamton.edu>
-
---- a/rngd.8.in
-+++ b/rngd.8.in
-@@ -66,7 +66,9 @@
- .TP
- \fB\-W\fI n\fR, \fB\-\-fill\-watermark=\fInnn\fR
- Once we start doing it, feed entropy to \fIrandom-device\fR until at least
--\fIfill-watermark\fR bits of entropy are available in its entropy pool (default: 2048).
-+\fIfill-watermark\fR bits of entropy are available in its entropy pool.
-+By default, this value is set to 75% of the entropy pool size or 2048 bits
-+if the entropy pool size couldn't be determined.
- Setting this too high will cause \fIrngd\fR to dominate the contents of the
- entropy pool. Low values will hurt system performance during entropy
- starves. Do not set \fIfill-watermark\fR above the size of the
diff --git a/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch b/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch
deleted file mode 100644
index 82a0cf295765..000000000000
--- a/sys-apps/rng-tools/files/rng-tools-5-man-rng-device.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://bugs.gentoo.org/555106
-
-patch by Gokturk Yuksek <gokturk@binghamton.edu>
-
---- a/rngd.8.in
-+++ b/rngd.8.in
-@@ -59,7 +59,7 @@
- .TP
- \fB\-r\fI file\fR, \fB\-\-rng-device=\fIfile\fR
- Kernel device used for random number input
--(default: /dev/hwrandom)
-+(default: /dev/hwrng)
- .TP
- \fB\-s\fI nnn\fR, \fB\-\-random-step=\fInnn\fR
- Number of bytes written to random-device at a time (default: 64)
diff --git a/sys-apps/rng-tools/files/rngd-confd-4.1 b/sys-apps/rng-tools/files/rngd-confd-4.1
deleted file mode 100644
index 77e5db583458..000000000000
--- a/sys-apps/rng-tools/files/rngd-confd-4.1
+++ /dev/null
@@ -1,22 +0,0 @@
-# /etc/conf.d/rngd
-
-# Please see "/usr/sbin/rngd --help" and "man rngd" for more information
-
-# If a single device is preferred, then specify it here, otherwise we will
-# search for suitable devices.
-#DEVICE=
-
-# Random step (Number of bytes written to random-device at a time):
-STEP=64
-
-# Should TPM be avoided?
-# NO_TPM=0
-
-# Should RDRAND be avoided? Please note that unless this is commented
-# out, RDRAND _will_ be disabled, as any value will cause it to be
-# disabled.
-# NO_DRNG=1
-
-# Fill watermark
-# 0 <= n <= `sysctl kernel.random.poolsize`
-WATERMARK=2048
diff --git a/sys-apps/rng-tools/files/rngd-confd-6 b/sys-apps/rng-tools/files/rngd-confd-6
deleted file mode 100644
index a30e8c4fdadc..000000000000
--- a/sys-apps/rng-tools/files/rngd-confd-6
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2018 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
-#
-#INCLUDE_ENTROPY_SOURCES="hwrng tpm rdrand darn nist jitter"
-
-
-# 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"
-
-
-# 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-r1 b/sys-apps/rng-tools/files/rngd-initd-6-r1
deleted file mode 100644
index 5d89dd7a1868..000000000000
--- a/sys-apps/rng-tools/files/rngd-initd-6-r1
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 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
-
- 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/files/rngd-initd-r1-4.1 b/sys-apps/rng-tools/files/rngd-initd-r1-4.1
deleted file mode 100644
index b7777ebab71c..000000000000
--- a/sys-apps/rng-tools/files/rngd-initd-r1-4.1
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 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:+--no-tpm=1} \
- ${NO_DRNG:+--no-drng=1} --fill-watermark ${WATERMARK} ${DEVICE:+--rng-device ${DEVICE}}"
-start_stop_daemon_args="--wait 1000"
-retry="SIGKILL/5000"
diff --git a/sys-apps/rng-tools/files/rngd-shutdown.patch b/sys-apps/rng-tools/files/rngd-shutdown.patch
deleted file mode 100644
index ba2fffdd86f6..000000000000
--- a/sys-apps/rng-tools/files/rngd-shutdown.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://bugzilla.redhat.com/show_bug.cgi?id=1690364
-
-diff --git a/rngd_jitter.c b/rngd_jitter.c
-index 23d96b3..43a13e0 100644
---- a/rngd_jitter.c
-+++ b/rngd_jitter.c
-@@ -473,26 +473,22 @@ void close_jitter_entropy_source(struct rng *ent_src)
- for (i=0; i < num_threads; i++)
- tdata[i].active = 0;
-
-- flags = fcntl(pipefds[1], F_GETFL, 0);
-- flags |= O_NONBLOCK;
-- fcntl(pipefds[1], F_SETFL, &flags);
-+ close(pipefds[1]);
-
- /* And wait for completion of each thread */
- for (i=0; i < num_threads; i++) {
- message(LOG_DAEMON|LOG_DEBUG, "Checking on done for thread %d\n", i);
- while (!tdata[i].done)
-+ pthread_kill(threads[i], SIGINT);
- if(tdata[i].done) {
- message(LOG_DAEMON|LOG_INFO, "Closing thread %d\n", tdata[i].core_id);
- pthread_join(threads[i], NULL);
- jent_entropy_collector_free(tdata[i].ec);
-- } else {
-- read(pipefds[0], tmpbuf, 1024);
-+ } else
- sched_yield();
-- }
- }
-
-- close(pipefds[2]);
-- close(pipefds[1]);
-+ close(pipefds[0]);
- free(tdata);
- free(threads);
- return;
diff --git a/sys-apps/rng-tools/files/test-for-argp.patch b/sys-apps/rng-tools/files/test-for-argp.patch
deleted file mode 100644
index 4ed2aa40b6df..000000000000
--- a/sys-apps/rng-tools/files/test-for-argp.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-On glibc systems, argp is provided by libc. However, on
-uclibc and other systems which lack argp in their C library,
-argp might be provided by a stand alone library, libargp.
-This patch adds tests to the build system to find who provides
-argp.
-
-X-Gentoo-Bug: 292191
-X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=292191
-Reported-by: Ed Wildgoose <gentoo@wildgooses.com>
-Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -47,6 +47,28 @@
- dnl Checks for optional library functions
- dnl -------------------------------------
-
-+dnl First check if we have argp available from libc
-+AC_LINK_IFELSE(
-+ [AC_LANG_PROGRAM(
-+ [#include <argp.h>],
-+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
-+ )],
-+ [libc_has_argp="true"],
-+ [libc_has_argp="false"]
-+)
-+
-+dnl If libc doesn't provide argp, then test for libargp
-+if test "$libc_has_argp" = "false" ; then
-+ AC_MSG_WARN("libc does not have argp")
-+ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
-+
-+ if test "$have_argp" = "false"; then
-+ AC_MSG_ERROR("no libargp found")
-+ else
-+ LIBS+=" -largp"
-+ fi
-+fi
-+
- dnl -----------------
- dnl Configure options
- dnl -----------------