Tiny Core Linux
Tiny Core Base => TCB Bugs => Topic started by: vitex on January 01, 2010, 03:39:44 PM
-
UPDATE:
I seem to have stumbled upon an implementation difference between the GNU and Busybox versions of cpio. They seem to behave the same if given file names that do not begin with "/". For example,
( cd / ; echo etc/hostname | cpio -p -d /tmp/test )
works with both versions while
( cd / ; echo /etc/hostname | cpio -p -d /tmp/test )
works with GNU cpio but not Busybox cpio.
The following script was executed after booting the Micro Core 2.7 ISO:
tce-load -w -i cpio.tcz
echo
ls -l /bin/cpio
for program in /usr/local/bin/cpio /bin/cpio ; do
echo
echo === $program ===
rm -fR /tmp/test
echo /etc/hostname | $program -p -d /tmp/test
ls -lR /tmp/test/etc
done
GNU cpio (/usr/local/bin/cpio) copies /etc/hostname to /tmp/test/etc/hostname as expected, but Busybox cpio (/bin/cpio) does not:
lrwxrwxrwx 1 root root 7 Jan 1 22:54 /bin/cpio -> busybox
=== /usr/local/bin/cpio ===
1 block
/tmp/test/etc:
-rw-r--r-- 1 tc staff 4 Jan 1 23:21 hostname
=== /bin/cpio ===
cpio: /etc/hostname not created: newer or same age file exists
1 blocks
ls: /tmp/test/etc: No such file or directory
-
Is this used in TC's base?
Try the latest busybox version. If it still occurs, report it upstream to their developers.
-
I built the latest version of busybox and encountered the same behavior, so it is not a TC problem.
-
If we are talking about "busybox-1.14.3.tgz" as available on http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/ , then it is a switched-off configuration option.
See the ".config" file from August 25 inside the .tgz archive. It has the following entries for cpio:
CONFIG_CPIO=y
CONFIG_FEATURE_CPIO_O=y
# CONFIG_FEATURE_CPIO_P is not set
The third line determines "Support for passthrough mode," and it is disabled.
-
See the original message for a clarification.
-
vitex: might be still worth mentioning to the busybox devs if you haven't yet
Frank: a newer config might need to be uploaded
-
I have uploaded the config used by busybox-1.14.3 for Core.
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/busybox-1.14.3-config
Passthru was enabled for our build.