GNOME Bugzilla – Bug 783965
Allow running jhbuild as root
Last modified: 2017-06-27 14:15:36 UTC
Running jhbuild as root immediately terminates the program, but some environments *do* need to run jhbuild as root in order to work properly — for instance, when running jhbuild inside a Docker image. You *can* run jhbuild as a non-privileged user, but then copying directories or files from outside the container will cause various permission errors. We still don't want newcomers to run jhbuild as root, and destroy their OS installation, of course. A simple solution would be to add an environment variable to allow running jhbuild as root, e.g. `export JHBUILD_USE_AS_ROOT=1` or, in a Dockerfile: `ENV JHBUILD_USE_AS_ROOT=1`.
Created attachment 354126 [details] [review] Allow running jhbuild as root In some environments, like a Docker container, it's perfectly acceptable to run Jhbuild as root; in some case, it's actually required in order to work at all without hacking around the file permissions. For this reason, we should modify the UID check performed at startup, and if there is a specific variable in the environment, keep running even as root.
Can you add a note about this environment variable to the documentation somewhere, so it's not totally hidden?
Created attachment 354319 [details] [review] Document the JHBUILD_RUN_AS_ROOT envvar
Review of attachment 354319 [details] [review]: This looks like a good place to add it. Thanks.
Review of attachment 354126 [details] [review]: OK then
Attachment 354126 [details] pushed as dc4e4e6 - Allow running jhbuild as root Attachment 354319 [details] pushed as a212218 - Document the JHBUILD_RUN_AS_ROOT envvar