[CMake] CPack tar ownership

Eric Noulard eric.noulard at gmail.com
Sat Jan 8 09:22:16 EST 2011


2011/1/8 Tim St. Clair <timothysc at gmail.com>:
> This will be across several *nix platforms,
>
> I tried fakeroot but when I expand it has the euid of the user.

This is odd, by the way which version of CMake are you using?

On my ubuntu 10.04 box with CMake 2.8.3, I get:

A) cpack -G TGZ
leads to a tar+gz archive whose content its owned by the user.
(as printed out using 'tar ztvf file.tgz')

B) fakeroot cpack -G TGZ
leads to a tar+gz archive whose content its owned by root.
(as printed out using 'tar ztvf file.tgz')


An alternative solution would be to force ownership on extraction,
GNU tar has the option:
--no-same-owner
           extract files as yourself

which should do the job (I suppose you can be root when extracting).


Do you have any self contained example which exhibits the problem?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list