-
-
Notifications
You must be signed in to change notification settings - Fork 33
Use fakeroot to build debs unless run as root #65
base: master
Are you sure you want to change the base?
Use fakeroot to build debs unless run as root #65
Conversation
I have no experience with those, but this can probably be extended so that fakeroot is used for the other package formats that have to be built as root to have proper ownerships. |
Investigating... the documentation change was made 17 years ago (!) to add a reference to the fakeroot software, and the original warning was about running as root, so I think the comment is about running as root and not about fakeroot being bad... :/ As for extending things, fakeroot is unique to Linux and IIRC dpkg is the only format on Linux that needs it... |
Thanks! I just saw that there are two more cases in epm.c for which a similar warning is emitted if not run as root (but do not even know what "Tru64" refers to nor ever have had to do with HP-UX...):
|
f25c71f
to
47ccec5
Compare
I updated the commit since an |
Use 'fakeroot' to build Debian packages when EPM is not run as root and the 'fakeroot' command is available. This ensures that ownerships and permisssions inside the generated package are correct.
47ccec5
to
5593c16
Compare
And just did another minor change ( |
@michaelweghorn Tru64 == Digital UNIX == OSF/1 - all products of the old Digital Equipment Corporation (DEC) of VAX fame. They were bought out by Compaq who was bought by HP a long long time ago now. HP-UX is/was HP's branded UNIX OS. I keep debating whether to pull support for the old legacy operating systems, but that would really just leave macOS and Linux and there are a lot of better options these days - pkgbuild/Homebrew/etc. on macOS and snapcraft/AppImage/docker/etc. on Linux - that handle the dependency and isolation/namespace issues much better... |
@michaelrsweet: Thanks for the explanation! |
As the documentation states, file ownerships and permissions inside Debian packages are incorrect unless epm is run as root or with the fakeroot command.
Use "fakeroot" inside epm to create the Debian packages to ensure that ownerships and permissions are correct without the user having to take care explicitly.
EPM's documentation currently states:
I am not sure what exactly this means. Does it refer to running as root or to running with fakeroot?
So far, I've never heard that using fakeroot introduces any security issues. fakeroot's man page itself says: