From e46e2a500f787117b438528d0662a75d89fd244c Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Mon, 31 Jul 2017 11:02:38 -0400 Subject: [PATCH] Update rng-tools to latest upstream --- .gitignore | 1 + rng-tools.spec | 24 ++++++++++++++++-------- rngd-extern-darn-init.patch | 18 ++++++++++++++++++ rngd-formatting.patch | 18 ++++++++++++++++++ sources | 2 +- 5 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 rngd-extern-darn-init.patch create mode 100644 rngd-formatting.patch diff --git a/.gitignore b/.gitignore index 1b08af3..9710159 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ rng-tools-3.tar.gz /rng-tools-4.tar.gz /rng-tools-5.tar.gz +/rng-tools-6.tar.gz diff --git a/rng-tools.spec b/rng-tools.spec index 7f2e5d1..81fde17 100644 --- a/rng-tools.spec +++ b/rng-tools.spec @@ -3,30 +3,35 @@ Summary: Random number generator related utilities Name: rng-tools -Version: 5 -Release: 9%{?dist} +Version: 6 +Release: 1%{?dist} Group: System Environment/Base License: GPLv2+ -URL: http://sourceforge.net/projects/gkernel/ -Source0: http://downloads.sourceforge.net/project/gkernel/rng-tools/4/rng-tools-%{version}.tar.gz +URL: https://github.com/nhorman/rng-tools +Source0: https://github.com/nhorman/rng-tools/archive/rng-tools-%{version}.tar.gz Source1: rngd.service +Patch0: rngd-extern-darn-init.patch +Patch1: rngd-formatting.patch + # https://sourceforge.net/p/gkernel/patches/111/ -Patch0: rngd-exit-code.patch -Patch1: 0001-If-device-is-not-found-exit-immediately.patch BuildRequires: gettext BuildRequires: systemd-units +BuildRequires: libgcrypt-devel +BuildRequires: autoconf automake libsysfs-devel Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +Requires: libgcrypt libsysfs %description Hardware random number generation tools. -%prep -%autosetup +%prep +%autosetup -n rng-tools-rng-tools-6 %build +./autogen.sh %configure %make_build @@ -56,6 +61,9 @@ install -Dt %{buildroot}%{_unitdir} -m0644 %{SOURCE1} %attr(0644,root,root) %{_unitdir}/rngd.service %changelog +* Fri Jul 28 2017 Neil Horman - 6-1 +- Update to latest upstream + * Sat Feb 11 2017 Fedora Release Engineering - 5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/rngd-extern-darn-init.patch b/rngd-extern-darn-init.patch new file mode 100644 index 0000000..663a353 --- /dev/null +++ b/rngd-extern-darn-init.patch @@ -0,0 +1,18 @@ +diff --git a/rngd_entsource.h b/rngd_entsource.h +index 3ba6820..f2407c1 100644 +--- a/rngd_entsource.h ++++ b/rngd_entsource.h +@@ -36,7 +36,13 @@ extern fips_ctx_t tpm_fipsctx; /* Context for the tpm FIPS tests */ + * sourcedev is the path to the entropy source + */ + extern int init_entropy_source(struct rng *); ++#ifdef HAVE_RDRAND + extern int init_drng_entropy_source(struct rng *); ++#endif ++#ifdef HAVE_DARN ++extern int init_darn_entropy_source(struct rng *); ++#endif ++ + extern int init_tpm_entropy_source(struct rng *); + + /* Read data from the entropy source */ diff --git a/rngd-formatting.patch b/rngd-formatting.patch new file mode 100644 index 0000000..e77aaed --- /dev/null +++ b/rngd-formatting.patch @@ -0,0 +1,18 @@ +diff --git a/rngd.c b/rngd.c +index 9873c46..418feeb 100644 +--- a/rngd.c ++++ b/rngd.c +@@ -191,11 +191,11 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) + case 'x': + idx = strtol(arg, NULL, 10); + if ((idx == LONG_MAX) || (idx > ENT_MAX)) { +- printf("exclude index is out of range: %d\n", idx); ++ printf("exclude index is out of range: %lu\n", idx); + return -ERANGE; + } + entropy_sources[idx].disabled = true; +- printf("Disabling %d: %s\n", idx, entropy_sources[idx].rng_name); ++ printf("Disabling %lu: %s\n", idx, entropy_sources[idx].rng_name); + break; + case 'l': + arguments->list = true; diff --git a/sources b/sources index 5333ecf..0e23942 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6726cdc6fae1f5122463f24ae980dd68 rng-tools-5.tar.gz +SHA512 (rng-tools-6.tar.gz) = 2aea947c4dba5e8c4df33396957f7224b62200be0e3d10aac08c84155fa473a67df5f49e07a07b2cbea4dfd772d90c1b194e8fce3d8eea762463a7f4a16d6ce4