2015-08-26 0:56 GMT+02:00 Raffi Enficiaud <[email protected]>:

[...]
>
>
>>     I see several workarounds/hacks:
>>     - executing with fakeroot in cpack first and in case of failure
>>     falling back to run tar without fakeroot
>>     - detect if the current user is root already
>>
>>
>> Detecting if user is already root doesn't seems to be such a big hack
>> it should even be robust as well and should be a 2 line modfication
>> in CPackDeb.cmake protecting it even detecting FAKEROOT alltogether.
>>
>>
> Right, but I am more concerned about the proper way of doing it and not
> the difficulty. From all this discussion, using fakeroot directly does not
> look to me as the right solution for having "root" in the tar, in the first
> place. So if we are also able to get rid of the fakeroot machinery in
> cpack, maybe it would be a better solution.


I agree, then the question is should every deb package built by CPack being
owned by root?

Currently people making deb with CPack without having fakeroot installed
get their
package with current user owning. i.e. fakeroot is not ALWAYS used.

Now if you find a way to set root ownership in archive created by CPackDeb
then every deb package
will have those right.

My opinion (from the various bug report related to deb ownership) is that
is OK since creating a deb including
whatever non-root user in it is a mistake.

So the "proper" way to go may  be to use libarchive directly in CPackDeb to
create tar in order to better control ownership of the created bits.

This is definitely more work, but this looks the proper way to me.

-- 
Eric
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to