Hi All,

I am trying to unpack RPM, which has all files with root:root permissions. 
Unpacking is done in the environment, where user does not have root 
permissions. I am using something like this:

rpm2cpio /Users/david/tmp/RPMS/gcc+4.6.1.rpm | cpio -idmvu --insecure -R 
david:staff

Important flags:
--insecure # Install into location, which is pointed by symlink
-u # Overwrite destination files is such already exists
-R david:staff # Change file permissions to david:staff as there is no access 
to root:root

If I run this under "david" user it will fail at the end [1]. If I run it as 
root user, everything is okay. While on the Linux machines I do not have any 
problems unpacking such RPMS (holds root:root files) and making cpio to set my 
permissions on the files, I can't do that on Mac OS X. Some of the executables 
are zero-size files [2].

Any suggestions how to unpack RPM, which holds root:root permission files, 
using non-root user would be very welcomed. 

Thanks in advance and Merry Christmas!
David

[1]
./opt/gcc/4.6.1/bin/gfortran
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gfortran
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gfortran: Can't create 
'opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gfortran'
./opt/gcc/4.6.1/bin/gcc
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gcc
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gcc-4.6.1
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gcc-4.6.1: Can't create 
'opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-gcc-4.6.1'
./opt/gcc/4.6.1/bin/c++
./opt/gcc/4.6.1/bin/g++
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-c++
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-g++
./opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-g++: Can't create 
'opt/gcc/4.6.1/bin/x86_64-apple-darwin10.8.0-g++'

[2]
drwxr-xr-x  18 david  staff     612 Grd 25 00:36 .
drwxr-xr-x   8 david  staff     272 Grd 25 00:36 ..
-r-xr-xr-x   4 david  staff       0 Grd 25 00:36 c++
lrwxr-xr-x   1 david  staff       3 Grd 25 00:36 cc -> gcc
-r-xr-xr-x   1 david  staff    9504 Grd 25 00:36 cloog
-r-xr-xr-x   1 david  staff  431392 Grd 25 00:36 cpp
-r-xr-xr-x   4 david  staff       0 Grd 25 00:36 g++
-r-xr-xr-x   3 david  staff       0 Grd 25 00:36 gcc
-r-xr-xr-x   1 david  staff   51680 Grd 25 00:36 gcov
-r-xr-xr-x   2 david  staff       0 Grd 25 00:36 gfortran
-r-xr-xr-x   1 david  staff  119464 Grd 25 00:36 ppl-config
-r-xr-xr-x   1 david  staff   91472 Grd 25 00:36 ppl_lcdd
-r-xr-xr-x   1 david  staff   73448 Grd 25 00:36 ppl_pips
-r-xr-xr-x   4 david  staff       0 Grd 25 00:36 x86_64-apple-darwin10.8.0-c++
-r-xr-xr-x   4 david  staff       0 Grd 25 00:36 x86_64-apple-darwin10.8.0-g++
-r-xr-xr-x   3 david  staff       0 Grd 25 00:36 x86_64-apple-darwin10.8.0-gcc
-r-xr-xr-x   3 david  staff       0 Grd 25 00:36 
x86_64-apple-darwin10.8.0-gcc-4.6.1
-r-xr-xr-x   2 david  staff       0 Grd 25 00:36 
x86_64-apple-darwin10.8.0-gfortran______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
User Communication List                             rpm-users@rpm5.org

Reply via email to