Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/rng-tools.git#b9ce661dca93c5fc99527296647d31edde05f6a2
This commit is contained in:
DistroBaker 2021-03-16 19:30:20 +00:00
parent 1a012117f0
commit 924ae8eef5
7 changed files with 23 additions and 149 deletions

15
.gitignore vendored
View File

@ -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

View File

@ -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)

View File

@ -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])
]
)

View File

@ -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 <vdronov@redhat.com> - 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 <vdronov@redhat.com> - 6.11-3
- Replace outdated systemd-units
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 6.11-2
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Fri Jan 29 2021 Dan Horák <dan[at]danny.cz> - 6.11-1
- Update to 6.11

View File

@ -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) {

View File

@ -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;

View File

@ -1 +1 @@
SHA512 (rng-tools-6.11.tar.gz) = 0058ca5d0c1ddb554284fe8e6b9c0b85f130e0b9e0b9f0f0219f434302766e07c321d4fc0c01bdeb59053d5cd14dab67dc1c306422ef35a62a267af9fbdf7deb
SHA512 (rng-tools-6.12.tar.gz) = 56dd334b65dcec1456f8dbdbee5d83590de27cb6ee1b7715828b5316a913557fd178e264139dc92a82e09635ca15b1eb5f6169bfb4412fbe1b06ea28a5064c64