All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gettext-tiny: fix install failure if path contains "m4/" string
@ 2020-01-17 17:53 Giulio Benetti
  2020-01-17 17:55 ` Giulio Benetti
  2020-01-17 20:29 ` Yann E. MORIN
  0 siblings, 2 replies; 6+ messages in thread
From: Giulio Benetti @ 2020-01-17 17:53 UTC (permalink / raw)
  To: buildroot

When building with path containing "m4/" occurence(i.e. make
O=output-m4) gettext-tiny install recipe copies files to wrong place and
later some package using autotools fail to autoreconf(i.e. minicom).
This is due to buggy gettext-tiny Makefile install recipe where they
substitute every "m4/" in INSTALL destination path, including the "m4/"
part of our build folder. Add patch to fix this by using sed instead of
$(subst ...) to substitute only last "m4/" occurence in path.

Fixes:
https://bugs.busybox.net/show_bug.cgi?id=12481

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 ...tall-failure-if-path-contains-m4-str.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch

diff --git a/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
new file mode 100644
index 0000000000..e607f9ea2a
--- /dev/null
+++ b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
@@ -0,0 +1,31 @@
+From c9440e55e1179e7ce29cceae2ddb089b11c00f07 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Fri, 17 Jan 2020 18:34:42 +0100
+Subject: [PATCH] Makefile: fix install failure if path contains "m4/" string
+
+Actually Makefile install recipe substitutes every occurence of "m4/" in
+file name of the target of the rule($@), in an absolute path there could
+more than one "m4/" occurence, so install will fail. Let's change
+$(susbst ...) call with a call to sed substituting only last occurence
+of "m4/".
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 4a3c3f6..1f925a3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
+ 	$(INSTALL) -D -m 644 $< $@
+ 
+ $(DESTDIR)$(acdir)/%: %
+-	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
++	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(shell echo $@ | sed 's,\(.*\)m4/,\1,')
+ 
+ .PHONY: all clean install
+-- 
+2.20.1
+
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gettext-tiny: fix install failure if path contains "m4/" string
  2020-01-17 17:53 [Buildroot] [PATCH] package/gettext-tiny: fix install failure if path contains "m4/" string Giulio Benetti
@ 2020-01-17 17:55 ` Giulio Benetti
  2020-01-17 20:29 ` Yann E. MORIN
  1 sibling, 0 replies; 6+ messages in thread
From: Giulio Benetti @ 2020-01-17 17:55 UTC (permalink / raw)
  To: buildroot

Forgot to mention...

On 1/17/20 6:53 PM, Giulio Benetti wrote:
> When building with path containing "m4/" occurence(i.e. make
> O=output-m4) gettext-tiny install recipe copies files to wrong place and
> later some package using autotools fail to autoreconf(i.e. minicom).
> This is due to buggy gettext-tiny Makefile install recipe where they
> substitute every "m4/" in INSTALL destination path, including the "m4/"
> part of our build folder. Add patch to fix this by using sed instead of
> $(subst ...) to substitute only last "m4/" occurence in path.
> 
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=12481
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---

Patch pending upstream:
https://github.com/sabotage-linux/gettext-tiny/pull/49

>   ...tall-failure-if-path-contains-m4-str.patch | 31 +++++++++++++++++++
>   1 file changed, 31 insertions(+)
>   create mode 100644 package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> 
> diff --git a/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> new file mode 100644
> index 0000000000..e607f9ea2a
> --- /dev/null
> +++ b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> @@ -0,0 +1,31 @@
> +From c9440e55e1179e7ce29cceae2ddb089b11c00f07 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Fri, 17 Jan 2020 18:34:42 +0100
> +Subject: [PATCH] Makefile: fix install failure if path contains "m4/" string
> +
> +Actually Makefile install recipe substitutes every occurence of "m4/" in
> +file name of the target of the rule($@), in an absolute path there could
> +more than one "m4/" occurence, so install will fail. Let's change
> +$(susbst ...) call with a call to sed substituting only last occurence
> +of "m4/".
> +
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 4a3c3f6..1f925a3 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
> + 	$(INSTALL) -D -m 644 $< $@
> +
> + $(DESTDIR)$(acdir)/%: %
> +-	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
> ++	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(shell echo $@ | sed 's,\(.*\)m4/,\1,')
> +
> + .PHONY: all clean install
> +--
> +2.20.1
> +
> 

-- 
Giulio Benetti
Benetti Engineering sas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gettext-tiny: fix install failure if path contains "m4/" string
  2020-01-17 17:53 [Buildroot] [PATCH] package/gettext-tiny: fix install failure if path contains "m4/" string Giulio Benetti
  2020-01-17 17:55 ` Giulio Benetti
@ 2020-01-17 20:29 ` Yann E. MORIN
  2020-01-18 22:06   ` [Buildroot] [PATCH v2] " Giulio Benetti
  1 sibling, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2020-01-17 20:29 UTC (permalink / raw)
  To: buildroot

Giulio, All,

On 2020-01-17 18:53 +0100, Giulio Benetti spake thusly:
> When building with path containing "m4/" occurence(i.e. make
> O=output-m4) gettext-tiny install recipe copies files to wrong place and
> later some package using autotools fail to autoreconf(i.e. minicom).
> This is due to buggy gettext-tiny Makefile install recipe where they
> substitute every "m4/" in INSTALL destination path, including the "m4/"
> part of our build folder. Add patch to fix this by using sed instead of
> $(subst ...) to substitute only last "m4/" occurence in path.
> 
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=12481
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  ...tall-failure-if-path-contains-m4-str.patch | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> 
> diff --git a/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> new file mode 100644
> index 0000000000..e607f9ea2a
> --- /dev/null
> +++ b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> @@ -0,0 +1,31 @@
> +From c9440e55e1179e7ce29cceae2ddb089b11c00f07 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Fri, 17 Jan 2020 18:34:42 +0100
> +Subject: [PATCH] Makefile: fix install failure if path contains "m4/" string
> +
> +Actually Makefile install recipe substitutes every occurence of "m4/" in
> +file name of the target of the rule($@), in an absolute path there could
> +more than one "m4/" occurence, so install will fail. Let's change
> +$(susbst ...) call with a call to sed substituting only last occurence
> +of "m4/".
> +
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 4a3c3f6..1f925a3 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
> + 	$(INSTALL) -D -m 644 $< $@
> + 
> + $(DESTDIR)$(acdir)/%: %
> +-	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
> ++	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(shell echo $@ | sed 's,\(.*\)m4/,\1,')

As I suggested on your upstream pull-request, what about:

    -	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
    +	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(patsubst %m4/,%,$@)

Regards,
Yann E. MORIN.

> + .PHONY: all clean install
> +-- 
> +2.20.1
> +
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/gettext-tiny: fix install failure if path contains "m4/" string
  2020-01-17 20:29 ` Yann E. MORIN
@ 2020-01-18 22:06   ` Giulio Benetti
  2020-01-18 22:21     ` Yann E. MORIN
  2020-03-05 20:16     ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: Giulio Benetti @ 2020-01-18 22:06 UTC (permalink / raw)
  To: buildroot

When building with path containing "m4/" occurence(i.e. make
O=output-m4) gettext-tiny install recipe copies files to wrong place and
later some package using autotools fail to autoreconf(i.e. minicom).
This is due to buggy gettext-tiny Makefile install recipe where they
substitute every "m4/" in INSTALL destination path, including the "m4/"
part of our build folder. Add patch to fix this by using $(patsubst ...)
instead of $(subst m4/,,$@) to substitute only last "m4/" occurence in
path.

Fixes:
https://bugs.busybox.net/show_bug.cgi?id=12481

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
Pending upstream:
https://github.com/sabotage-linux/gettext-tiny/pull/49

V1->V2:
* used $(patsubst ...) instead of sed as suggested by Heiko and xhebox
---
 ...tall-failure-if-path-contains-m4-str.patch | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch

diff --git a/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
new file mode 100644
index 0000000000..f1c68ee1e7
--- /dev/null
+++ b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
@@ -0,0 +1,31 @@
+From 2ad9d66d733396b655f05b477a5e91592378fb21 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <giulio.benetti@benettiengineering.com>
+Date: Fri, 17 Jan 2020 18:34:42 +0100
+Subject: [PATCH] Makefile: fix install failure if path contains "m4/" string
+
+Actually Makefile install recipe substitutes every occurence of "m4/" in
+file name of the target of the rule($@), in an absolute path there could
+more than one "m4/" occurence, so install will fail. Let's change
+$(subst ...) with $(patsubst ...) substituting only last occurence of
+"m4/" pattern.
+
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 4a3c3f6..2e13403 100644
+--- a/Makefile
++++ b/Makefile
+@@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
+ 	$(INSTALL) -D -m 644 $< $@
+ 
+ $(DESTDIR)$(acdir)/%: %
+-	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
++	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(patsubst %m4/,%,$(dir $@))/$(notdir $@)
+ 
+ .PHONY: all clean install
+-- 
+2.20.1
+
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/gettext-tiny: fix install failure if path contains "m4/" string
  2020-01-18 22:06   ` [Buildroot] [PATCH v2] " Giulio Benetti
@ 2020-01-18 22:21     ` Yann E. MORIN
  2020-03-05 20:16     ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2020-01-18 22:21 UTC (permalink / raw)
  To: buildroot

Giulio, All,

On 2020-01-18 23:06 +0100, Giulio Benetti spake thusly:
> When building with path containing "m4/" occurence(i.e. make
> O=output-m4) gettext-tiny install recipe copies files to wrong place and
> later some package using autotools fail to autoreconf(i.e. minicom).
> This is due to buggy gettext-tiny Makefile install recipe where they
> substitute every "m4/" in INSTALL destination path, including the "m4/"
> part of our build folder. Add patch to fix this by using $(patsubst ...)
> instead of $(subst m4/,,$@) to substitute only last "m4/" occurence in
> path.
> 
> Fixes:
> https://bugs.busybox.net/show_bug.cgi?id=12481
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> Pending upstream:
> https://github.com/sabotage-linux/gettext-tiny/pull/49
> 
> V1->V2:
> * used $(patsubst ...) instead of sed as suggested by Heiko and xhebox
> ---
>  ...tall-failure-if-path-contains-m4-str.patch | 31 +++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> 
> diff --git a/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> new file mode 100644
> index 0000000000..f1c68ee1e7
> --- /dev/null
> +++ b/package/gettext-tiny/0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch
> @@ -0,0 +1,31 @@
> +From 2ad9d66d733396b655f05b477a5e91592378fb21 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +Date: Fri, 17 Jan 2020 18:34:42 +0100
> +Subject: [PATCH] Makefile: fix install failure if path contains "m4/" string
> +
> +Actually Makefile install recipe substitutes every occurence of "m4/" in
> +file name of the target of the rule($@), in an absolute path there could
> +more than one "m4/" occurence, so install will fail. Let's change
> +$(subst ...) with $(patsubst ...) substituting only last occurence of
> +"m4/" pattern.
> +
> +Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 4a3c3f6..2e13403 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
> + 	$(INSTALL) -D -m 644 $< $@
> + 
> + $(DESTDIR)$(acdir)/%: %
> +-	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
> ++	$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(patsubst %m4/,%,$(dir $@))/$(notdir $@)
> + 
> + .PHONY: all clean install
> +-- 
> +2.20.1
> +
> -- 
> 2.20.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2] package/gettext-tiny: fix install failure if path contains "m4/" string
  2020-01-18 22:06   ` [Buildroot] [PATCH v2] " Giulio Benetti
  2020-01-18 22:21     ` Yann E. MORIN
@ 2020-03-05 20:16     ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2020-03-05 20:16 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > When building with path containing "m4/" occurence(i.e. make
 > O=output-m4) gettext-tiny install recipe copies files to wrong place and
 > later some package using autotools fail to autoreconf(i.e. minicom).
 > This is due to buggy gettext-tiny Makefile install recipe where they
 > substitute every "m4/" in INSTALL destination path, including the "m4/"
 > part of our build folder. Add patch to fix this by using $(patsubst ...)
 > instead of $(subst m4/,,$@) to substitute only last "m4/" occurence in
 > path.

 > Fixes:
 > https://bugs.busybox.net/show_bug.cgi?id=12481

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > ---
 > Pending upstream:
 > https://github.com/sabotage-linux/gettext-tiny/pull/49

 > V1-> V2:
 > * used $(patsubst ...) instead of sed as suggested by Heiko and xhebox

Committed to 2019.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-05 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 17:53 [Buildroot] [PATCH] package/gettext-tiny: fix install failure if path contains "m4/" string Giulio Benetti
2020-01-17 17:55 ` Giulio Benetti
2020-01-17 20:29 ` Yann E. MORIN
2020-01-18 22:06   ` [Buildroot] [PATCH v2] " Giulio Benetti
2020-01-18 22:21     ` Yann E. MORIN
2020-03-05 20:16     ` 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.