There is a bug in coreutils cp: if /proc is not mounted, cp -p can not set file times and exits with 1 exit code. The bug was found while creating FC5 OS image for OpenVZ virtual environment. It is a mainstream coreutils bug, full description from me is here: http://lists.gnu.org/archive/html/bug-coreutils/2006-04/msg00091.html The bug is confirmed by coreutils maintainer and the patch was made: http://lists.gnu.org/archive/html/bug-coreutils/2006-04/msg00095.html The fix has made it into the coreutils CVS (lib/utimens.c rev. 1.12): http://cvs.savannah.gnu.org/viewcvs/coreutils/lib/utimens.c?rev=1.12&root=coreutils&view=log I suggest to fix it in FC5 as well before newer coreutils comes out. It is a major fault to depend on /proc for file copying.
Please try this test update: https://www.redhat.com/archives/fedora-test-list/2006-May/msg00175.html Does that fix the problem for you?
Unfortunately not :( Below is the testing log. If you will look at the CVS page again, you'll notice that this change has been made after tagging 5.95: http://cvs.savannah.gnu.org/viewcvs/coreutils/lib/utimens.c?rev=1.12&root=coreutils&view=log Looks like you have to maintain it as a patch for now. kir@dionysos ~ $ sudo vzctl enter 555 entered into VPS 555 -bash-3.1# wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/i386/coreutils-5.95-1.1.i386.rpm --19:11:46-- http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/i386/coreutils-5.95-1.1.i386.rpm => `coreutils-5.95-1.1.i386.rpm' Resolving download.fedora.redhat.com... 209.132.176.20, 209.132.176.220, 209.132.176.221, ... Connecting to download.fedora.redhat.com|209.132.176.20|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3,679,906 (3.5M) [application/x-rpm] 100%[====================================>] 3,679,906 287.52K/s ETA 00:00 19:12:01 (252.43 KB/s) - `coreutils-5.95-1.1.i386.rpm' saved [3679906/3679906] -bash-3.1# rpm -Uhv coreutils-5.95-1.1.i386.rpm warning: coreutils-5.95-1.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 30c9ecf8 Preparing... ########################################### [100%] 1:coreutils ########################################### [100%] -bash-3.1# umount /proc -bash-3.1# ls -l /proc/ total 0 [*** BUG ***] -bash-3.1# touch /tmp/file touch: setting times of `/tmp/file': Function not implemented -bash-3.1# rpm -qf /bin/touch coreutils-5.95-1.1 -bash-3.1# ls -l /tmp/file -rw-r--r-- 1 root root 0 May 16 19:12 /tmp/file [*** BUG ***] -bash-3.1# cp -p /tmp/file /tmp/file2 cp: preserving times for `/tmp/file2': Function not implemented -bash-3.1# echo $? 1 -bash-3.1# rpm -q coreutils coreutils-5.95-1.1
Hmm looks like coreutils-5.95 release was done on May 12th, but still the fix, which was commited into the CVS a month before that, on Apr 15th, is not included into this release. Here is the diff itself: http://cvs.savannah.gnu.org/viewcvs/coreutils/lib/utimens.c?root=coreutils&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/coreutils/lib/utimens.c?root=coreutils&r1=1.11&r2=1.12&makepatch=1&diff_format=u
Please try coreutils-5.95-1.2 when it appears in updates-testing.