mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: "Björn Esser" <b.esser@pengutronix.de>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] perl: Add patch for compatibility with recent libcrypt implementations.
Date: Thu, 10 Oct 2019 14:39:28 +0200	[thread overview]
Message-ID: <20191010123928.oabyu76tfhmxqzps@pengutronix.de> (raw)
In-Reply-To: <20191010084444.5926-1-b.esser@pengutronix.de>

On Thu, Oct 10, 2019 at 10:44:45AM +0200, Björn Esser wrote:
> Signed-off-by: Björn Esser <b.esser@pengutronix.de>
> ---
>  .../0001-It-s-lpthread-not-lpthreads.patch    |  7 +++-
>  ...-fix-build-failure-with-recent-glibc.patch | 39 +++++++++++++++++++
>  patches/perl-5.18.2/series                    |  3 +-
>  3 files changed, 47 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..7a7bb1beb 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
> @@ -1,15 +1,20 @@
>  From: Michael Olbrich <m.olbrich@pengutronix.de>
>  Date: Wed, 23 Apr 2014 09:02:25 +0200
>  Subject: [PATCH] It's -lpthread not -lpthreads
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit

Hmm, I wonder how you got these additional headers? :-)

 - Roland

>  
>  Otherwise linking fails with missing pthread symbols when building with
>  with -Dusethreads
> +
> +Signed-off-by: Björn Esser <b.esser@pengutronix.de>
>  ---
>   cnf/configure_libs.sh | 2 +-
>   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..5be0c0f1d
> --- /dev/null
> +++ b/patches/perl-5.18.2/0002-fix-build-failure-with-recent-glibc.patch
> @@ -0,0 +1,39 @@
> +From: David Mitchell <davem@iabyn.com>
> +Date: Fri, 11 May 2018 08:03:42 +0100
> +Subject: [PATCH] fix build failure with recent glibc
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +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.
> +
> +Signed-off-by: Björn Esser <b.esser@pengutronix.de>
> +---
> + 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

-- 
Roland Hieber                     | r.hieber@pengutronix.de     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2019-10-10 12:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10  8:44 Björn Esser
2019-10-10  9:14 ` Uwe Kleine-König
2019-10-10  9:21   ` [ptxdist] [PATCH v2] " Björn Esser
2019-10-10 12:39 ` Roland Hieber [this message]
2019-10-10 12:45   ` [ptxdist] [PATCH] " 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=20191010123928.oabyu76tfhmxqzps@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=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