[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ezjail] running cvsup in a jail
Le mardi 25 à 12:59, Joe a écrit :
> When I run cvsup from within a jail I get an error "can't write to a
> protected read-only location. I read the list archives and found
> thread on subject "portupgrade in a jail". The
> /usr/jails/basejail/usr/share/examples/cvsup/ports-supfile may need
> correcting in the same manner as /etc/make.config had for portupgrade.
> But I don't know enough about how ezjail works to figure it out.
> Would sure welcome some guidance from this list.
AIUI, this thread was more about tools that manage ports and wanted to
write to /usr/ports while they shouldn't need to, than about updating
the ports tree.
/usr/ports (in the jail) is a symlink to /basejail/usr/ports,
and /basejail is indeed read-only, so (by design) cvsup from inside the
jail can't update the jail's port tree.
If you want to update the port tree for all your jails, use
« ezjail-admin update -P » from the host. If you have only one jail for
which you want to have the latest tree, from this jail break
the /usr/ports -> /basejail/usr/ports link, and « portsnap fetch &&
portsnap extract » a brand new ports tree. If you are in an
intermediate situation, e.g. you have half of your jails in production
with a port tree that shouldn't move and the other half should have the
latest tree, you'll have to do some manual tweaking.
I suppose the cleanest way would be to have a /usr/jails/basejail/usr/ports-last
as well as a .../basejail/usr/ports-prod tree. Then, inside each jail,
you create a /usr/ports -> /basejail/usr/ports-XXX symlink, depending on
which ports tree you want. Setting this symlink looks like the perfect
use case for a jail flavour.