SHA256
3
0
forked from pool/perl

Accepting request 636590 from home:Andreas_Schwab:Factory

- perl-pp-crypt.patch: fix incompatibility with libxcrypt (bsc#1107973)

OBS-URL: https://build.opensuse.org/request/show/636590
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=167
This commit is contained in:
Dirk Stoecker 2018-09-19 12:18:31 +00:00 committed by Git OBS Bridge
parent 36634f3478
commit f4695ea2e6
3 changed files with 45 additions and 0 deletions

38
perl-pp-crypt.patch Normal file
View File

@ -0,0 +1,38 @@
From e9c9cf57594854df9f5802f7f149be4738212e96 Mon Sep 17 00:00:00 2001
From: David Mitchell <davem@iabyn.com>
Date: Fri, 11 May 2018 08:03:42 +0100
Subject: [PATCH] fix build failure with recent glibc
RT #133184
pp_crypt() directly manipulates a field inside 'struct crypt_data' to work
around a bug in an ancient glibc version from circa 2002. New glibc
releases don't have this field so perl fails to compile. Make the hack
conditional on glibc version.
Stolen from a patch to the Fedora 28 distribution.
---
pp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pp.c b/pp.c
index 826c20748b..33eac6040d 100644
--- a/pp.c
+++ b/pp.c
@@ -3653,8 +3653,12 @@ PP(pp_crypt)
#if defined(__GLIBC__) || defined(__EMX__)
if (PL_reentrant_buffer->_crypt_struct_buffer) {
PL_reentrant_buffer->_crypt_struct_buffer->initialized = 0;
- /* work around glibc-2.2.5 bug */
+#if (defined(__GLIBC__) && __GLIBC__ == 2) && \
+ (defined(__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 2 && __GLIBC_MINOR__ < 4)
+ /* work around glibc-2.2.5 bug, has been fixed at some
+ * time in glibc-2.3.X */
PL_reentrant_buffer->_crypt_struct_buffer->current_saltbits = 0;
+#endif
}
#endif
}
--
2.19.0

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 18 14:14:34 UTC 2018 - schwab@suse.de
- perl-pp-crypt.patch: fix incompatibility with libxcrypt (bsc#1107973)
-------------------------------------------------------------------
Wed May 23 14:12:11 CEST 2018 - mls@suse.de

View File

@ -45,6 +45,7 @@ Patch11: perl-5.18.2-overflow.diff
Patch12: perl-reproducible.patch
Patch13: perl_skip_flaky_tests_powerpc.patch
Patch14: posix-sigaction.patch
Patch15: perl-pp-crypt.patch
BuildRequires: db-devel
BuildRequires: gdbm-devel
BuildRequires: libbz2-devel
@ -178,6 +179,7 @@ cp -p %{SOURCE3} .
%patch11
%patch12 -p1
%patch14 -p1
%patch15 -p1
%build
cp -a lib savelib