update version to 6.14
This commit is contained in:
parent
0026a3102d
commit
ec116bfa95
@ -1,34 +0,0 @@
|
|||||||
From d2b4876231ac9c2e26880ebe428bfb41e60e098e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Horman <nhorman@tuxdriver.com>
|
|
||||||
Date: Wed, 19 Dec 2018 10:10:44 -0500
|
|
||||||
Subject: [PATCH] Default to one thread if getaffinity returns an error
|
|
||||||
|
|
||||||
Its possible on virt systems, for sched_getaffinity to return an error
|
|
||||||
if the vm has cpus, but cgroup placement restricts that set to 0
|
|
||||||
physical processors. In that event, just default to 1 thread on cpu 0
|
|
||||||
|
|
||||||
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
|
|
||||||
---
|
|
||||||
rngd_jitter.c | 6 +++++-
|
|
||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/rngd_jitter.c b/rngd_jitter.c
|
|
||||||
index 4e4b348..d14a3ba 100644
|
|
||||||
--- a/rngd_jitter.c
|
|
||||||
+++ b/rngd_jitter.c
|
|
||||||
@@ -421,7 +421,11 @@ int init_jitter_entropy_source(struct rng *ent_src)
|
|
||||||
cpus = CPU_ALLOC(i);
|
|
||||||
cpusize = CPU_ALLOC_SIZE(i);
|
|
||||||
CPU_ZERO_S(cpusize, cpus);
|
|
||||||
- sched_getaffinity(0, cpusize, cpus);
|
|
||||||
+ if (sched_getaffinity(0, cpusize, cpus) < 0) {
|
|
||||||
+ message(LOG_DAEMON|LOG_DEBUG, "Can not determine affinity of process, defaulting to 1 thread\n");
|
|
||||||
+ CPU_SET(0,cpus);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
num_threads = CPU_COUNT_S(cpusize, cpus);
|
|
||||||
|
|
||||||
if (num_threads >= ent_src->rng_options[JITTER_OPT_THREADS].int_val)
|
|
||||||
--
|
|
||||||
2.17.2
|
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From 5244d384e706a546fd1a72cc004a9d6551f0d84b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lon Willett <xgit@lonw.net>
|
|
||||||
Date: Sun, 30 Sep 2018 21:25:07 +0200
|
|
||||||
Subject: [PATCH 005/113] Obey restrictions on x86_rdrand_bytes usage
|
|
||||||
|
|
||||||
---
|
|
||||||
rngd_rdrand.c | 9 ++++++++-
|
|
||||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/rngd_rdrand.c b/rngd_rdrand.c
|
|
||||||
index ffb9e74..4529587 100644
|
|
||||||
--- a/rngd_rdrand.c
|
|
||||||
+++ b/rngd_rdrand.c
|
|
||||||
@@ -246,7 +246,14 @@ int xread_drng(void *buf, size_t size, struct rng *ent_src)
|
|
||||||
if (ent_src->rng_options[DRNG_OPT_AES].int_val)
|
|
||||||
return xread_drng_with_aes(buf, size, ent_src);
|
|
||||||
|
|
||||||
- x86_rdrand_bytes(buf, size);
|
|
||||||
+ /* NB: x86_rdrand_bytes might overrun end of buffer, if not a multiple of 8 */
|
|
||||||
+ if (size > 7)
|
|
||||||
+ x86_rdrand_bytes(buf, (size&~7));
|
|
||||||
+ if ((size&7) != 0) {
|
|
||||||
+ unsigned char tempbuf[8];
|
|
||||||
+ x86_rdrand_bytes(tempbuf, (size&7));
|
|
||||||
+ memcpy((unsigned char *)buf+(size&~7), tempbuf, (size&7));
|
|
||||||
+ }
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
Binary file not shown.
@ -1,22 +0,0 @@
|
|||||||
diff --git a/jitterentropy-library/Makefile b/jitterentropy-library/Makefile
|
|
||||||
index 4ff069b..503be5c 100644
|
|
||||||
--- a/jitterentropy-library/Makefile
|
|
||||||
+++ b/jitterentropy-library/Makefile
|
|
||||||
@@ -56,17 +56,6 @@ cppcheck:
|
|
||||||
cppcheck --force -q --enable=performance --enable=warning --enable=portability *.h *.c
|
|
||||||
|
|
||||||
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)/
|
|
||||||
- install -d -m 0755 $(DESTDIR)$(PREFIX)/$(INCDIR)
|
|
||||||
- install -m 0644 jitterentropy.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
|
||||||
- install -m 0644 jitterentropy-base-user.h $(DESTDIR)$(PREFIX)/$(INCDIR)/
|
|
||||||
- $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
|
||||||
- ln -s lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR)
|
|
||||||
- ln -s lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@- $(RM) $(NAME)
|
|
||||||
@ -1,21 +1,17 @@
|
|||||||
Name: rng-tools
|
Name: rng-tools
|
||||||
Version: 6.5
|
Version: 6.14
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: Random number generator daemon
|
Summary: Random number generator daemon
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/nhorman/rng-tools
|
URL: https://github.com/nhorman/rng-tools
|
||||||
Source0: https://github.com/nhorman/rng-tools/archive/v%{version}.tar.gz
|
Source0: https://github.com/nhorman/rng-tools/archive/v%{version}.tar.gz
|
||||||
Source1: rngd.service
|
Source1: rngd.service
|
||||||
Source2: jitterentropy-library-2.2.0.tar.gz
|
|
||||||
|
|
||||||
Patch0: jitterentropy-remove-install.patch
|
|
||||||
Patch1: backport-Default-to-one-thread-if-getaffinity-returns-an-erro.patch
|
|
||||||
Patch2: backport-Obey-restrictions-on-x86_rdrand_bytes-usage.patch
|
|
||||||
|
|
||||||
#Dependency
|
#Dependency
|
||||||
BuildRequires: gcc make gettext systemd autoconf automake
|
BuildRequires: gcc make gettext systemd autoconf automake
|
||||||
BuildRequires: libgcrypt-devel libsysfs-devel libcurl-devel libxml2-devel openssl-devel
|
BuildRequires: libgcrypt-devel libcurl-devel libxml2-devel openssl-devel
|
||||||
Requires: libgcrypt libsysfs openssl libxml2 libcurl
|
BuildRequires: libp11-devel jitterentropy-library-devel jansson-devel
|
||||||
|
Requires: libgcrypt libsysfs openssl libxml2 libcurl jitterentropy-library openssl-pkcs11
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -25,11 +21,11 @@ and supplies entropy from them to the system kernel's /dev/random machinery.
|
|||||||
%package_help
|
%package_help
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -a 2 -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
%configure
|
%configure --without-rtlsdr
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -53,6 +49,7 @@ install -D -t $RPM_BUILD_ROOT%{_unitdir} -m 0644 %{SOURCE1}
|
|||||||
%license COPYING
|
%license COPYING
|
||||||
%doc AUTHORS NEWS README
|
%doc AUTHORS NEWS README
|
||||||
%{_bindir}/rngtest
|
%{_bindir}/rngtest
|
||||||
|
%{_bindir}/randstat
|
||||||
%{_sbindir}/rngd
|
%{_sbindir}/rngd
|
||||||
%attr(0644,root,root) %{_unitdir}/rngd.service
|
%attr(0644,root,root) %{_unitdir}/rngd.service
|
||||||
|
|
||||||
@ -61,6 +58,9 @@ install -D -t $RPM_BUILD_ROOT%{_unitdir} -m 0644 %{SOURCE1}
|
|||||||
%{_mandir}/man8/rngd.8.*
|
%{_mandir}/man8/rngd.8.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 29 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 6.14-1
|
||||||
|
- update version to 6.14
|
||||||
|
|
||||||
* Sat Dec 19 2020 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 6.5-3
|
* Sat Dec 19 2020 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 6.5-3
|
||||||
- fix rngd.service coredump
|
- fix rngd.service coredump
|
||||||
|
|
||||||
|
|||||||
BIN
v6.14.tar.gz
Normal file
BIN
v6.14.tar.gz
Normal file
Binary file not shown.
BIN
v6.5.tar.gz
BIN
v6.5.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user