config: use core.sharedRepository=2 by default
commit4a9ac282be550f0885991aebf618ee201fdcf58c
authorKyle J. McKay <mackyle@gmail.com>
Mon, 15 Mar 2021 05:26:09 +0000 (14 22:26 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 15 Mar 2021 05:26:09 +0000 (14 22:26 -0700)
tree0682be7e832fd711c5ca6dc13be3c20576580a06
parent778ea2061b34f43129d98c203b47bc3844fb1f1f
config: use core.sharedRepository=2 by default

Instead of initializing repositories using core.sharedRepository=1,
switch to using core.sharedRepository=2 by default.

Add an obscure setting that allows this to be controlled.

Make sure update-all-config.pl understands the new setting.

Since the umask is often set to something no more restrictive
than 002, in practice, the previous default of 1 was usually
acting like a default of 2.

However, in order to run something like git-daemon to serve
repositories over git: protocol while git-daemon is running as
the 'nobody' user, the repositories need to always be world
readable.  Setting core.sharedRepository=2 makes sure this
happens.

While it was mostly happening by default anyway thanks to the
behavior of core.sharedRepository=1 and the usual setting of
the umask to 002, make it explicit with core.sharedRepository=2.

With this new setting, accessing the repositories via non-Girocco
means directly via `git` with a umask that masks out all 'other'
permissions will no longer result in repositories that cannot be
served properly by a daemon running as the 'nobody' user.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Config.pm
Girocco/ProjPerm.pm
Girocco/Validator.pm
bin/create-private-area
docs/technical/gc.txt
jobd/update.sh
taskd/clone.sh
toolbox/update-all-config.pl