From 336543bd278f57acbb23dc4430d12c861bd495682148434bc531d885670ce757 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 12 Feb 2024 16:19:05 +0000 Subject: [PATCH] - jitterentropy-split-internal-header.patch: Hide the non-GNUC constructs that are library internal from the exported header. (bsc#1202870) OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jitterentropy?expand=0&rev=16 --- jitterentropy-split-internal-header.patch | 41 +++++++++++++++++++++++ jitterentropy.changes | 7 ++++ jitterentropy.spec | 4 ++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 jitterentropy-split-internal-header.patch 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.changes b/jitterentropy.changes index 04d2d76..34d9f52 100644 --- a/jitterentropy.changes +++ b/jitterentropy.changes @@ -14,6 +14,13 @@ 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 +------------------------------------------------------------------- +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..d17b77d 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,7 @@ 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 %description The Jitter RNG provides a noise source using the CPU execution