From a737f77e4bc046070ba33a6e1bc303987c81118d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 17 2022 10:29:24 +0000 Subject: import jitterentropy-3.3.1-2.el9 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3327bd1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/jitterentropy-library-3.3.1.tar.gz diff --git a/.jitterentropy.metadata b/.jitterentropy.metadata new file mode 100644 index 0000000..fefba16 --- /dev/null +++ b/.jitterentropy.metadata @@ -0,0 +1 @@ +b48e54d56961e3db138dac4fd6ab3117e31f5db9 SOURCES/jitterentropy-library-3.3.1.tar.gz diff --git a/SOURCES/jitterentropy-fix-ec-check.patch b/SOURCES/jitterentropy-fix-ec-check.patch new file mode 100644 index 0000000..3b2757d --- /dev/null +++ b/SOURCES/jitterentropy-fix-ec-check.patch @@ -0,0 +1,20 @@ +diff -up src/jitterentropy-noise.c.orig src/jitterentropy-noise.c +--- src/jitterentropy-noise.c 2021-11-23 15:42:47.809329173 +0100 ++++ src/jitterentropy-noise.c 2021-11-23 15:44:19.820499338 +0100 +@@ -188,7 +188,7 @@ static void jent_memaccess(struct rand_data *ec, uint64_t loop_cnt) + uint32_t u[4]; + uint8_t b[sizeof(uint32_t) * 4]; + } prngState = { .u = {0x8e93eec0, 0xce65608a, 0xa8d46b46, 0xe83cef69} }; +- uint32_t addressMask = ec->memmask; ++ uint32_t addressMask; + + /* Ensure that macros cannot overflow jent_loop_shuffle() */ + BUILD_BUG_ON((MAX_ACC_LOOP_BIT + MIN_ACC_LOOP_BIT) > 63); +@@ -197,6 +197,7 @@ static void jent_memaccess(struct rand_data *ec, uint64_t loop_cnt) + + if (NULL == ec || NULL == ec->mem) + return; ++ addressMask = ec->memmask; + + /* + * Mix the current data into prngState diff --git a/SOURCES/jitterentropy-rh-makefile.patch b/SOURCES/jitterentropy-rh-makefile.patch new file mode 100644 index 0000000..66482a2 --- /dev/null +++ b/SOURCES/jitterentropy-rh-makefile.patch @@ -0,0 +1,56 @@ +diff -up Makefile.orig Makefile +--- Makefile 2021-07-13 17:23:42.954652287 +0200 ++++ Makefile 2021-07-13 17:27:27.958549833 +0200 +@@ -3,7 +3,7 @@ + CC ?= gcc + #Hardening + CFLAGS ?= -fwrapv --param ssp-buffer-size=4 -fvisibility=hidden -fPIE -Wcast-align -Wmissing-field-initializers -Wshadow -Wswitch-enum +-CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0 -fwrapv -Wconversion ++CFLAGS +=-Wp,-U_FORTIFY_SOURCE -Wextra -Wall -pedantic -fPIC -O0 -fwrapv -Wconversion + LDFLAGS +=-Wl,-z,relro,-z,now -lpthread + + GCCVERSIONFORMAT := $(shell echo `$(CC) -dumpversion | sed 's/\./\n/g' | wc -l`) +@@ -28,7 +28,7 @@ LIBDIR := lib + INCDIR := include + SRCDIR := src + +-INSTALL_STRIP ?= install -s ++INSTALL ?= install + + NAME := jitterentropy + LIBMAJOR=$(shell cat $(SRCDIR)/jitterentropy-base.c | grep define | grep MAJVERSION | awk '{print $$3}') +@@ -73,25 +73,25 @@ cppcheck: + install: install-man install-shared install-includes + + install-man: +- install -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3 +- install -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/ ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man3 ++ $(INSTALL) -m 644 doc/$(NAME).3 $(DESTDIR)$(PREFIX)/share/man/man3/ + gzip -n -f -9 $(DESTDIR)$(PREFIX)/share/man/man3/$(NAME).3 + + install-shared: +- install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) +- $(INSTALL_STRIP) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) ++ $(INSTALL) -m 0755 lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/ + $(RM) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) + ln -sf lib$(NAME).so.$(LIBVERSION) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so.$(LIBMAJOR) + ln -sf lib$(NAME).so.$(LIBMAJOR) $(DESTDIR)$(PREFIX)/$(LIBDIR)/lib$(NAME).so + + install-includes: +- 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)/ ++ $(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)/ + + install-static: +- install -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) +- install -m 0755 lib$(NAME).a $(DESTDIR)$(PREFIX)/$(LIBDIR)/ ++ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/$(LIBDIR) ++ $(INSTALL) -m 0755 lib$(NAME).a $(DESTDIR)$(PREFIX)/$(LIBDIR)/ + + clean: + @- $(RM) $(NAME) diff --git a/SPECS/jitterentropy.spec b/SPECS/jitterentropy.spec new file mode 100644 index 0000000..a3f43ec --- /dev/null +++ b/SPECS/jitterentropy.spec @@ -0,0 +1,110 @@ +Name: jitterentropy +Version: 3.3.1 +Release: 2%{?dist} +Summary: Library implementing the jitter entropy source + +License: BSD or GPLv2 +URL: https://github.com/smuellerDD/jitterentropy-library +Source0: %{url}/archive/v%{version}/%{name}-library-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: make + +# Disable Upstream Makefiles debuginfo strip on install +Patch0: jitterentropy-rh-makefile.patch +# Fix ec check for NULL +Patch1: jitterentropy-fix-ec-check.patch + +%description +Library implementing the CPU jitter entropy source + +%package devel +Summary: Development headers for jitterentropy library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development headers and libraries for jitterentropy + +%prep +%autosetup -p0 -n %{name}-library-%{version} + +%build +%set_build_flags +%make_build + +%install +mkdir -p %{buildroot}/usr/include/ +%make_install PREFIX=/usr LIBDIR=%{_lib} + +%files +%doc README.md CHANGES.md +%license LICENSE LICENSE.bsd LICENSE.gplv2 +%{_libdir}/libjitterentropy.so.3* + +%files devel +%{_includedir}/* +%{_libdir}/libjitterentropy.so +%{_mandir}/man3/* + +%changelog +* Tue Nov 23 2021 Vladis Dronov - 3.3.1-2 +- Update to the upstream v3.3.1 @ 887c9871 (bz 2015560) +- Fix a security issue found by a covscan in jitterentropy library + +* Mon Aug 09 2021 Mohan Boddu - 3.0.2-3.git.409828cf +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Tue Jul 13 2021 Vladis Dronov - 3.0.2-2.git.409828cf +- Update to the latest upstream commits upto 409828cf (bz 1973157) +- Add clock_gettime() software time source +- Add a code for choosing between software and hardware time sources + https://github.com/smuellerDD/jitterentropy-library/pull/57 + https://bugzilla.redhat.com/show_bug.cgi?id=1974132 + +* Tue Jul 06 2021 Vladis Dronov - 3.0.2.git.d18d5863-1 +- Update to the upstream v3.0.2 + tip of origin/master + with fixes for an important issue: + https://github.com/nhorman/rng-tools/pull/123 + https://github.com/smuellerDD/jitterentropy-library/issues/37 +- Add important upstream fixes for the one CPU case (bz 1974132) + +* Fri Jun 18 2021 Vladis Dronov - 3.0.2-1 +- Update to the upstream v3.0.2 (bz 1973157) +- Remove ldconfig_scriptlets + +* Fri Apr 16 2021 Mohan Boddu - 2.2.0-5 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 2.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 2.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Sep 26 2019 Neil Horman - 2.2.0-1 +- Update to latest upstream + +* Thu Jul 25 2019 Fedora Release Engineering - 2.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 2.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Sep 21 2018 Neil Horman - 2.1.2-3 +- Drop static library +- Fix up naming +- Add gcc buildrequires +- Fix files glob + +* Thu Sep 13 2018 Neil Horman - 2.1.2-2 +- Fixed license +- Fixed up some macro usage in spec file +- Documented patches +- Modified makefile to use $(INSTALL) macro + +* Thu Sep 06 2018 Neil Horman - 2.1.2-1 +- Initial import