diff --git a/libxcrypt-4.0.0_gcc8_fix_test.patch b/libxcrypt-4.0.0_gcc8_fix_test.patch new file mode 100644 index 0000000..ea5b306 --- /dev/null +++ b/libxcrypt-4.0.0_gcc8_fix_test.patch @@ -0,0 +1,22 @@ +From db1a30dea83a74a0314fddffc35e165b1ebb3158 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Wed, 31 Jan 2018 00:43:49 +0100 +Subject: [PATCH] test-crypt-bcrypt: Fix test with GCC8 + +--- + test-crypt-bcrypt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test-crypt-bcrypt.c b/test-crypt-bcrypt.c +index fffee97..02a2f07 100644 +--- a/test-crypt-bcrypt.c ++++ b/test-crypt-bcrypt.c +@@ -177,7 +177,7 @@ main (void) + const char *key = tests[i][1]; + const char *setting = tests[i][2]; + const char *p; +- int ok = !setting || strlen (hash) >= 30; ++ int ok = !setting || hash[0] != '*'; + char s_buf[30]; + char o_buf[sizeof (struct crypt_data)]; + int errnm, match; diff --git a/libxcrypt.spec b/libxcrypt.spec index 6e2c675..d2616c8 100644 --- a/libxcrypt.spec +++ b/libxcrypt.spec @@ -19,7 +19,7 @@ Name: libxcrypt Version: 4.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Extended crypt library for DES, MD5, Blowfish and others # For explicit license breakdown, see the @@ -28,6 +28,8 @@ License: LGPLv2+ and BSD and CDDL and Public Domain URL: https://github.com/besser82/%{name} Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: %{url}/commit/db1a30dea83a74a0314fddffc35e165b1ebb3158.patch#/%{name}-4.0.0_gcc8_fix_test.patch + BuildRequires: fipscheck BuildRequires: libtool @@ -182,6 +184,9 @@ is highly discouraged. %changelog +* Wed Jan 31 2018 Björn Esser - 4.0.0-2 +- Add patch to fix bcrypt test with GCC8 + * Sat Jan 27 2018 Björn Esser - 4.0.0-1 - New upstream release