From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 14661] New: Fakeroot script relies on bash-isms, does not work with dash
Date: Wed, 09 Mar 2022 18:18:35 +0000 [thread overview]
Message-ID: <bug-14661-163@https.bugs.busybox.net/> (raw)
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: unassigned@buildroot.uclibc.org
Reporter: gsmecher@threespeedlogic.com
CC: buildroot@uclibc.org
Target Milestone: ---
On a Debian (bookworm) release, I get the following error message when building
up the release tarball:
>>> 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"
>>
/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
>>
/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"
>>
/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/.[^.]*"
>>
/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
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2022-03-09 18:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 18:18 bugzilla [this message]
2022-03-09 19:12 ` [Buildroot] [Bug 14661] Fakeroot script relies on bash-isms, does not work with dash bugzilla
2022-03-12 17:18 ` bugzilla
2022-03-12 17:37 ` bugzilla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-14661-163@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--cc=buildroot@uclibc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox