rng-tools: update to 6.2

Closes #14363.

Signed-off-by: Enno Boland <gottox@voidlinux.eu>
This commit is contained in:
Lon Willett 2018-05-13 15:08:37 +02:00 committed by Enno Boland
parent afccfc0f55
commit e45f60edd3
2 changed files with 4 additions and 40 deletions

View file

@ -1,36 +0,0 @@
From: Leonardo Chiquitto <leonardo@ngdn.org>
Subject: Check for signals in update_kernel_random()
When running as a daemon, a signal handler is installed to catch
SIGINT/SIGTERM. This handler sets a flag that's tested in the main
loop. However, rngd loops in update_kernel_random() as well, where
the flag was not tested.
This patch adds the check to update_kernel_random() so that the
daemon exits properly after receiving a SIGINT/SIGTERM signal.
Index: rngd.c
===================================================================
--- rngd.c
+++ rngd.c
@@ -218,6 +218,8 @@ static int update_kernel_random(int rand
for (p = buf; p + random_step <= &buf[FIPS_RNG_BUFFER_SIZE];
p += random_step) {
+ if (!server_running)
+ return 0;
random_add_entropy(p, random_step);
random_sleep();
}
@@ -239,10 +241,10 @@ static void do_loop(int random_step)
{
int rc;
+ retry_same:
if (!server_running)
return;
- retry_same:
if (iter->disabled)
continue; /* failed, no work */

View file

@ -1,17 +1,17 @@
# Template file for 'rng-tools'
pkgname=rng-tools
version=6.1
revision=3
version=6.2
revision=1
wrksrc=${pkgname}-${version}
build_style=gnu-configure
makedepends="libgcrypt-devel libsysfs-devel libcurl-devel libxml2-devel"
hostmakedepends="automake pkg-config"
short_desc="Random number generator related utilities"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-3"
license="GPL-2.0-or-later"
homepage="https://github.com/nhorman/rng-tools/releases"
distfiles="https://github.com/nhorman/rng-tools/archive/v${version}.tar.gz"
checksum=6144818cd9c93008f72f14e2d23d8f717640d3f45afcea666a32b12bedd4dc03
checksum=5290f1d463f2c6d97507d6dcc69814592afb8a6da5c89425f925cf0d5dc5c477
configure_args="--sbindir=/usr/bin"
case "$XBPS_TARGET_MACHINE" in