Le 26/08/15 01:07, Eric Noulard a écrit :
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.
Ok, but the created packages are not debian compliant, so we cannot
really say that the generated artifacts are Debian packages.
Now if you find a way to set root ownership in archive created by
CPackDeb then every deb package
will have those right.
Again two solutions:
- using system tar with the proper uid/gid options
- using and tweaking libarchive directly
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.
I agree.
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.
Ok, I just had a look to the cmlibarchive, cmakelib and cpackdeb
sources, it's not such a big deal neither to support that functionality.
One question remains though: in case of lzma or xy compression, cmake -E
tar is not used, and system tar is used instead (lines 414 in
cmCPackDebGenerator.cxx). This looks different from what you mentioned
about the BSD ar format using ar_append at the end of the same function.
LZMA and xy are supported by libarchive, so it should be possible to
avoid any call to tar or cmake -E in all cases.
Raffi
--
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