diff --git a/jitterentropy-split-internal-header.patch b/jitterentropy-split-internal-header.patch new file mode 100644 index 0000000..af331ba --- /dev/null +++ b/jitterentropy-split-internal-header.patch @@ -0,0 +1,41 @@ +Index: jitterentropy-library-3.4.0/jitterentropy.h +=================================================================== +--- jitterentropy-library-3.4.0.orig/jitterentropy.h ++++ jitterentropy-library-3.4.0/jitterentropy.h +@@ -42,6 +42,10 @@ + #ifndef _JITTERENTROPY_H + #define _JITTERENTROPY_H + ++#include ++#include ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -98,11 +102,13 @@ extern "C" { + * Jitter RNG State Definition Section + ***************************************************************************/ + ++#ifdef __JITTERENTROPY_INTERNAL + #if defined(_MSC_VER) + #include "arch/jitterentropy-base-windows.h" + #else + #include "jitterentropy-base-user.h" + #endif ++#endif + + #define SHA3_256_SIZE_DIGEST_BITS 256 + #define SHA3_256_SIZE_DIGEST (SHA3_256_SIZE_DIGEST_BITS >> 3) +Index: jitterentropy-library-3.4.0/Makefile +=================================================================== +--- jitterentropy-library-3.4.0.orig/Makefile ++++ jitterentropy-library-3.4.0/Makefile +@@ -9,6 +9,7 @@ LDFLAGS +=-Wl,-z,relro,-z,now -lpthread + + # Enable internal timer support + CFLAGS += -DJENT_CONF_ENABLE_INTERNAL_TIMER ++CFLAGS += -D__JITTERENTROPY_INTERNAL + + GCCVERSIONFORMAT := $(shell echo `$(CC) -dumpversion | sed 's/\./\n/g' | wc -l`) + ifeq "$(GCCVERSIONFORMAT)" "3" diff --git a/jitterentropy-with-debug.patch b/jitterentropy-with-debug.patch new file mode 100644 index 0000000..0c46a0f --- /dev/null +++ b/jitterentropy-with-debug.patch @@ -0,0 +1,24 @@ +Index: jitterentropy-library-3.4.0/Makefile +=================================================================== +--- jitterentropy-library-3.4.0.orig/Makefile ++++ jitterentropy-library-3.4.0/Makefile +@@ -4,8 +4,8 @@ CC ?= gcc + #Hardening + ENABLE_STACK_PROTECTOR ?= 1 + 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 +-LDFLAGS +=-Wl,-z,relro,-z,now -lpthread ++CFLAGS +=-Wextra -Wall -pedantic -fPIC -O0 -fwrapv -Wconversion -g ++LDFLAGS +=-Wl,-z,relro,-z,now -lpthread -g + + # Enable internal timer support + CFLAGS += -DJENT_CONF_ENABLE_INTERNAL_TIMER +@@ -35,7 +35,7 @@ LIBDIR := lib + INCDIR := include + SRCDIR := src + +-INSTALL_STRIP ?= install -s ++INSTALL_STRIP ?= install + + NAME := jitterentropy + LIBMAJOR=$(shell cat $(SRCDIR)/jitterentropy-base.c | grep define | grep MAJVERSION | awk '{print $$3}') diff --git a/jitterentropy.changes b/jitterentropy.changes index 04d2d76..6333bad 100644 --- a/jitterentropy.changes +++ b/jitterentropy.changes @@ -14,6 +14,18 @@ Wed Mar 22 11:17:59 UTC 2023 - Pedro Monreal * github.com/smuellerDD/jitterentropy-library/commit/7bf9f85 * Add jitterentropy-fix-a-stack-corruption-on-s390x.patch +------------------------------------------------------------------- +Thu Jan 26 10:59:09 UTC 2023 - Marcus Meissner + +- jitterentropy-with-debug.patch: build with debuginfo (bsc#1207789) + +------------------------------------------------------------------- +Tue Sep 13 12:34:39 UTC 2022 - Marcus Meissner + +- jitterentropy-split-internal-header.patch: + Hide the non-GNUC constructs that are library internal from the + exported header. (bsc#1202870) + ------------------------------------------------------------------- Mon Sep 12 07:04:35 UTC 2022 - Marcus Meissner diff --git a/jitterentropy.spec b/jitterentropy.spec index 7826f82..5e8a2fa 100644 --- a/jitterentropy.spec +++ b/jitterentropy.spec @@ -1,7 +1,7 @@ # # spec file for package jitterentropy # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %global _lto_cflags %{?_lto_cflags} -ffat-lto-objects Name: jitterentropy @@ -28,6 +29,8 @@ Source0: https://github.com/smuellerDD/jitterentropy-library/archive/refs Source1: baselibs.conf #PATCH-FIX-UPSTREAM github.com/smuellerDD/jitterentropy-library/commit/7bf9f85 Patch0: jitterentropy-fix-a-stack-corruption-on-s390x.patch +Patch1: jitterentropy-split-internal-header.patch +Patch2: jitterentropy-with-debug.patch %description The Jitter RNG provides a noise source using the CPU execution