New: Fakeroot script relies on bash-isms, does not work with dash
https://bugs.busybox.net/show_bug.cgi?id=14661
Bug ID: 14661
Summary: Fakeroot script relies on bash-isms, does not work
with dash
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
On a Debian (bookworm) release, I get the following error message when building up the release tarball:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Generating filesystem image rootfs.tar
mkdir -p /home/gsmecher/winterland/buildroot-mkids/output/images
rm -rf /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar mkdir -p /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar rsync -auH --exclude=/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM /home/gsmecher/winterland/buildroot-mkids/output/target/ /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target echo '#!/bin/sh' > /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot echo "set -e" >> /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot echo "chown -h -R 0:0 /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target"
Quoted 1 line
Quoted 1 line
/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot PATH="/home/gsmecher/winterland/buildroot-mkids/output/host/bin:/home/gsmecher/winterland/buildroot-mkids/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" /home/gsmecher/winterland/buildroot-mkids/support/scripts/mkusers /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/full_users_table.txt /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target
Quoted 1 line
Quoted 1 line
/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot echo "/home/gsmecher/winterland/buildroot-mkids/output/host/bin/makedevs -d /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/full_devices_table.txt /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target"
Quoted 1 line
Quoted 1 line
/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot echo "rm -rf /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target/run/* /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target/run/.[^.]* /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target/tmp/* /home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target/tmp/.[^.]*"
Quoted 1 line
Quoted 1 line
/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot
printf ' \n' >>/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot
printf ' \n' >>/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot
printf ' (cd/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target;
find -print0 | LC_ALL=C sort -z | tar
--pax-option=exthdr.name=%%d/PaxHeaders/%%f,atime:=0,ctime:=0 -cf/home/gsmecher/winterland/buildroot-mkids/output/images/rootfs.tar --null
--xattrs-include='\''*'\'' --no-recursion -T - --numeric-owner)\n' >>/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot
chmod a+x/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot PATH="/home/gsmecher/winterland/buildroot-mkids/output/host/bin:/home/gsmecher/winterland/buildroot-mkids/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" FAKEROOTDONTTRYCHOWN=1/home/gsmecher/winterland/buildroot-mkids/output/host/bin/fakeroot --/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/fakeroot rootdir=/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target table='/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/full_devices_table.txt'
rm: refusing to remove '.' or '..' directory: skipping
'/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target/run/..'
rm: refusing to remove '.' or '..' directory: skipping
'/home/gsmecher/winterland/buildroot-mkids/output/build/buildroot-fs/tar/target/tmp/..'
make: *** [fs/tar/tar.mk:37:/home/gsmecher/winterland/buildroot-mkids/output/images/rootfs.tar] Error 1
My /bin/sh is symlinked to /bin/dash:
$ ls -ls /bin/sh 0 lrwxrwxrwx 1 root root 4 Mar 7 16:32 /bin/sh -> dash
When I change fs/common.mk to produce a shebang line using /bin/bash instead, the build completes as expected.
This is most likely a bash-ism in the fakeroot script - it is conceivably also possibly a dash limitation. In any case, the most plausible fixes are either
- for me to insist on /bin/bash for /bin/sh, which fixes the problem here and does not require buildroot alterations, or
- for buildroot to use /bin/bash instead of /bin/sh, which fixes the problem for anyone else who bumps into it.
I am happy with either but thought a bug report was polite.
thanks,
Graeme
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14661] Fakeroot script relies on bash-isms, does not work with dash
https://bugs.busybox.net/show_bug.cgi?id=14661
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |2022.02
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14661] Fakeroot script relies on bash-isms, does not work with dash
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14661
--- Comment #1 from Fabrice Fontaine <[email protected]> --- Thanks for your bug report, this should be fixed by
https://git.buildroot.net/buildroot/commit/?id=38c4f6b807e9b519922172089915559fb8642046
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14661] Fakeroot script relies on bash-isms, does not work with dash
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14661
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
CC| |[email protected]Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot