Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222955 - app-arch/cpio-2.9-r1: pass-through copy (user root) don't preserve directory owner when they are not empty
Summary: app-arch/cpio-2.9-r1: pass-through copy (user root) don't preserve directory ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/bugs/index.p...
Whiteboard:
Keywords:
: 258863 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-20 12:22 UTC by Pascal Grudler
Modified: 2010-10-09 23:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Grudler 2008-05-20 12:22:42 UTC
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?
Comment 1 SpanKY gentoo-dev 2008-06-01 22:00:44 UTC
please test cpio-2.9-r2
Comment 2 Thomas 2009-02-14 00:00:30 UTC
This bug has reappeared with 2.9-r2 (maybe earlier), please reopen it.  I can reproduce it on x86 and amd64.  Cf. bug 258863.
Comment 3 SpanKY gentoo-dev 2009-02-14 00:36:05 UTC
"re-appeared" implies it used to work.  what was the last version that worked ?
Comment 4 SpanKY gentoo-dev 2009-02-14 00:36:12 UTC
*** Bug 258863 has been marked as a duplicate of this bug. ***
Comment 5 Thomas 2009-02-14 02:16:47 UTC
(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.
Comment 6 SpanKY gentoo-dev 2010-10-09 23:54:07 UTC
cpio-2.11 seems to work correctly