coreutils cp utility broken compiled with musl
In the latest build of EasyOS I am getting file copy errors when
using 'cp'. This build is using a statically compiled coreutils
single-binary (with applets symlinked to it, just like busybox), that
was compiled in OE.
Here is an example:
# coreutils --coreutils-prog=cp -a -f /mnt/sdb1/projects/woof/woof-project/builds/quirky-out_amd64_amd64_oe_pyro_easy/sandbox3/rootfs-complete/var varX
coreutils: failed to preserve ownership for varX/local/pupdial/isp: Not supported
"isp" is a symlink to a folder, target with permissions '777'. That
is what causes the error message, though the copy does succeed.
Alright, trying busybox cp:
# rm -rf varX
# busybox cp -a -f /mnt/sdb1/projects/woof/woof-project/builds/quirky-out_amd64_amd64_oe_pyro_easy/sandbox3/rootfs-complete/var varX
...good, no error message.
OK, compiling coreutils with uClibc. I used a very old uClibc, refer to http://distro.ibiblio.org/easyos/project/aboriginal/, and bumped coreutils to 8.30. Have a static single binary, test it:
# rm -rf varX
# coreutils --coreutils-prog=cp -a -f /mnt/sdb1/projects/woof/woof-project/builds/quirky-out_amd64_amd64_oe_pyro_easy/sandbox3/rootfs-complete/var varX
...success!
Grumble, grumble, this reinforces my dislike of musl. I did a search
on the Internet, this bug has been reported over several years.