diff --git a/john-1.9.0-jumbo-gcc11.patch b/john-1.9.0-jumbo-gcc11.patch new file mode 100644 index 0000000..dee70a3 --- /dev/null +++ b/john-1.9.0-jumbo-gcc11.patch @@ -0,0 +1,47 @@ +--- john-1.9.0-jumbo-1/src/blake2.h.orig 2021-06-08 13:33:13.878627572 +0200 ++++ john-1.9.0-jumbo-1/src/blake2.h 2021-06-08 13:36:22.164069924 +0200 +@@ -10,7 +10,7 @@ + You should have received a copy of the CC0 Public Domain Dedication along with + this software. If not, see . + */ +-#pragma once ++ + #ifndef __BLAKE2_H__ + #define __BLAKE2_H__ + +@@ -57,7 +57,7 @@ + uint8_t personal[BLAKE2S_PERSONALBYTES]; // 32 + } blake2s_param; + +- JTR_ALIGN( 64 ) typedef struct __blake2s_state ++ typedef struct JTR_ALIGN( 64 ) __blake2s_state + { + uint32_t h[8]; + uint32_t t[2]; +@@ -82,7 +82,7 @@ + uint8_t personal[BLAKE2B_PERSONALBYTES]; // 64 + } blake2b_param; + +- JTR_ALIGN( 64 ) typedef struct __blake2b_state ++ typedef struct JTR_ALIGN( 64 ) __blake2b_state + { + uint64_t h[8]; + uint64_t t[2]; +@@ -94,7 +94,7 @@ + #if defined(JOHN_NO_SIMD) || (!defined(__SSE2__) && !defined(__SSE4_1__) && !defined(__XOP__)) + typedef struct __blake2sp_state + #else +- JTR_ALIGN( 64 ) typedef struct __blake2sp_state ++ typedef struct JTR_ALIGN( 64 ) __blake2sp_state + #endif + { + blake2s_state S[8][1]; +@@ -106,7 +106,7 @@ + #if defined(JOHN_NO_SIMD) || (!defined(__SSE2__) && !defined(__SSE4_1__) && !defined(__XOP__)) + typedef struct __blake2bp_state + #else +- JTR_ALIGN( 64 ) typedef struct __blake2bp_state ++ typedef struct JTR_ALIGN( 64 ) __blake2bp_state + #endif + { + blake2b_state S[4][1]; diff --git a/john.changes b/john.changes index 40e11ff..e67a2b9 100644 --- a/john.changes +++ b/john.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 8 11:46:18 UTC 2021 - simmphonie@opensuse.org + +- add john-1.9.0-jumbo-gcc11.patch to fix alignment compile errors + on GCC 11 gh#4611 + ------------------------------------------------------------------- Sat Mar 13 10:10:12 UTC 2021 - Dirk Müller diff --git a/john.spec b/john.spec index 66fd92e..6f3c755 100644 --- a/john.spec +++ b/john.spec @@ -36,6 +36,7 @@ Source9: https://www.openwall.com/john/k/%{jumboversion}.tar.xz.sign # PATCH-FIX-UPSTREAM cl-device.patch gh#openwall/john#4331 Patch0: cl-device.patch Patch1: john-1.9.0-jumbo-gcc10.patch +Patch2: john-1.9.0-jumbo-gcc11.patch BuildRequires: dos2unix BuildRequires: gmp-devel BuildRequires: libpcap-devel @@ -58,6 +59,7 @@ cd .. rm -r %{jumboversion} %patch0 -p1 %patch1 -p1 +%patch2 -p1 # adapt the configs perl -pi -e "s#Wordlist = (.*)#Wordlist = %{johndir}/password.lst#g" $RPM_BUILD_DIR/%{name}-%{version}/run/john.conf perl -pi -e 's#^(\#define JOHN_SYSTEMWIDE_EXEC)\s.+$#$1\t\"%{johndir}\"#g' $RPM_BUILD_DIR/%{name}-%{version}/src/params.h