From 67e84e1a9186b17d951156c5eb140f2b851c8dfb Mon Sep 17 00:00:00 2001 From: Vladis Dronov Date: Tue, 23 Nov 2021 23:10:07 +0100 Subject: [PATCH] Update to the upstream v6.14 @ b2b7934e Resolves: rhbz#2015566 Signed-off-by: Vladis Dronov --- .gitignore | 2 +- 1-rt-revert-build-randstat.patch | 47 +++++++++++++++++++++++++++++++ 2-rt-comment-out-have-aesni.patch | 42 +++++++++++++++++++++++++++ rng-tools.spec | 17 ++++++++--- sources | 2 +- 5 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 1-rt-revert-build-randstat.patch create mode 100644 2-rt-comment-out-have-aesni.patch diff --git a/.gitignore b/.gitignore index 24cf979..444df95 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/rng-tools-6.13.tar.gz +/rng-tools-6.14.tar.gz diff --git a/1-rt-revert-build-randstat.patch b/1-rt-revert-build-randstat.patch new file mode 100644 index 0000000..c784c64 --- /dev/null +++ b/1-rt-revert-build-randstat.patch @@ -0,0 +1,47 @@ +From de2ee0d8b7e8ad2915165ef941a6ec37442a2fdc Mon Sep 17 00:00:00 2001 +From: Vladis Dronov +Date: Tue, 6 Jul 2021 14:36:46 +0200 +Subject: [PATCH] Revert "Build randstat binary" + +We do not want new and mostly useless randstat binary. +This reverts commit 2ce93190cb0111fcab2f622a539689d70960643a. + +Signed-off-by: Vladis Dronov +--- + .gitignore | 3 +-- + contrib/Makefile.am | 5 +++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git .gitignore .gitignore +index 943fa2b..5dc334d 100644 +--- .gitignore ++++ .gitignore +@@ -1,6 +1,6 @@ + *.a + *.o +-.deps/ ++/.deps/ + /aclocal.m4 + /ar-lib + /autom4te.cache/ +@@ -10,7 +10,6 @@ + /config.status + /config.sub + /configure +-/contrib/randstat + /depcomp + /install-sh + /missing +diff --git contrib/Makefile.am contrib/Makefile.am +index a81fb0e..18c4fbc 100644 +--- contrib/Makefile.am ++++ contrib/Makefile.am +@@ -1,2 +1,3 @@ +-bin_PROGRAMS = randstat +-randstat_SOURCES = randstat.c ++ ++EXTRA_DIST = randstat.c ++ +-- +2.26.3 + diff --git a/2-rt-comment-out-have-aesni.patch b/2-rt-comment-out-have-aesni.patch new file mode 100644 index 0000000..8661e6e --- /dev/null +++ b/2-rt-comment-out-have-aesni.patch @@ -0,0 +1,42 @@ +From 86a66ed41390fa5f98aade60a55376269fd163b0 Mon Sep 17 00:00:00 2001 +From: Vladis Dronov +Date: Fri, 17 Sep 2021 01:04:51 +0200 +Subject: [PATCH] Comment out an unused assignment + +Covscan warns about an unused value. Comment it out. + +Defect type: UNUSED_VALUE: covscan warning: +rng-tools-6.13/rngd_rdrand.c:260: assigned_value: Assigning value +from "!!(info.ecx & 0x2000000U)" to "have_aesni" here, but that +stored value is overwritten before it can be used. + +Signed-off-by: Vladis Dronov +--- + rngd_rdrand.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git rngd_rdrand.c rngd_rdrand.c +index caa9d05..ea7b8fa 100644 +--- rngd_rdrand.c ++++ rngd_rdrand.c +@@ -239,7 +239,7 @@ int init_drng_entropy_source(struct rng *ent_src) + struct cpuid info; + /* We need RDRAND, but AESni is optional */ + const uint32_t features_ecx1_rdrand = 1 << 30; +- const uint32_t features_ecx1_aesni = 1 << 25; ++ //const uint32_t features_ecx1_aesni = 1 << 25; + const uint32_t features_ebx7_rdseed = 1 << 18; + uint32_t max_cpuid_leaf; + unsigned char xkey[AES_BLOCK]; /* Material to XOR into the key */ +@@ -257,7 +257,7 @@ int init_drng_entropy_source(struct rng *ent_src) + if (!(info.ecx & features_ecx1_rdrand)) + return 1; + +- have_aesni = !!(info.ecx & features_ecx1_aesni); ++ //have_aesni = !!(info.ecx & features_ecx1_aesni); + have_aesni = 0; /* BACK OUT NH */ + have_rdseed = 0; + if (max_cpuid_leaf >= 7) { +-- +2.26.3 + diff --git a/rng-tools.spec b/rng-tools.spec index fb52dda..a70e639 100644 --- a/rng-tools.spec +++ b/rng-tools.spec @@ -11,8 +11,8 @@ Summary: Random number generator related utilities Name: rng-tools -Version: 6.13 -Release: 6.git.d207e0b6%{?dist} +Version: 6.14 +Release: 1.git.b2b7934e%{?dist} License: GPLv2+ URL: https://github.com/nhorman/rng-tools Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz @@ -20,6 +20,9 @@ Source1: rngd.service Source2: rngd-wake-threshold.service Source3: 60-hwrng.rules +Patch0: 1-rt-revert-build-randstat.patch +Patch1: 2-rt-comment-out-have-aesni.patch + BuildRequires: gcc make BuildRequires: gettext BuildRequires: systemd systemd-rpm-macros @@ -38,12 +41,15 @@ BuildRequires: libp11-devel Requires(post): systemd Requires(preun): systemd Requires(postun): systemd +Requires: libcurl jansson openssl %description -Hardware random number generation tools. +This is a random number generator daemon and its tools. It monitors +a set of entropy sources present on a system (like /dev/hwrng, RDRAND, +TPM, jitter) and supplies entropy from them to a kernel entropy pool. %prep -%autosetup +%autosetup -p0 %build %if !%{with pkcs11} @@ -91,6 +97,9 @@ getent passwd rngd >/dev/null || useradd -r -M -d %{_localstatedir}/lib/rngd -s %attr(0644,root,root) %{_udevrulesdir}/60-hwrng.rules %changelog +* Tue Nov 23 2021 Vladis Dronov - 6.14-1.git.b2b7934e +- Update to the upstream v6.14 @ b2b7934e (bz 2015566) + * Tue Aug 10 2021 Mohan Boddu - 6.13-6.git.d207e0b6 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/sources b/sources index 0c8d9df..1da0577 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rng-tools-6.13.tar.gz) = e92491073e5af67e5d0ede0349944baaa9fca0e1171e3e311df1b08295d71c15791538497e595c0e9a61e02cffe83d31ae10c00a195826c6f677004208dc7911 +SHA512 (rng-tools-6.14.tar.gz) = fce5c43d8a21a0d120a1f50b2b8c1efe7cbef02f7da863539749d51450992bb30c2cec96a4913ca20a608ce137a44e262471ac7f560eb8f3e9228a29b2d38fb1