diff --git a/1-rt-comment-out-have-aesni.patch b/1-rt-comment-out-have-aesni.patch new file mode 100644 index 0000000..8661e6e --- /dev/null +++ b/1-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/1-rt-revert-build-randstat.patch b/1-rt-revert-build-randstat.patch deleted file mode 100644 index c784c64..0000000 --- a/1-rt-revert-build-randstat.patch +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index 8661e6e..0000000 --- a/2-rt-comment-out-have-aesni.patch +++ /dev/null @@ -1,42 +0,0 @@ -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/2-rt-revert-build-randstat.patch b/2-rt-revert-build-randstat.patch new file mode 100644 index 0000000..c784c64 --- /dev/null +++ b/2-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/3-rt-fix-jent-define.patch b/3-rt-fix-jent-define.patch deleted file mode 100644 index e208c1a..0000000 --- a/3-rt-fix-jent-define.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- configure.ac 2022-03-24 13:14:11.000000000 +0100 -+++ configure.ac.new 2022-03-24 15:58:56.187367770 +0100 -@@ -95,7 +95,10 @@ AS_IF( - [AM_CONDITIONAL([JITTER], [true]) - AC_DEFINE([HAVE_JITTER],1,[Enable JITTER]) - AC_CHECK_LIB(jitterentropy, jent_notime_settick, -- [AC_DEFINE([HAVE_JITTER_NOTIME],1,[Enable JITTER_NOTIME])], -+ [ -+ AC_DEFINE([HAVE_JITTER_NOTIME],1,[Enable JITTER_NOTIME]) -+ AC_DEFINE([JENT_CONF_ENABLE_INTERNAL_TIMER],1,[Enable JENT_CONF_ENABLE_INTERNAL_TIMER]) -+ ], - [],-lpthread)], - AC_MSG_NOTICE([No Jitterentropy library found]),-lpthread) - ], [AC_MSG_NOTICE([Disabling JITTER entropy source])] diff --git a/rng-tools.spec b/rng-tools.spec index 2209c99..717b6e6 100644 --- a/rng-tools.spec +++ b/rng-tools.spec @@ -12,7 +12,7 @@ Summary: Random number generator related utilities Name: rng-tools Version: 6.15 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://github.com/nhorman/rng-tools Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz @@ -22,7 +22,7 @@ Source2: rngd.sysconfig BuildRequires: gcc make binutils BuildRequires: gettext BuildRequires: systemd systemd-rpm-macros -BuildRequires: autoconf automake +BuildRequires: autoconf >= 2.57, automake >= 1.7 BuildRequires: libgcrypt-devel libcurl-devel BuildRequires: libxml2-devel openssl-devel BuildRequires: jitterentropy-devel @@ -38,11 +38,13 @@ BuildRequires: libp11-devel Requires(post): systemd Requires(preun): systemd Requires(postun): systemd -Requires: selinux-policy >= 36.5 -Patch0: 1-rt-revert-build-randstat.patch -Patch1: 2-rt-comment-out-have-aesni.patch -Patch2: 3-rt-fix-jent-define.patch +# This ensures that the selinux-policy package and all its dependencies +# are not pulled into containers and other systems that do not use SELinux. +Requires: (selinux-policy >= 36.5 if selinux-policy) + +Patch0: 1-rt-comment-out-have-aesni.patch +Patch1: 2-rt-revert-build-randstat.patch %description This is a random number generator daemon and its tools. It monitors @@ -86,7 +88,7 @@ install -D %{SOURCE2} -m0644 %{buildroot}%{_sysconfdir}/sysconfig/rngd %files %{!?_licensedir:%global license %%doc} %license COPYING -%doc AUTHORS README +%doc AUTHORS README.md %{_bindir}/rngtest %{_sbindir}/rngd %{_mandir}/man1/rngtest.1.* @@ -95,6 +97,10 @@ install -D %{SOURCE2} -m0644 %{buildroot}%{_sysconfdir}/sysconfig/rngd %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rngd %changelog +* Wed Sep 21 2022 Vladis Dronov - 6.15-4 +- Update to the upstream v6.15 + tip of origin/master @ 6dcc9ec2 +- Do not require selinux-policy if it is not present + * Sat Jul 23 2022 Fedora Release Engineering - 6.15-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 1815b2a..6e06a10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rng-tools-6.15.tar.gz) = 8c3bfb7ae83ef8fbf8e7f028a40e5405f96a2135617347c3cc52f62119f951972b07ea5f1a5f094ebf6c3db35f49d6384a96720cda874115c19934f440592641 +SHA512 (rng-tools-6.15.tar.gz) = c64a15861b152edb242ff694cc2f2363e7aff0892aaecb9bbc5a7fe8c60b97fc0b320e466432f220ade0988ae4ef4acc863b509668a4bd70002a7b4c2847f8ab