この件があって、jailはqjailで管理している。
上記記事では触れなかったのだが、qjailにはもう一つ大きな利点がある。
qjailでは、jailのユーザランド更新にmake buildworldが不要なのである。
細かいところは後で述べる。
まずその使い方から。
qjailでのユーザランド更新
jailを止めたあとに、qjail update -bだけでOK。
jailを止めないで実行しようとしても、下記のように怒られる。
update -bはすぐに終わる。
$ sudo qjail update -b
Error: All jails have to be stopped.
This jail is running. example01
]$ sudo qjail stop example01
Jail successfully stopped example01
$ sudo qjail update -b
Deletion of sharedfs binaries successful for bin.
Deletion of sharedfs binaries successful for lib.
Deletion of sharedfs binaries successful for libexec.
Deletion of sharedfs binaries successful for sbin.
Deletion of sharedfs binaries successful for usr/bin.
Deletion of sharedfs binaries successful for usr/include.
Deletion of sharedfs binaries successful for usr/lib.
Deletion of sharedfs binaries successful for usr/libdata.
Deletion of sharedfs binaries successful for usr/libexec.
Deletion of sharedfs binaries successful for usr/sbin.
Deletion of sharedfs binaries successful for usr/lib32.
Copied host's binaries to sharedfs successfully for bin.
Copied host's binaries to sharedfs successfully for lib.
Copied host's binaries to sharedfs successfully for libexec.
Copied host's binaries to sharedfs successfully for sbin.
Copied host's binaries to sharedfs successfully for usr/bin.
Copied host's binaries to sharedfs successfully for usr/include.
Copied host's binaries to sharedfs successfully for usr/lib.
Copied host's binaries to sharedfs successfully for usr/libdata.
Copied host's binaries to sharedfs successfully for usr/libexec.
Copied host's binaries to sharedfs successfully for usr/sbin.
Copied host's binaries to sharedfs successfully for usr/lib32.
Host to sharedfs binaries update completed successfully.
$
qjail update -bとは
マニュアルから俺訳で引用すると:
freebsd-updateはホストしか調べてくれず、jailは対象外だ。ホストには最新の環境があるのに、jailのためにわざわざ make buildworld/installworldするのは次男の無駄無駄無駄。
だからして、ホストのバイナリをsharedfsにコピーできるようした。
原文は以下の通り。
-b The basic requirement of FreeBSD jails is the jail environment
and the host run the same version of the systems binaries. Since
the FreeBSD-update utility only inspects the host system to
determine the systems RELEASE level it's not applicable in a
jailed environment. Performing a make buildworld/installworld on
sharedfs's source is such a waste of effort and resources after
having done this already for the host system. This option makes
the buildworld/installworld obsolete for the qjail environment.
This option deletes all the system binaries from the sharedfs and
them copies the host's system binaries to sharedfs. It's intended
to be used after running the FreeBSD-update utility on the host
to apply security updates or to upgrade the GENERIC host from one
RELEASE to another newer RELEASE, or after performing a make
buildworld/installworld on the host updating its system binaries.
Basically update the host and copy your work to the sharedfs
getting both environments synchronized.
(snip)
FreeBSD 10.0 July 22, 2013 FreeBSD 10.0