From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Ian Abbott <abbotti@mev.co.uk>
Subject: Re: [ptxdist] [PATCH] host-intltool: fix intltool-update unescaped left brace in regex
Date: Mon, 4 Sep 2017 13:06:17 +0200 [thread overview]
Message-ID: <20170904110617.telhh4jfft4xsrgc@pengutronix.de> (raw)
In-Reply-To: <20170831114516.26472-1-abbotti@mev.co.uk>
On Thu, Aug 31, 2017 at 12:45:16PM +0100, Ian Abbott wrote:
> intltool-update from intltool-0.50.0 doesn't work with Perl 5.26 (and
> possibly other versions later than Perl 5.22), due to "Unescaped left
> brace in regex is illegal here" errors. In Perl 5.22 this resulted in
> warnings, but they have since been promoted to errors.
>
> For example, building "avahi" fails at the "prepare" stage:
>
> checking for intltool >= 0.35.0... Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/^(.*)\${ <-- HERE ?([A-Z_]+)}?(.*)$/ at /home/abbotti/work/ptxdist/projects/dbpod-socfpga-tmp/platform-dbpod-fastpod/sysroot-host/bin/intltool-update line 1064.
> found
> configure: error: Your intltool is too old. You need intltool 0.35.0 or later.
> /mnt/lindata/work/abbotti/ptxdist/ptxdist/ptxdist_git/ptxdist/rules/post/ptxd_make_world_prepare.make:12: recipe for target '/home/abbotti/work/ptxdist/projects/dbpod-socfpga-tmp/platform-dbpod-fastpod/state/avahi.prepare' failed
> make: *** [/home/abbotti/work/ptxdist/projects/dbpod-socfpga-tmp/platform-dbpod-fastpod/state/avahi.prepare] Error 1
>
> Apply the same patch as in the mainstream Linux distros to fix it.
>
> Note that if PTXdist updates host-intltool to version 0.51.0, it will
> need the same patch.
For the record, here are some upstream bugreports:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788705
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826471
https://bugs.launchpad.net/intltool/+bug/1490906
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
> patches/intltool-0.50.0/intltool-perl-5.22.patch | 43 ++++++++++++++++++++++++
> patches/intltool-0.50.0/series | 1 +
> 2 files changed, 44 insertions(+)
> create mode 100644 patches/intltool-0.50.0/intltool-perl-5.22.patch
> create mode 100644 patches/intltool-0.50.0/series
>
> diff --git a/patches/intltool-0.50.0/intltool-perl-5.22.patch b/patches/intltool-0.50.0/intltool-perl-5.22.patch
> new file mode 100644
> index 000000000..a23946b39
> --- /dev/null
> +++ b/patches/intltool-0.50.0/intltool-perl-5.22.patch
> @@ -0,0 +1,43 @@
> +--- a/intltool-update.in 2015-03-09 02:39:54.000000000 +0100
> ++++ b/intltool-update.in 2015-09-01 11:43:40.595517191 +0200
> +@@ -1062,7 +1062,7 @@
> + }
> + }
> +
> +- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
> ++ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
> + {
> + my $rest = $3;
> + my $untouched = $1;
> +@@ -1190,10 +1190,10 @@
> + $name =~ s/\(+$//g;
> + $version =~ s/\(+$//g;
> +
> +- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
> +- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
> +- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
> +- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
> ++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
> ++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
> ++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
> ++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
> + }
> +
> + if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
> +@@ -1219,11 +1219,11 @@
> + $version =~ s/\(+$//g;
> + $bugurl =~ s/\(+$//g if (defined $bugurl);
> +
> +- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
> +- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
> +- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
> +- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
> +- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
> ++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
> ++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
> ++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
> ++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
> ++ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
> + }
> +
> + # \s makes this not work, why?
> diff --git a/patches/intltool-0.50.0/series b/patches/intltool-0.50.0/series
> new file mode 100644
> index 000000000..f0f2827c4
> --- /dev/null
> +++ b/patches/intltool-0.50.0/series
> @@ -0,0 +1 @@
> +intltool-perl-5.22.patch
> --
> 2.14.1
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2017-09-04 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 11:45 Ian Abbott
2017-09-04 11:06 ` Robert Schwebel [this message]
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=20170904110617.telhh4jfft4xsrgc@pengutronix.de \
--to=r.schwebel@pengutronix.de \
--cc=abbotti@mev.co.uk \
--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