reporoot: introduce _global dir and fill with hooks
commitc5f7bc7161a765f9ff869b7d64a57dab002411c0
authorKyle J. McKay <mackyle@gmail.com>
Sat, 23 Dec 2017 01:00:12 +0000 (22 17:00 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 23 Dec 2017 01:00:12 +0000 (22 17:00 -0800)
treed52e0d925b7c588c4e06648225288a3851f9babd
parent874ff9266fe1c2c6c1b77a2c093369c6ff4a2f5c
reporoot: introduce _global dir and fill with hooks

The reporoot has an interesting property in that everything in it
(and its subdirectories) will be available both in and out of the
chroot.

Additionally, the contents will be available at the same absolute
path both in and out of the chroot.  (The objects/info/alternates
files take advantage of this property since they contain absolute
paths.)

Directory names in reporoot starting with "_" are protected from
access by all remote clients (they don't show and any attempt to
somehow access them anyway results in a "forbidden" response).

The "_recyclebin" directory takes advantage of this property.

Create a new "_global" directory under reporoot and at install time
make/update a "hooks" subdirectory there containing the hook scripts.

Be especially careful to atomically replace the scripts so that
once they've initially been installed, the scripts will always be
present even if they're in the middle of being updated.

Adjust the reports as necessary to handle the new "_global" directory.

With this change the hook scripts are installed/updated every time
"make install" gets run, but the modifications to actually use them
from the new _global/hooks location have not yet been made.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
install.sh
toolbox/reports/project-disk-use.sh
toolbox/reports/project-fsck-status.sh