[cmake-developers] [CPack] CPackDeb and fakeroot

Raffi Enficiaud raffi.enficiaud at mines-paris.org
Tue Aug 25 18:56:08 EDT 2015


Le 26/08/15 00:45, Eric Noulard a écrit :
> [snip]
>     I see two technical solutions:
>     - either using the system tar: this would not work in the case of
>     cross compilation (and in some circumstances only) but would work in
>     the other case. I believe that all the debian packaging tools are
>     just using the system provided tar, so this should closely mimic the
>     debian-packaging machinery better,
>
>
> Cross-compiling is one thing, cross packaging is another.
> I think trying to cross-package is a very hard task (unless you simply
> create a bare archive (tar, zip, etc...)

Sorry I wanted to say cross-packaging. Still I think using the system 
default tar program is a good way to go.

>     - or using a CPACK variable to avoid having fakeroot executed
>
>
> seems awkward to disable black magic with another black magic spell.

I agree.

>
>     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.

Raffi



More information about the cmake-developers mailing list