my code lab
README.org
#+TITLE: jails

"I'm sorry HAL, I'm afraid you can't do that." -Dave
* setup
#+BEGIN_EXAMPLE
/jails/share/lab.git
/jails/share/lab-submissions.git
#+END_EXAMPLE

Install the shared jail defaults once, before building or running any
jail. Each instance jail.conf includes it by absolute path:
#+BEGIN_EXAMPLE
cp share/jail.defaults.conf /etc/jail.conf.d/defaults.conf
#+END_EXAMPLE

* operate
The Justfile drives a jail through service(8), which finds its config by
name in =/etc/jail.conf.d=:
#+BEGIN_EXAMPLE
just install   # copy jail.conf to /etc/jail.conf.d/<name>.conf
just start     # service jail onestart <name>
just status    # running or stopped
just stop      # service jail onestop <name>
#+END_EXAMPLE

jails get either =origin.git= as =rw=, or =ro= with =submissions.git=
as =rw= depending on permissions. i.e. developer gets =rw= access to
=origin.git= whereas agent jails get =ro= access to =origin.git= and
=rw= access to =submissions.git=.

Also maybe it flips, so dev jails can't push to =submissions.git=
either... not sure if that would be advisable or not. It does seem
like it would be useful so I could do code review just by committing
on top of the code and pushing it.