* [Buildroot] [PATCH] package/perl: fix configure when BR2_VERSION_FULL contains a '/'
@ 2021-03-27 22:42 Yann E. MORIN
2021-03-28 19:24 ` Thomas Petazzoni
2021-03-31 6:14 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-03-27 22:42 UTC (permalink / raw)
To: buildroot
When BR2_VERSION_FULL contains one or more '/', injection our version
in the perl patch-level fails:
/usr/bin/sed: -e expression #1, char 27: unknown option to `s'
When the build is done in a git tree, and HEAD is a tag, BR2_VERSION_FULL
will contain that tag name. Even if not widely common, it is not unusual
for a tag to contain a '/', and this is perfectly legit in git.
So, mangle BR2_VERSION_FULL to escape all '/' with a backslash '\', so
that the sed expression is correct, and so that we eventually have a
correct pathclevel string in perl's --version output.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Francois Perrad <francois.perrad@gadz.org>
---
package/perl/perl.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index 0ff288db0e..a77686f951 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -79,7 +79,7 @@ endif
define PERL_CONFIGURE_CMDS
(cd $(@D); $(TARGET_MAKE_ENV) HOSTCC='$(HOSTCC_NOCCACHE)' \
./configure $(PERL_CONF_OPTS))
- $(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
+ $(SED) 's/UNKNOWN-/Buildroot $(subst /,\/,$(BR2_VERSION_FULL)) /' $(@D)/patchlevel.h
endef
define PERL_BUILD_CMDS
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/perl: fix configure when BR2_VERSION_FULL contains a '/'
2021-03-27 22:42 [Buildroot] [PATCH] package/perl: fix configure when BR2_VERSION_FULL contains a '/' Yann E. MORIN
@ 2021-03-28 19:24 ` Thomas Petazzoni
2021-03-31 6:14 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2021-03-28 19:24 UTC (permalink / raw)
To: buildroot
On Sat, 27 Mar 2021 23:42:20 +0100
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> When BR2_VERSION_FULL contains one or more '/', injection our version
> in the perl patch-level fails:
>
> /usr/bin/sed: -e expression #1, char 27: unknown option to `s'
>
> When the build is done in a git tree, and HEAD is a tag, BR2_VERSION_FULL
> will contain that tag name. Even if not widely common, it is not unusual
> for a tag to contain a '/', and this is perfectly legit in git.
>
> So, mangle BR2_VERSION_FULL to escape all '/' with a backslash '\', so
> that the sed expression is correct, and so that we eventually have a
> correct pathclevel string in perl's --version output.
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Francois Perrad <francois.perrad@gadz.org>
> ---
> package/perl/perl.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/perl: fix configure when BR2_VERSION_FULL contains a '/'
2021-03-27 22:42 [Buildroot] [PATCH] package/perl: fix configure when BR2_VERSION_FULL contains a '/' Yann E. MORIN
2021-03-28 19:24 ` Thomas Petazzoni
@ 2021-03-31 6:14 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2021-03-31 6:14 UTC (permalink / raw)
To: buildroot
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> When BR2_VERSION_FULL contains one or more '/', injection our version
> in the perl patch-level fails:
> /usr/bin/sed: -e expression #1, char 27: unknown option to `s'
> When the build is done in a git tree, and HEAD is a tag, BR2_VERSION_FULL
> will contain that tag name. Even if not widely common, it is not unusual
> for a tag to contain a '/', and this is perfectly legit in git.
> So, mangle BR2_VERSION_FULL to escape all '/' with a backslash '\', so
> that the sed expression is correct, and so that we eventually have a
> correct pathclevel string in perl's --version output.
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Francois Perrad <francois.perrad@gadz.org>
Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-31 6:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 22:42 [Buildroot] [PATCH] package/perl: fix configure when BR2_VERSION_FULL contains a '/' Yann E. MORIN
2021-03-28 19:24 ` Thomas Petazzoni
2021-03-31 6:14 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.