diff --git a/.gitignore b/.gitignore index 7f8becc..4cf660d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1 @@ -rng-tools-3.tar.gz -/rng-tools-4.tar.gz -/rng-tools-5.tar.gz -/rng-tools-6.tar.gz -/rng-tools-6.1.tar.gz -/rng-tools-6.2.tar.gz -/rng-tools-6.3.tar.gz -/jitterentropy-library-d95c1a2.tar.gz -/rng-tools-6.3.1.tar.gz -/jitterentropy-library-3f7b6cc.tar.gz -/rng-tools-6.7.tar.gz -/rng-tools-6.9.tar.gz -/rng-tools-6.10.tar.gz -/rng-tools-6.11.tar.gz +/rng-tools-6.12.tar.gz diff --git a/jitterentropy-remove-install.patch b/jitterentropy-remove-install.patch deleted file mode 100644 index f0dd90f..0000000 --- a/jitterentropy-remove-install.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up ./jitterentropy-library/Makefile.makefile ./jitterentropy-library/Makefile ---- ./jitterentropy-library/Makefile.makefile 2018-07-09 13:23:31.000000000 -0400 -+++ ./jitterentropy-library/Makefile 2018-07-16 11:36:25.543791453 -0400 -@@ -44,13 +44,10 @@ scan: $(OBJS) - scan-build --use-analyzer=/usr/bin/clang $(CC) -shared -Wl,-soname,lib$(NAME).so.$(LIBMAJOR) -o lib$(NAME).so.$(LIBVERSION) $(OBJS) $(LDFLAGS) - - install: -- install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3 -- install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/ -- gzip -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3 -- install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) -- install -m 0755 -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ -+ -+clean: -+ @- $(RM) $(NAME) - $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) -- ln -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) - - clean: - @- $(RM) $(NAME) diff --git a/pkcs11-path.patch b/pkcs11-path.patch deleted file mode 100644 index fb2feb7..0000000 --- a/pkcs11-path.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/.travis.yml b/.travis.yml -index be3bf06..b6acd39 100644 ---- a/.travis.yml -+++ b/.travis.yml -@@ -1,6 +1,10 @@ - language: c - dist: trusty - -+arch: -+ - amd64 -+ - arm64 -+ - compiler: - - clang - - gcc -diff --git a/Makefile.am b/Makefile.am -index db4fcfc..5917023 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -31,9 +31,10 @@ rngd_LDADD = librngd.a -lsysfs $(LIBS) ${libp11_LIBS} ${libcrypto_LIBS} ${libcur - - if PKCS11 - rngd_SOURCES += rngd_pkcs11.c -+pkcs11_ENGINE = -DDEFAULT_PKCS11_ENGINE=\"$(PKCS11_ENGINE)\" - endif - --rngd_CFLAGS = ${pkcs11_CFLAGS} ${libp11_CFLAGS} ${libcrypto_CFLAGS} ${libxml2_CFLAGS} ${openssl_CFLAGS} $(PTHREAD_CFLAGS) -+rngd_CFLAGS = ${pkcs11_CFLAGS} ${pkcs11_ENGINE} ${libp11_CFLAGS} ${libcrypto_CFLAGS} ${libxml2_CFLAGS} ${openssl_CFLAGS} $(PTHREAD_CFLAGS) - rngd_LDFLAGS = $(PTHREAD_CFLAGS) - - rngtest_SOURCES = exits.h stats.h stats.c rngtest.c -diff --git a/configure.ac b/configure.ac -index f252d03..616d8fa 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -111,6 +111,15 @@ AS_IF( - PKG_CHECK_MODULES([libp11], [libp11], [], [AC_MSG_ERROR([libp11 is required])]) - PKG_CHECK_MODULES([libcrypto], [libcrypto], [], [AC_MSG_ERROR([libcrypto is required])]) - AC_DEFINE([HAVE_PKCS11],1,[Enable PKCS11]) -+ AS_CASE([$host_cpu], -+ [i?86|armv7hl], -+ [ -+ PKCS11_ENGINE=/usr/lib/opensc-pkcs11.so -+ ], -+ [ -+ PKCS11_ENGINE=/usr/lib64/opensc-pkcs11.so -+ ]) -+ AC_SUBST([PKCS11_ENGINE]) - ] - ) - diff --git a/rng-tools.spec b/rng-tools.spec index acb0f58..9e9150f 100644 --- a/rng-tools.spec +++ b/rng-tools.spec @@ -11,7 +11,7 @@ Summary: Random number generator related utilities Name: rng-tools -Version: 6.11 +Version: 6.12 Release: 1%{?dist} License: GPLv2+ URL: https://github.com/nhorman/rng-tools @@ -22,10 +22,9 @@ Source1: rngd.service BuildRequires: gcc make BuildRequires: gettext -BuildRequires: systemd-units -BuildRequires: libgcrypt-devel +BuildRequires: systemd systemd-rpm-macros BuildRequires: autoconf automake -BuildRequires: libsysfs-devel libcurl-devel +BuildRequires: libgcrypt-devel libcurl-devel BuildRequires: libxml2-devel openssl-devel BuildRequires: jitterentropy-devel BuildRequires: jansson-devel @@ -36,9 +35,9 @@ BuildRequires: rtl-sdr-devel BuildRequires: libp11-devel %endif -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd Provides: jitterentropy-rngd %description @@ -85,6 +84,21 @@ install -Dt %{buildroot}%{_unitdir} -m0644 %{SOURCE1} %attr(0644,root,root) %{_unitdir}/rngd.service %changelog +* Fri Mar 12 2021 Vladis Dronov - 6.12-1 +- Update to 6.12 +- Drop libsysfs dependency since it is not used anymore +- Remove jitterentropy-remove-install.patch since we depend on a system jitterentropy library now +- Remove rngd-shutdown.patch since it is the upstream commit 62fbff0a +- Remove rngd-exit-code-for-list.patch since it is the upstream commit fb46dc48 +- Remove pkcs11-path.patch since it is the upstream commit 1993eca9 + +* Tue Mar 02 2021 Vladis Dronov - 6.11-3 +- Replace outdated systemd-units + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 6.11-2 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Fri Jan 29 2021 Dan Horák - 6.11-1 - Update to 6.11 diff --git a/rngd-exit-code-for-list.patch b/rngd-exit-code-for-list.patch deleted file mode 100644 index a79ec91..0000000 --- a/rngd-exit-code-for-list.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up ./rngd.c.orig ./rngd.c ---- ./rngd.c.orig 2017-10-27 14:18:52.617286574 -0400 -+++ ./rngd.c 2017-10-27 14:19:34.189456107 -0400 -@@ -423,12 +423,15 @@ int main(int argc, char **argv) - } - - if (arguments->list) { -+ int rc = 1; - msg_squash = false; - printf("Available entropy sources:\n"); - for (i=0; i < ENT_MAX; i++) -- if (entropy_sources[i].init && entropy_sources[i].disabled == false) -+ if (entropy_sources[i].init && entropy_sources[i].disabled == false) { -+ rc = 0; - printf("%d: %s\n", i, entropy_sources[i].rng_name); -- return 1; -+ } -+ return rc; - } - - if (!ent_sources) { diff --git a/rngd-shutdown.patch b/rngd-shutdown.patch deleted file mode 100644 index 2f8a920..0000000 --- a/rngd-shutdown.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/rngd_jitter.c b/rngd_jitter.c -index 23d96b3..43a13e0 100644 ---- a/rngd_jitter.c -+++ b/rngd_jitter.c -@@ -473,26 +473,22 @@ void close_jitter_entropy_source(struct rng *ent_src) - for (i=0; i < num_threads; i++) - tdata[i].active = 0; - -- flags = fcntl(pipefds[1], F_GETFL, 0); -- flags |= O_NONBLOCK; -- fcntl(pipefds[1], F_SETFL, &flags); -+ close(pipefds[1]); - - /* And wait for completion of each thread */ - for (i=0; i < num_threads; i++) { - message(LOG_DAEMON|LOG_DEBUG, "Checking on done for thread %d\n", i); - while (!tdata[i].done) -+ pthread_kill(threads[i], SIGINT); - if(tdata[i].done) { - message(LOG_DAEMON|LOG_INFO, "Closing thread %d\n", tdata[i].core_id); - pthread_join(threads[i], NULL); - jent_entropy_collector_free(tdata[i].ec); -- } else { -- read(pipefds[0], tmpbuf, 1024); -+ } else - sched_yield(); -- } - } - -- close(pipefds[2]); -- close(pipefds[1]); -+ close(pipefds[0]); - free(tdata); - free(threads); - return; diff --git a/sources b/sources index ea6d78a..84876d4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rng-tools-6.11.tar.gz) = 0058ca5d0c1ddb554284fe8e6b9c0b85f130e0b9e0b9f0f0219f434302766e07c321d4fc0c01bdeb59053d5cd14dab67dc1c306422ef35a62a267af9fbdf7deb +SHA512 (rng-tools-6.12.tar.gz) = 56dd334b65dcec1456f8dbdbee5d83590de27cb6ee1b7715828b5316a913557fd178e264139dc92a82e09635ca15b1eb5f6169bfb4412fbe1b06ea28a5064c64