arrakis tmp # id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video) arrakis tmp # cpio --version cpio (GNU cpio) 2.9 arrakis tmp # emerge -s -- cpio Searching... [ Results for search key : cpio ] [ Applications found : 1 ] * app-arch/cpio Latest version available: 2.9-r1 Latest version installed: 2.9-r1 Size of files: 740 kB Homepage: http://www.gnu.org/software/cpio/cpio.html Description: A file archival tool which can also read and write tar files License: GPL-3 arrakis tmp # ls -ld TEST drwxr-xr-x 4 bin root 4096 May 20 14:07 TEST arrakis tmp # ls -lAR TEST TEST: total 4108 drwxr-xr-x 2 bin root 4096 May 20 14:06 TMP drwxr-xr-x 2 bin root 4096 May 20 14:07 TMP2 -rw-r--r-- 1 bin root 4194304 May 20 11:44 test1 lrwxrwxrwx 1 bin root 5 May 20 11:45 test2 -> test1 lrwxrwxrwx 1 bin root 5 May 20 11:45 test3 -> testx TEST/TMP: total 0 -rw-r--r-- 1 root root 0 May 20 14:05 empty TEST/TMP2: total 0 arrakis tmp # find TEST -depth -print|cpio -pdmv / //TEST/TMP/empty //TEST/TMP //TEST/test2 //TEST/test3 //TEST/test1 //TEST/TMP2 //TEST 8192 blocks arrakis tmp # ls -ld /TEST drwxr-xr-x 4 root root 1024 May 20 14:13 /TEST arrakis tmp # ls -lAR /TEST /TEST: total 4115 drwxr-xr-x 2 root root 1024 May 20 14:13 TMP drwxr-xr-x 2 bin root 1024 May 20 14:07 TMP2 -rw-r--r-- 1 bin root 4194304 May 20 11:44 test1 lrwxrwxrwx 1 bin root 5 May 20 14:13 test2 -> test1 lrwxrwxrwx 1 bin root 5 May 20 14:13 test3 -> testx /TEST/TMP: total 0 -rw-r--r-- 1 root root 0 May 20 14:05 empty /TEST/TMP2: total 0 arrakis tmp # We can see that the directory's owner of /TEST and /TEST/TMP has changed. He isn't "bin" anymore. Reproducible: Always Steps to Reproduce: 1.log in as root (su) 2.mkdir test; touch test/f; chown bin test; find test -depth -print|cpio -pdmv /; ls -ld test /test 3. Actual Results: //test/f //test 0 blocks drwxr-xr-x 2 root root 1024 May 20 14:18 /test drwxr-xr-x 2 bin root 4096 May 20 14:18 test Expected Results: /test/f /test 0 blocks drwxr-xr-x 2 bin root 1024 May 20 14:18 /test drwxr-xr-x 2 bin root 4096 May 20 14:18 test Option '-v' lists filenames with '//' when destination dir is /. Is this an other bug?
please test cpio-2.9-r2
This bug has reappeared with 2.9-r2 (maybe earlier), please reopen it. I can reproduce it on x86 and amd64. Cf. bug 258863.
"re-appeared" implies it used to work. what was the last version that worked ?
*** Bug 258863 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > "re-appeared" implies it used to work. what was the last version that worked ? I just read, that this bug was closed as fixed more than half a year ago. I don't use cpio that regularly, Currently i only have access to 2.9-r{2,3}, both of which exhibit this issue.
cpio-2.11 seems to work correctly