public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] newlib: fix potential issue of sys headers install
@ 2023-08-16  7:42 Alexey Lapshin
  2023-08-16  7:57 ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Lapshin @ 2023-08-16  7:42 UTC (permalink / raw)
  To: newlib; +Cc: jjohnstn

[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]

---
 newlib/Makefile.am | 4 ++--
 newlib/Makefile.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 126cf24c1..e29607ccd 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -240,7 +240,7 @@ stmp-targ-include: config.status
 	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	  $(MKDIR_P) targ-include/`dirname $$f`; \
 	  cp $$i targ-include/$$f; \
 	done
@@ -334,7 +334,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 93a97b5fb..e2e4ed752 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -49975,7 +49975,7 @@ stmp-targ-include: config.status
 	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	  $(MKDIR_P) targ-include/`dirname $$f`; \
 	  cp $$i targ-include/$$f; \
 	done
@@ -50064,7 +50064,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
-- 
2.34.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-newlib-fix-potential-issue-of-sys-headers-install.patch --]
[-- Type: text/x-patch; name="0001-newlib-fix-potential-issue-of-sys-headers-install.patch", Size: 2621 bytes --]

From bfd83677213e2ee6910bd1026f521eb9a0773df0 Mon Sep 17 00:00:00 2001
From: Alexey Lapshin <alexey.lapshin@espressif.com>
Date: Wed, 16 Aug 2023 11:36:50 +0400
Subject: [PATCH 1/3] newlib: fix potential issue of sys headers install

---
 newlib/Makefile.am | 4 ++--
 newlib/Makefile.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 126cf24c1..e29607ccd 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -240,7 +240,7 @@ stmp-targ-include: config.status
 	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	  $(MKDIR_P) targ-include/`dirname $$f`; \
 	  cp $$i targ-include/$$f; \
 	done
@@ -334,7 +334,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 93a97b5fb..e2e4ed752 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -49975,7 +49975,7 @@ stmp-targ-include: config.status
 	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	  $(MKDIR_P) targ-include/`dirname $$f`; \
 	  cp $$i targ-include/$$f; \
 	done
@@ -50064,7 +50064,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
-- 
2.34.1


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

* Re: [PATCH] newlib: fix potential issue of sys headers install
  2023-08-16  7:42 [PATCH] newlib: fix potential issue of sys headers install Alexey Lapshin
@ 2023-08-16  7:57 ` Corinna Vinschen
  2023-08-24 15:38   ` Alexey Lapshin
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-16  7:57 UTC (permalink / raw)
  To: Alexey Lapshin; +Cc: newlib, jjohnstn

Hi Alexey,

Please add a description of the problem to the commit message
and why your patch fixes it.  A reader should understand why the
patch is necessary.


Thanks,
Corinna

On Aug 16 07:42, Alexey Lapshin wrote:
> ---
>  newlib/Makefile.am | 4 ++--
>  newlib/Makefile.in | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/newlib/Makefile.am b/newlib/Makefile.am
> index 126cf24c1..e29607ccd 100644
> --- a/newlib/Makefile.am
> +++ b/newlib/Makefile.am
> @@ -240,7 +240,7 @@ stmp-targ-include: config.status
>  	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	  $(MKDIR_P) targ-include/`dirname $$f`; \
>  	  cp $$i targ-include/$$f; \
>  	done
> @@ -334,7 +334,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
>  	    else true; fi ; \
>  	  done ; \
>  	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	  done ; \
> diff --git a/newlib/Makefile.in b/newlib/Makefile.in
> index 93a97b5fb..e2e4ed752 100644
> --- a/newlib/Makefile.in
> +++ b/newlib/Makefile.in
> @@ -49975,7 +49975,7 @@ stmp-targ-include: config.status
>  	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	  $(MKDIR_P) targ-include/`dirname $$f`; \
>  	  cp $$i targ-include/$$f; \
>  	done
> @@ -50064,7 +50064,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
>  	    else true; fi ; \
>  	  done ; \
>  	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	  done ; \
> -- 
> 2.34.1
> 

> From bfd83677213e2ee6910bd1026f521eb9a0773df0 Mon Sep 17 00:00:00 2001
> From: Alexey Lapshin <alexey.lapshin@espressif.com>
> Date: Wed, 16 Aug 2023 11:36:50 +0400
> Subject: [PATCH 1/3] newlib: fix potential issue of sys headers install
> 
> ---
>  newlib/Makefile.am | 4 ++--
>  newlib/Makefile.in | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/newlib/Makefile.am b/newlib/Makefile.am
> index 126cf24c1..e29607ccd 100644
> --- a/newlib/Makefile.am
> +++ b/newlib/Makefile.am
> @@ -240,7 +240,7 @@ stmp-targ-include: config.status
>  	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	  $(MKDIR_P) targ-include/`dirname $$f`; \
>  	  cp $$i targ-include/$$f; \
>  	done
> @@ -334,7 +334,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
>  	    else true; fi ; \
>  	  done ; \
>  	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	  done ; \
> diff --git a/newlib/Makefile.in b/newlib/Makefile.in
> index 93a97b5fb..e2e4ed752 100644
> --- a/newlib/Makefile.in
> +++ b/newlib/Makefile.in
> @@ -49975,7 +49975,7 @@ stmp-targ-include: config.status
>  	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
>  	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	  $(MKDIR_P) targ-include/`dirname $$f`; \
>  	  cp $$i targ-include/$$f; \
>  	done
> @@ -50064,7 +50064,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
>  	    else true; fi ; \
>  	  done ; \
>  	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
> -	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
> +	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
>  	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
>  	  done ; \
> -- 
> 2.34.1
> 


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

* Re: [PATCH] newlib: fix potential issue of sys headers install
  2023-08-16  7:57 ` Corinna Vinschen
@ 2023-08-24 15:38   ` Alexey Lapshin
  2023-08-25 12:55     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Lapshin @ 2023-08-24 15:38 UTC (permalink / raw)
  To: newlib; +Cc: jjohnstn

Hi Corinna,

The comment should be:

Fix the 'sed' command to precisely remove the prefix from the file path.

Do I need to resend whole patch?

Regards,
Alexey

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

* Re: [PATCH] newlib: fix potential issue of sys headers install
  2023-08-24 15:38   ` Alexey Lapshin
@ 2023-08-25 12:55     ` Corinna Vinschen
  2023-08-28  9:39       ` [PATCH v2] newlib: fix 'sed' for sys headers path prefix Alexey Lapshin
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-25 12:55 UTC (permalink / raw)
  To: Alexey Lapshin; +Cc: newlib, jjohnstn

On Aug 24 15:38, Alexey Lapshin wrote:
> Hi Corinna,
> 
> The comment should be:
> 
> Fix the 'sed' command to precisely remove the prefix from the file path.
> 
> Do I need to resend whole patch?

Yes, please.


Corinna


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

* [PATCH v2] newlib: fix 'sed' for sys headers path prefix
  2023-08-25 12:55     ` Corinna Vinschen
@ 2023-08-28  9:39       ` Alexey Lapshin
  2023-08-29 11:45         ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Lapshin @ 2023-08-28  9:39 UTC (permalink / raw)
  To: newlib; +Cc: jjohnstn

Precisely remove the prefix from the filepath.
---
 newlib/Makefile.am | 4 ++--
 newlib/Makefile.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 126cf24c1..e29607ccd 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -240,7 +240,7 @@ stmp-targ-include: config.status
 	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	  $(MKDIR_P) targ-include/`dirname $$f`; \
 	  cp $$i targ-include/$$f; \
 	done
@@ -334,7 +334,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index 6c7a7aeea..c3052acb9 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -50411,7 +50411,7 @@ stmp-targ-include: config.status
 	$(AM_V_at)s=machine/$(machine_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)s=sys/$(sys_dir)/include d= $(TARG_INCLUDE_CP_DIR)
 	$(AM_V_at)for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	  f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	  f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	  $(MKDIR_P) targ-include/`dirname $$f`; \
 	  cp $$i targ-include/$$f; \
 	done
@@ -50500,7 +50500,7 @@ install-data-local: install-toollibLIBRARIES install-multi $(INSTALL_DATA_LOCAL)
 	    else true; fi ; \
 	  done ; \
 	  for i in $(call rwildcard,$(srcdir)/libc/sys/$(sys_dir)/include/,*.h); do \
-	    f=`echo $$i | sed s:$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
+	    f=`echo $$i | sed s:^$(srcdir)/libc/sys/$(sys_dir)/include/::`; \
 	    $(MKDIR_P) $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	    $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/`dirname $$f`; \
 	  done ; \
-- 
2.34.1


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

* Re: [PATCH v2] newlib: fix 'sed' for sys headers path prefix
  2023-08-28  9:39       ` [PATCH v2] newlib: fix 'sed' for sys headers path prefix Alexey Lapshin
@ 2023-08-29 11:45         ` Corinna Vinschen
  0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2023-08-29 11:45 UTC (permalink / raw)
  To: Alexey Lapshin; +Cc: newlib

On Aug 28 09:39, Alexey Lapshin wrote:
> Precisely remove the prefix from the filepath.
> ---
>  newlib/Makefile.am | 4 ++--
>  newlib/Makefile.in | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

Pushed.

Thanks,
Corinna


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

end of thread, other threads:[~2023-08-29 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16  7:42 [PATCH] newlib: fix potential issue of sys headers install Alexey Lapshin
2023-08-16  7:57 ` Corinna Vinschen
2023-08-24 15:38   ` Alexey Lapshin
2023-08-25 12:55     ` Corinna Vinschen
2023-08-28  9:39       ` [PATCH v2] newlib: fix 'sed' for sys headers path prefix Alexey Lapshin
2023-08-29 11:45         ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).