FreshPorts has been using a chroot solution for some over a year. I now want to do that from within a jail for my development environment. Why am I jailing myself? Because I can. I want to keep my development environment separate and away from other similar developments. It’s just easier that way.
NOTE: this strategy works better with a slightly different solution.
Here are the entries from /etc/mount in the host system:
$ grep mydev /etc/fstab # for mydev jail in a jail /usr/local/jails/mydev.example.org/usr/local/FreshPorts/PORTS-SVN /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/usr/ports nullfs ro,nosuid,noexec 0 0 /usr/local/jails/basejail/usr/share/mk /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/usr/share/mk nullfs ro,nosuid,noexec 0 0 /usr/local/jails/basejail/usr/sbin /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/usr/sbin nullfs ro,nosuid 0 0 /usr/local/jails/basejail/usr/bin /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/usr/bin nullfs ro,nosuid 0 0 /usr/local/jails/basejail/libexec /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/libexec nullfs ro,nosuid 0 0 /usr/local/jails/basejail/usr/lib /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/usr/lib nullfs ro,nosuid 0 0 /usr/local/jails/basejail/sbin /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/sbin nullfs ro,nosuid 0 0 /usr/local/jails/basejail/lib /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/lib nullfs ro,nosuid 0 0 /usr/local/jails/basejail/bin /usr/local/jails/mydev.example.org/usr/local/FreshPorts/ports-jail/bin nullfs ro,nosuid 0 0
- I’m using ezjail
- ezjail is running off a non-standard location, /usr/local/jails, versus the standard location: /usr/jails
- My chroot location is /usr/local/FreshPorts/PORTS-SV within the jail
- The original solution, provided by zi@, used /dev, but I have found that this is not needed