mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Björn Esser" <b.esser@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: "Björn Esser" <b.esser@pengutronix.de>
Subject: [ptxdist] [PATCH v2] perl: Add patch for compatibility with recent libcrypt implementations.
Date: Thu, 10 Oct 2019 11:21:44 +0200	[thread overview]
Message-ID: <20191010092143.3001-1-b.esser@pengutronix.de> (raw)
In-Reply-To: <20191010091414.kd2b2ddxiugrlhzn@pengutronix.de>

Signed-off-by: Björn Esser <b.esser@pengutronix.de>
---

ChangeLog:

  * v1 --> v2: Revised as pointed out by ukk.

 .../0001-It-s-lpthread-not-lpthreads.patch    |  2 +-
 ...-fix-build-failure-with-recent-glibc.patch | 34 +++++++++++++++++++
 patches/perl-5.18.2/series                    |  3 +-
 3 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch

diff --git a/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch b/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
index 319cefb2e..ecdcd0aee 100644
--- a/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
+++ b/patches/perl-5.18.2/0001-It-s-lpthread-not-lpthreads.patch
@@ -9,7 +9,7 @@ with -Dusethreads
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/cnf/configure_libs.sh b/cnf/configure_libs.sh
-index f45d31c..cca73e5 100644
+index f45d31cfc413..cca73e5004fb 100644
 --- a/cnf/configure_libs.sh
 +++ b/cnf/configure_libs.sh
 @@ -53,7 +53,7 @@ if not hinted 'perllibs'; then
diff --git a/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch b/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch
new file mode 100644
index 000000000..358c8439f
--- /dev/null
+++ b/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch
@@ -0,0 +1,34 @@
+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 430cf857a628..d099af043995 100644
+--- a/pp.c
++++ b/pp.c
+@@ -3412,8 +3412,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
+     }
diff --git a/patches/perl-5.18.2/series b/patches/perl-5.18.2/series
index dbf4b587d..d504441ef 100644
--- a/patches/perl-5.18.2/series
+++ b/patches/perl-5.18.2/series
@@ -1,4 +1,5 @@
 # generated by git-ptx-patches
 #tag:base --start-number 1
 0001-It-s-lpthread-not-lpthreads.patch
-# 82701174c686d625c466a538b4d64ece  - git-ptx-patches magic
+0002-fix-build-failure-with-recent-glibc.patch
+# 1c17e4b9d62a94d4ee665ae8d0f4c9ff  - git-ptx-patches magic
-- 
2.23.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-10-10  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  8:44 [ptxdist] [PATCH] " Björn Esser
2019-10-10  9:14 ` Uwe Kleine-König
2019-10-10  9:21   ` Björn Esser [this message]
2019-10-10 12:39 ` Roland Hieber
2019-10-10 12:45   ` Björn Esser
2019-10-10 13:25     ` Alexander Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010092143.3001-1-b.esser@pengutronix.de \
    --to=b.esser@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox