All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] fs: Change default fakeroot shell to bash
@ 2022-03-09 23:07 clayton.shotwell
  2022-03-10  7:40 ` David Laight
  0 siblings, 1 reply; 3+ messages in thread
From: clayton.shotwell @ 2022-03-09 23:07 UTC (permalink / raw)
  To: buildroot; +Cc: Clayton Shotwell, matthew.weber

From: Clayton Shotwell <clayton.shotwell@collins.com>

The addition of the removal of the /run and /tmp contents using a
non-POSIX pattern causes the file system creation to fail on systems
where /bin/sh does not default to bash. Switching the fakeroot script
to a bash shell addresses the problem.

Fixes:
https://bugs.buildroot.org/show_bug.cgi?id=14661

Signed-off-by: Clayton Shotwell <clayton.shotwell@collins.com>
---
 fs/common.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/common.mk b/fs/common.mk
index 45beb5ae7b..09edf41c21 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -172,7 +172,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
 		$$(BASE_TARGET_DIR)/ \
 		$$(TARGET_DIR)
 
-	echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
+	echo '#!/bin/bash' > $$(FAKEROOT_SCRIPT)
 	echo "set -e" >> $$(FAKEROOT_SCRIPT)
 
 	echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
-- 
2.29.0

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

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

* Re: [Buildroot] [PATCH 1/1] fs: Change default fakeroot shell to bash
  2022-03-09 23:07 [Buildroot] [PATCH 1/1] fs: Change default fakeroot shell to bash clayton.shotwell
@ 2022-03-10  7:40 ` David Laight
  2022-03-10 15:06   ` Shotwell, Clayton L Collins via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: David Laight @ 2022-03-10  7:40 UTC (permalink / raw)
  To: 'clayton.shotwell@rockwellcollins.com', buildroot
  Cc: Clayton Shotwell, matthew.weber

From: clayton.shotwell
> Sent: 09 March 2022 23:08
> 
> The addition of the removal of the /run and /tmp contents using a
> non-POSIX pattern causes the file system creation to fail on systems
> where /bin/sh does not default to bash. Switching the fakeroot script
> to a bash shell addresses the problem.

I'm not sure you can rely on /bin/bash existing.

Better to fix the script to not need bashisms.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

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

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

* Re: [Buildroot] [PATCH 1/1] fs: Change default fakeroot shell to bash
  2022-03-10  7:40 ` David Laight
@ 2022-03-10 15:06   ` Shotwell, Clayton L Collins via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Shotwell, Clayton L Collins via buildroot @ 2022-03-10 15:06 UTC (permalink / raw)
  To: David Laight, buildroot
  Cc: Weber, Matthew L                            Collins

David,

> -----Original Message-----
> From: David Laight <David.Laight@ACULAB.COM> 
> Sent: Thursday, March 10, 2022 1:41 AM
> To: Shotwell, Clayton L Collins <Clayton.Shotwell@collins.com>; buildroot@buildroot.org
> Cc: Shotwell, Clayton L Collins <Clayton.Shotwell@collins.com>; Weber, Matthew L Collins <Matthew.Weber@collins.com>
> Subject: [External] RE: [Buildroot] [PATCH 1/1] fs: Change default fakeroot shell to bash
>
> From: clayton.shotwell
> > Sent: 09 March 2022 23:08
> > 
> > The addition of the removal of the /run and /tmp contents using a 
> > non-POSIX pattern causes the file system creation to fail on systems 
> > where /bin/sh does not default to bash. Switching the fakeroot script 
> > to a bash shell addresses the problem.
>
> I'm not sure you can rely on /bin/bash existing.
>
> Better to fix the script to not need bashisms.

Bash is a required tool of Buildroot (according to the manual anyway) but I agree fixing the bashism would be the better
option. I see others have already pushed a fix so I will mark this patch as Rejected.

https://patchwork.ozlabs.org/project/buildroot/patch/20220310120256.GA11974@parad0x.org/

Thanks,
Clayton
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-03-10 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09 23:07 [Buildroot] [PATCH 1/1] fs: Change default fakeroot shell to bash clayton.shotwell
2022-03-10  7:40 ` David Laight
2022-03-10 15:06   ` Shotwell, Clayton L Collins via buildroot

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.