@fbsd1: from
qjail(8)()
In the situation where you want "all" the jails that you EVER create to have the same ports included as a standard, follow these steps. After running the "qjail install" sub-command and before you start creating all your production jails. Create a single directory tree type "standard" jail and populate it with your selection of standard ports. When your satisfied with the "standard" jail, delete the /usr/jails/newjail directory and copy the "standard" jail to create a new /usr/jails/newjail directory. cp -rf /usr/jails/standard /usr/jails/newjail. From that point on, all new jails created using the newjail template will contain your standard ports.
Yes, but as I understand, since "newjail" is a
template it will merely copy all the ports in it, to all other jails. What happens during update of ports? simply updating newjail will not be enough and all jails which exist must be updated
separately and individually. Am I wrong? If, on the other hand, newly created jails don't create new copies of ports from newjail but link to them (like basejail links into newjail) then an update of newjail alone will have updated the "base ports pool", and that is what I am looking for. As an example to the structure I am trying to describe, the depends list for
www/lighttpd includes (among others) these:
Code:
archivers/unzip converters/libiconv devel/autoconf devel/automake devel/cmake
devel/gmake devel/libtool devel/pkg-config lang/perl5.12 textproc/libxml2
But these ports are in the depends list of almost every mid-to-top level port. If these ports were installed and upgraded through a single jail and distributed to child jails, then there would be about 50% less ports to update in the jail hosting
www/lighttpd.
@unixgod: This is a great example of
zfs'
dedup feature, but my
primary aim is to have "least ammount of effort during update". In the explanation at previous paragraph,
dedup works great for duplicating the jail's ports but does not simplify the "updating ceremony". Correct me if I'm wrong, but an update of a port in one jail will just make
dedup go (no.of.jails - 1=new.dedup.number)+(new.separate.dedup.entry) until the same port in a second jail gets updated.
Re buildjail: I'm in the process of re-shuffling all my jails and
tinderbox is one of the jails (or chroot env) I plan. I have been running
ports-mgmt/portmaster with the
-g flag for some time so I already have a good collection of local-built packages to start with.
one jails port may be compiled with different options than another
Not an issue in my case, but thanks for the reminder.
@matoatlantis:
install desired ports from host to "yourbase" location (using PREFIX) and modify jail symlinks to point to "yourbase"
I doubt that a PREFIX modification in one jail will retain its consistency accross the
nullfs mounted child jail - that was one of the points of my question. Also, one must consider the fact that the child jail's
/var/db/pkg will have no record of ports provided through "yourbase", which will eventually cause problems.