All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path
@ 2022-05-17 10:32 Lang Daniel via buildroot
  2022-07-26 21:31 ` Thomas Petazzoni via buildroot
  2022-08-29  6:22 ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: Lang Daniel via buildroot @ 2022-05-17 10:32 UTC (permalink / raw)
  To: buildroot

When changing permissions on all directories in the staging directory,
after copying sysroot, paths that contain spaces break the call to chmod.

With -print0 for find and -0 for xargs white spaces are correctly interpreted.

Signed-off-by: Daniel Lang <d.lang@abatec.at>
---
Backport to: 2022.02.x
---
 toolchain/helpers.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index ef8e9a5f64..eec46d44c6 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -150,7 +150,7 @@ copy_toolchain_sysroot = \
 	if test -n "$${SUPPORT_LIB_DIR}" ; then \
 		cp -a $${SUPPORT_LIB_DIR}/* $(STAGING_DIR)/lib/ ; \
 	fi ; \
-	find $(STAGING_DIR) -type d | xargs chmod 755
+	find $(STAGING_DIR) -type d -print0 | xargs -0 chmod 755
 
 #
 # Check the specified kernel headers version actually matches the
-- 
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path
  2022-05-17 10:32 [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path Lang Daniel via buildroot
@ 2022-07-26 21:31 ` Thomas Petazzoni via buildroot
  2022-07-27  6:36   ` Lang Daniel via buildroot
  2022-08-29  6:22 ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-26 21:31 UTC (permalink / raw)
  To: Lang Daniel via buildroot; +Cc: Lang Daniel

Hello Daniel,

On Tue, 17 May 2022 10:32:12 +0000
Lang Daniel via buildroot <buildroot@buildroot.org> wrote:

> When changing permissions on all directories in the staging directory,
> after copying sysroot, paths that contain spaces break the call to chmod.
> 
> With -print0 for find and -0 for xargs white spaces are correctly interpreted.
> 
> Signed-off-by: Daniel Lang <d.lang@abatec.at>
> ---
> Backport to: 2022.02.x
> ---
>  toolchain/helpers.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

To be honest, I am not sure this is sufficient to use a sysroot path
with white-space, and it's a scenario that we are not testing, so it's
likely to break in the future. But your patch doesn't hurt, so I've
applied it anyway.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path
  2022-07-26 21:31 ` Thomas Petazzoni via buildroot
@ 2022-07-27  6:36   ` Lang Daniel via buildroot
  2022-07-27  7:13     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Lang Daniel via buildroot @ 2022-07-27  6:36 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni

Hello Thomas,

> Hello Daniel,
>
> On Tue, 17 May 2022 10:32:12 +0000
> Lang Daniel via buildroot <buildroot@buildroot.org> wrote:
>
>> When changing permissions on all directories in the staging directory,
>> after copying sysroot, paths that contain spaces break the call to chmod.
>> 
>> With -print0 for find and -0 for xargs white spaces are correctly interpreted.
>> 
>> Signed-off-by: Daniel Lang <d.lang@abatec.at>
>> ---
>> Backport to: 2022.02.x
>> ---
>>  toolchain/helpers.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> To be honest, I am not sure this is sufficient to use a sysroot path
> with white-space, and it's a scenario that we are not testing, so it's
> likely to break in the future. But your patch doesn't hurt, so I've
> applied it anyway.

I came across this problem while using paho-mqtt-c with a staging path
that doesn't contain spaces, but the package creates
"$(STAGING_DIR)/usr/share/doc/Eclipse Paho C/" - which contains
spaces. When changing/updating the external toolchain that we use,
the subsequent build failed:

toolchain-external-custom  Copying external toolchain sysroot to staging...
Fixing symlink $(HOST_DIR)/arm-buildroot-linux-gnueabihf/sysroot/usr/bin/iptables-xml from /usr/sbin/xtables-legacy-multi to ../../usr/sbin/xtables-legacy-multi
chmod: cannot access '$(STAGING_DIR)/usr/share/doc/Eclipse': No such file or directory
chmod: cannot access 'Paho': No such file or directory
chmod: cannot access 'C': No such file or directory

>
> Thanks a lot!
>
> Thomas

Thanks for apply it!

Daniel
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path
  2022-07-27  6:36   ` Lang Daniel via buildroot
@ 2022-07-27  7:13     ` Thomas Petazzoni via buildroot
  2022-07-27  8:47       ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-27  7:13 UTC (permalink / raw)
  To: Lang Daniel; +Cc: buildroot

Hello Daniel,

On Wed, 27 Jul 2022 06:36:14 +0000
Lang Daniel <d.lang@abatec.at> wrote:

> I came across this problem while using paho-mqtt-c with a staging path
> that doesn't contain spaces, but the package creates
> "$(STAGING_DIR)/usr/share/doc/Eclipse Paho C/" - which contains
> spaces. When changing/updating the external toolchain that we use,
> the subsequent build failed:

Aaah! Thanks for the extra information, makes sense. I think it would
be good to fix this maho-mqtt-c package to not use paths with spaces,
though.

Thanks again!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path
  2022-07-27  7:13     ` Thomas Petazzoni via buildroot
@ 2022-07-27  8:47       ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2022-07-27  8:47 UTC (permalink / raw)
  To: Thomas Petazzoni, Lang Daniel; +Cc: buildroot



On 27/07/2022 09:13, Thomas Petazzoni via buildroot wrote:
> Hello Daniel,
> 
> On Wed, 27 Jul 2022 06:36:14 +0000
> Lang Daniel <d.lang@abatec.at> wrote:
> 
>> I came across this problem while using paho-mqtt-c with a staging path
>> that doesn't contain spaces, but the package creates
>> "$(STAGING_DIR)/usr/share/doc/Eclipse Paho C/" - which contains
>> spaces. When changing/updating the external toolchain that we use,
>> the subsequent build failed:
> 
> Aaah! Thanks for the extra information, makes sense. I think it would
> be good to fix this maho-mqtt-c package to not use paths with spaces,
> though.

  I don't think we need to do that. Paths with spaces happen. It shouldn't be a 
problem to have them in target or staging.

  Regards,
  Arnout

> 
> Thanks again!
> 
> Thomas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path
  2022-05-17 10:32 [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path Lang Daniel via buildroot
  2022-07-26 21:31 ` Thomas Petazzoni via buildroot
@ 2022-08-29  6:22 ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-08-29  6:22 UTC (permalink / raw)
  To: Lang Daniel via buildroot; +Cc: Lang Daniel

>>>>> "Lang" == Lang Daniel via buildroot <buildroot@buildroot.org> writes:

 > When changing permissions on all directories in the staging directory,
 > after copying sysroot, paths that contain spaces break the call to chmod.

 > With -print0 for find and -0 for xargs white spaces are correctly interpreted.

 > Signed-off-by: Daniel Lang <d.lang@abatec.at>
 > ---
 > Backport to: 2022.02.x

Committed to 2022.05.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-08-29  6:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 10:32 [Buildroot] [PATCH 1/1] toolchain: handle white spaces in sysroot path Lang Daniel via buildroot
2022-07-26 21:31 ` Thomas Petazzoni via buildroot
2022-07-27  6:36   ` Lang Daniel via buildroot
2022-07-27  7:13     ` Thomas Petazzoni via buildroot
2022-07-27  8:47       ` Arnout Vandecappelle
2022-08-29  6:22 ` 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.