From fb3d3cb514ec549c3068abbe07aaf56fc59bf5099718fe03d9c7fe97cc965730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 2 Jul 2018 10:45:19 +0000 Subject: [PATCH] Accepting request 620215 from home:Andreas_Schwab:Factory - libgcrypt-1.6.3-aliasing.patch, libgcrypt-ppc64.patch, libgcrypt-strict-aliasing.patch: Remove obsolete patches - libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch: Rediff - Reenable testsuite OBS-URL: https://build.opensuse.org/request/show/620215 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=115 --- ...pt-1.4.1-rijndael_no_strict_aliasing.patch | 12 +- libgcrypt-1.6.3-aliasing.patch | 178 ------------------ libgcrypt-ppc64.patch | 28 --- libgcrypt-strict-aliasing.patch | 15 -- libgcrypt.changes | 8 + libgcrypt.spec | 15 +- 6 files changed, 15 insertions(+), 241 deletions(-) delete mode 100644 libgcrypt-1.6.3-aliasing.patch delete mode 100644 libgcrypt-ppc64.patch delete mode 100644 libgcrypt-strict-aliasing.patch diff --git a/libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch b/libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch index 07ec834..0594a42 100644 --- a/libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch +++ b/libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch @@ -1,11 +1,11 @@ -Index: libgcrypt-1.4.1/cipher/Makefile.am +Index: libgcrypt-1.8.3/cipher/Makefile.am =================================================================== ---- libgcrypt-1.4.1.orig/cipher/Makefile.am 2008-11-11 17:13:59.000000000 +0100 -+++ libgcrypt-1.4.1/cipher/Makefile.am 2008-11-11 17:18:58.000000000 +0100 -@@ -92,3 +92,11 @@ ac.o: $(srcdir)/ac.c +--- libgcrypt-1.8.3.orig/cipher/Makefile.am ++++ libgcrypt-1.8.3/cipher/Makefile.am +@@ -128,3 +128,11 @@ tiger.o: $(srcdir)/tiger.c - ac.lo: $(srcdir)/ac.c - `echo $(LTCOMPILE) -fno-strict-aliasing -c $(srcdir)/ac.c` + tiger.lo: $(srcdir)/tiger.c + `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` + +# rijndael.c needs -fno-strict-aliasing +rijndael.o: $(srcdir)/rijndael.c diff --git a/libgcrypt-1.6.3-aliasing.patch b/libgcrypt-1.6.3-aliasing.patch deleted file mode 100644 index 08d784d..0000000 --- a/libgcrypt-1.6.3-aliasing.patch +++ /dev/null @@ -1,178 +0,0 @@ -Index: libgcrypt-1.8.0/cipher/bufhelp.h -=================================================================== ---- libgcrypt-1.8.0.orig/cipher/bufhelp.h -+++ libgcrypt-1.8.0/cipher/bufhelp.h -@@ -109,7 +109,7 @@ do_bytes: - for (; len; len--) - *dst++ = *src++; - #endif /*__GNUC__ >= 4 && (__x86_64__ || __i386__)*/ --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - /* Optimized function for buffer xoring */ -@@ -146,7 +146,7 @@ do_bytes: - /* Handle tail. */ - for (; len; len--) - *dst++ = *src1++ ^ *src2++; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - /* Optimized function for in-place buffer xoring. */ -@@ -218,7 +218,7 @@ do_bytes: - /* Handle tail. */ - for (; len; len--) - *dst1++ = (*dst2++ ^= *src++); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - /* Optimized function for combined buffer xoring and copying. Used by mainly -@@ -271,7 +271,7 @@ do_bytes: - *dst_xor++ = *srcdst_cpy ^ *src_xor++; - *srcdst_cpy++ = temp; - } --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - /* Optimized function for combined buffer xoring and copying. Used by mainly -@@ -297,7 +297,7 @@ buf_eq_const(const void *_a, const void - diff -= !!(a[i] - b[i]); - - return !diff; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - #ifndef BUFHELP_UNALIGNED_ACCESS -@@ -309,14 +309,14 @@ static inline u32 buf_get_be32(const voi - const byte *in = _buf; - return ((u32)in[0] << 24) | ((u32)in[1] << 16) | \ - ((u32)in[2] << 8) | (u32)in[3]; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline u32 buf_get_le32(const void *_buf) - { - const byte *in = _buf; - return ((u32)in[3] << 24) | ((u32)in[2] << 16) | \ - ((u32)in[1] << 8) | (u32)in[0]; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_be32(void *_buf, u32 val) - { -@@ -325,7 +325,7 @@ static inline void buf_put_be32(void *_b - out[1] = val >> 16; - out[2] = val >> 8; - out[3] = val; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_le32(void *_buf, u32 val) - { -@@ -334,7 +334,7 @@ static inline void buf_put_le32(void *_b - out[2] = val >> 16; - out[1] = val >> 8; - out[0] = val; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - /* Functions for loading and storing unaligned u64 values of different -@@ -346,7 +346,7 @@ static inline u64 buf_get_be64(const voi - ((u64)in[2] << 40) | ((u64)in[3] << 32) | \ - ((u64)in[4] << 24) | ((u64)in[5] << 16) | \ - ((u64)in[6] << 8) | (u64)in[7]; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline u64 buf_get_le64(const void *_buf) - { -@@ -355,7 +355,7 @@ static inline u64 buf_get_le64(const voi - ((u64)in[5] << 40) | ((u64)in[4] << 32) | \ - ((u64)in[3] << 24) | ((u64)in[2] << 16) | \ - ((u64)in[1] << 8) | (u64)in[0]; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_be64(void *_buf, u64 val) - { -@@ -368,7 +368,7 @@ static inline void buf_put_be64(void *_b - out[5] = val >> 16; - out[6] = val >> 8; - out[7] = val; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_le64(void *_buf, u64 val) - { -@@ -381,7 +381,7 @@ static inline void buf_put_le64(void *_b - out[2] = val >> 16; - out[1] = val >> 8; - out[0] = val; --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - #else /*BUFHELP_UNALIGNED_ACCESS*/ - -@@ -395,24 +395,24 @@ typedef struct bufhelp_u32_s - static inline u32 buf_get_be32(const void *_buf) - { - return be_bswap32(((const bufhelp_u32_t *)_buf)->a); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline u32 buf_get_le32(const void *_buf) - { - return le_bswap32(((const bufhelp_u32_t *)_buf)->a); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_be32(void *_buf, u32 val) - { - bufhelp_u32_t *out = _buf; - out->a = be_bswap32(val); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_le32(void *_buf, u32 val) - { - bufhelp_u32_t *out = _buf; - out->a = le_bswap32(val); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - typedef struct bufhelp_u64_s -@@ -425,24 +425,24 @@ typedef struct bufhelp_u64_s - static inline u64 buf_get_be64(const void *_buf) - { - return be_bswap64(((const bufhelp_u64_t *)_buf)->a); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline u64 buf_get_le64(const void *_buf) - { - return le_bswap64(((const bufhelp_u64_t *)_buf)->a); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_be64(void *_buf, u64 val) - { - bufhelp_u64_t *out = _buf; - out->a = be_bswap64(val); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - static inline void buf_put_le64(void *_buf, u64 val) - { - bufhelp_u64_t *out = _buf; - out->a = le_bswap64(val); --} -+} __attribute__ ((optimize("no-strict-aliasing"))) - - - #endif /*BUFHELP_UNALIGNED_ACCESS*/ diff --git a/libgcrypt-ppc64.patch b/libgcrypt-ppc64.patch deleted file mode 100644 index f174ed4..0000000 --- a/libgcrypt-ppc64.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: libgcrypt-1.6.0/mpi/config.links -=================================================================== ---- libgcrypt-1.6.0.orig/mpi/config.links -+++ libgcrypt-1.6.0/mpi/config.links -@@ -282,12 +282,12 @@ case "${host}" in - ;; - - ppc620-*-* | \ -- powerpc64*-*-*) -+ powerpc64-*-*) - mpi_sflags="-Wa,-mppc" - path="powerpc64" - mpi_cpu_arch="ppc" - ;; -- powerpc*-*-linux*) -+ powerpc-*-linux*) - echo '/* configured for powerpc/ELF */' >>./mpi/asm-syntax.h - echo '#define ELF_SYNTAX' >>./mpi/asm-syntax.h - cat $srcdir/mpi/powerpc32/syntax.h >>./mpi/asm-syntax.h -@@ -327,7 +327,7 @@ case "${host}" in - path="powerpc32" - mpi_cpu_arch="ppc" - ;; -- powerpc*-*-*) -+ powerpc-*-*) - mpi_sflags="-Wa,-mppc" - path="powerpc32" - mpi_cpu_arch="ppc" diff --git a/libgcrypt-strict-aliasing.patch b/libgcrypt-strict-aliasing.patch deleted file mode 100644 index 7ee9458..0000000 --- a/libgcrypt-strict-aliasing.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: cipher/Makefile.am -=================================================================== ---- cipher/Makefile.am.orig 2009-12-11 16:31:38.000000000 +0100 -+++ cipher/Makefile.am 2010-11-19 10:53:55.818890156 +0100 -@@ -80,3 +80,10 @@ - - tiger.lo: $(srcdir)/tiger.c - `echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) ` -+ -+# We need to build ac.c with -fno-strict-aliasing -+ac.o: $(srcdir)/ac.c -+ `echo $(COMPILE) -fno-strict-aliasing -c $(srcdir)/ac.c` -+ -+ac.lo: $(srcdir)/ac.c -+ `echo $(LTCOMPILE) -fno-strict-aliasing -c $(srcdir)/ac.c` diff --git a/libgcrypt.changes b/libgcrypt.changes index db05fdd..376ceb2 100644 --- a/libgcrypt.changes +++ b/libgcrypt.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jul 2 10:38:42 UTC 2018 - schwab@suse.de + +- libgcrypt-1.6.3-aliasing.patch, libgcrypt-ppc64.patch, + libgcrypt-strict-aliasing.patch: Remove obsolete patches +- libgcrypt-1.4.1-rijndael_no_strict_aliasing.patch: Rediff +- Reenable testsuite + ------------------------------------------------------------------- Wed Jun 13 10:46:33 UTC 2018 - kbabioch@suse.com diff --git a/libgcrypt.spec b/libgcrypt.spec index 1a9377c..734472c 100644 --- a/libgcrypt.spec +++ b/libgcrypt.spec @@ -36,8 +36,6 @@ Source4: %{name}.keyring Source5: cavs-test.sh Source6: cavs_driver.pl Source99: %{name}.changes -Patch0: %{name}-ppc64.patch -Patch1: %{name}-strict-aliasing.patch Patch3: %{name}-1.4.1-rijndael_no_strict_aliasing.patch Patch4: %{name}-sparcv9.diff #PATCH-FIX-UPSTREAM: bnc#701267, explicitly link with $(DL_LIBS) @@ -55,7 +53,6 @@ Patch29: libgcrypt-init-at-elf-load-fips.patch Patch30: drbg_test.patch #PATCH-FIX-SUSE run FIPS self-test from constructor Patch32: libgcrypt-fips_run_selftest_at_constructor.patch -Patch34: libgcrypt-1.6.3-aliasing.patch #PATCH-FIX-UPSTREAM bsc#1064455 fipsdrv patch to enable --algo for dsa-sign Patch35: libgcrypt-fipsdrv-enable-algo-for-dsa-sign.patch #PATCH-FIX-UPSTREAM bsc#1064455 fipsdrv patch to enable --algo for dsa-verify @@ -139,8 +136,6 @@ understanding of applied cryptography is required to use Libgcrypt. %prep %setup -q -%patch0 -p1 -%patch1 %patch3 -p1 %patch4 -p1 %patch5 -p1 @@ -150,11 +145,6 @@ understanding of applied cryptography is required to use Libgcrypt. %patch29 -p1 %patch30 -p1 %patch32 -p1 -# This patch breaks x86_64 builds but is needed for big-endian -# architectures -%ifarch ppc ppc64 s390 s390x -%patch34 -p1 -%endif %patch13 -p1 %patch14 -p1 %patch35 -p1 @@ -194,10 +184,7 @@ make %{?_smp_mflags} %check fipshmac src/.libs/libgcrypt.so.?? -# Nice idea. however this uses /dev/random, which hangs -# on hardware without random feeds. -# so lets not run it inside OBS -# make %{?_smp_mflags} check +make %{?_smp_mflags} check %install %make_install