--- rng-tools5-5.orig/debian/changelog +++ rng-tools5-5/debian/changelog @@ -0,0 +1,33 @@ +rng-tools5 (5-4) unstable; urgency=low + + * Include init script (Closes: #909788) + * Update standards version to 4.2.1 (no changes) + + -- Michael Stone Fri, 19 Oct 2018 10:41:33 -0400 + +rng-tools5 (5-3) unstable; urgency=low + + * adds check so the daemon exits properly after receiving a + SIGINT/SIGTERM signal. (Closes: #898270) + Thanks Leonardo Chiquitto + From https://github.com/nhorman/rng-tools/pull/14 + + -- Michael Stone Wed, 09 May 2018 11:57:21 -0400 + +rng-tools5 (5-2) unstable; urgency=low + + * Update libcrypt build dependency (Closes: #864131) + * Update standards version to 4.1.1 (no changes) + + -- Michael Stone Tue, 17 Oct 2017 15:26:16 -0400 + +rng-tools5 (5-1) unstable; urgency=low + + * Initial upload of current rng-tools from upstream. This is part of an + intended transition, with this package becoming the default rng-tools + post stretch release. (See #692450) (Closes: #630920) + * Includes support for RDRAND/RDSEED + * Does *not* include specific support for via padlock + + -- Michael Stone Sat, 03 Dec 2016 12:20:57 -0500 + --- rng-tools5-5.orig/debian/compat +++ rng-tools5-5/debian/compat @@ -0,0 +1 @@ +10 --- rng-tools5-5.orig/debian/control +++ rng-tools5-5/debian/control @@ -0,0 +1,31 @@ +Source: rng-tools5 +Section: utils +Priority: optional +Maintainer: Michael Stone +Build-Depends: debhelper (>= 10), debhelper (>= 9.20160709~) | dh-systemd, autoconf, automake, libgcrypt20-dev +Standards-Version: 4.2.1 +Vcs-Browser: https://git.kernel.org/cgit/utils/kernel/rng-tools/rng-tools.git/ +Vcs-git: git://git.kernel.org/pub/scm/utils/kernel/rng-tools/rng-tools.git + +Package: rng-tools5 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Conflicts: rng-tools +Description: Daemon to use a Hardware TRNG + The rngd daemon acts as a bridge between a Hardware TRNG (true random number + generator) such as the ones in some Intel/AMD/VIA chipsets, and the kernel's + PRNG (pseudo-random number generator). + . + It tests the data received from the TRNG using the FIPS 140-2 (2002-10-10) + tests to verify that it is indeed random, and feeds the random data to the + kernel entropy pool. + . + This increases the bandwidth of the /dev/random device, from a source that + does not depend on outside activity. This may improve the behavior of systems + which experience low values in /proc/sys/kernel/random/entropy_avail + It may also improve the quality (entropy) of the randomness of /dev/random. + . + A TRNG kernel module such as hw_random, or some other source of true + entropy that is accessible as a device or fifo, is required to use this + package. It will take advantage of the RDRAND and RDSEED instructions + included in some Intel & AMD CPUs. --- rng-tools5-5.orig/debian/copyright +++ rng-tools5-5/debian/copyright @@ -0,0 +1,82 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: rng-tools +Source: https://git.kernel.org/cgit/utils/kernel/rng-tools/rng-tools.git/ + +Files: * +Copyright: 2001 Philipp Rumpf + Jeff Garzik + 2004 Henrique de Moraes Holschuh + 2011-2014 Intel Corporation + 2009 Red Hat, Inc. +License: GPL-2+ + +Files: configure.ac +Copyright: 2004 Henrique de Moraes Holschuh / 2001 Philipp Rumpf +License: GPL-2+ + +Files: exits.h + rngtest.1.in + rngtest.c + stats.c + stats.h +Copyright: 2004 Henrique de Moraes Holschuh +License: GPL-2+ + +Files: fips.c + fips.h + rngd.c + rngd.h + rngd_entsource.c + rngd_entsource.h + rngd_linux.c + rngd_linux.h +Copyright: 2001 Philipp Rumpf +License: GPL-2+ + +Files: rdrand_asm.S + rngd_rdrand.c +Copyright: 2011-2014 Intel Corporation +License: GPL-2+ + +Files: rngd.8.in +Copyright: 2001 Jeff Garzik -- jgarzik@pobox.com +License: GPL-2+ + +Files: util.c +Copyright: 2009 Red Hat, Inc. +License: GPL + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + On Debian systems, the complete text of the GNU General + Public License can be found in "/usr/share/common-licenses/GPL". + +Files: COPYING +Copyright: 1989, 1991 Free Software Foundation, Inc. +License: GPL-itself + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". --- rng-tools5-5.orig/debian/gbp.conf +++ rng-tools5-5/debian/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +upstream-tag = v%(version)s --- rng-tools5-5.orig/debian/logcheck.ignore +++ rng-tools5-5/debian/logcheck.ignore @@ -0,0 +1,5 @@ +rngd\[[0-9]+\]: +stats: +rngd\[[0-9]+\]: .* starting up\.\.\. +rngd\[[0-9]+\]: +Exiting\.\.\. +rngd\[[0-9]+\]: +entropy feed to the kernel ready +rngd\[[0-9]+\]: +Activating Linux kernel 2.4 entropy accounting bug workaround --- rng-tools5-5.orig/debian/rng-tools.manpages +++ rng-tools5-5/debian/rng-tools.manpages @@ -0,0 +1,2 @@ +rngd.8 +rngtest.1 --- rng-tools5-5.orig/debian/rngd.init +++ rng-tools5-5/debian/rngd.init @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then + set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script +fi + +### BEGIN INIT INFO +# Provides: rngd +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: entropy gathering daemon (rngd) +# Description: increase entropy available to /dev/random +### END INIT INFO + +# Author: Michael Stone + +DESC="entropy gathering daemon (rngd)" +DAEMON=/usr/sbin/rngd --- rng-tools5-5.orig/debian/rngd.service +++ rng-tools5-5/debian/rngd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Start entropy gathering daemon (rngd) +Documentation=man:rngd(8) + +[Service] +ExecStart=/usr/sbin/rngd -f + +[Install] +WantedBy=multi-user.target --- rng-tools5-5.orig/debian/rules +++ rng-tools5-5/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +PACKAGE = rng-tools5 + +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk + +%: + dh ${@} --with=systemd + +override_dh_systemd_enable: + dh_systemd_enable --name=rngd + +override_dh_installinit: + dh_installinit --name=rngd --- rng-tools5-5.orig/rngd.c +++ rng-tools5-5/rngd.c @@ -218,6 +218,8 @@ 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 @@ { int rc; + retry_same: if (!server_running) return; - retry_same: if (iter->disabled) continue; /* failed, no work */