Update rng-tools to latest upstream
This commit is contained in:
parent
a69f1cadaf
commit
e46e2a500f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
rng-tools-3.tar.gz
|
||||
/rng-tools-4.tar.gz
|
||||
/rng-tools-5.tar.gz
|
||||
/rng-tools-6.tar.gz
|
||||
|
||||
@ -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 <nhorman@redhat.com> - 6-1
|
||||
- Update to latest upstream
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
||||
18
rngd-extern-darn-init.patch
Normal file
18
rngd-extern-darn-init.patch
Normal file
@ -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 */
|
||||
18
rngd-formatting.patch
Normal file
18
rngd-formatting.patch
Normal file
@ -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;
|
||||
Loading…
Reference in New Issue
Block a user