git: 16d599da7bfa - releng/15.0 - jail.8: Add creating a jail from distribution set
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Nov 2025 02:35:15 UTC
The branch releng/15.0 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=16d599da7bfad78894844d1eea164c5ba0ef9f4a
commit 16d599da7bfad78894844d1eea164c5ba0ef9f4a
Author: Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-11-07 18:38:54 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-11-14 02:34:41 +0000
jail.8: Add creating a jail from distribution set
Approved by: re (cperciva)
PR: 200803
MFC after: 3 days
Reviewed by: jamie
Differential Revision: https://reviews.freebsd.org/D53631
(cherry picked from commit d59903481dbaef9ef7e91ea4945d2355ae17c53a)
(cherry picked from commit 5d7cd576d99b99f460263d93929828d584d8f80c)
---
usr.sbin/jail/jail.8 | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8
index d44b7f66a64e..e27f9e3d1630 100644
--- a/usr.sbin/jail/jail.8
+++ b/usr.sbin/jail/jail.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2000, 2003 Robert N. M. Watson
.\" Copyright (c) 2008-2012 James Gritton
.\" All rights reserved.
@@ -23,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 15, 2025
+.Dd November 6, 2025
.Dt JAIL 8
.Os
.Sh NAME
@@ -1119,7 +1122,7 @@ process.
This manual page documents the configuration steps necessary to support
either of these steps, although the configuration steps may need to be
refined based on local requirements.
-.Ss "Setting up a Jail Directory Tree"
+.Ss Setting up a Jail Directory Tree From Source
To set up a jail directory tree containing an entire
.Fx
distribution, the following
@@ -1132,8 +1135,19 @@ mkdir -p $D
make world DESTDIR=$D
make distribution DESTDIR=$D
.Ed
+.Ss Setting up a Jail Directory Tree from Distribution Files
+To set up a jail directory tree containing an entire
+.Fx
+distribution, the following
+.Xr sh 1
+command script can be used:
+.Bd -literal -offset indent
+D=/here/is/the/jail
+mkdir -p $D
+tar -xf /usr/freebsd-dist/base.txz -C $D --unlink
+.Ed
.Pp
-In many cases this example would put far more in the jail than needed.
+In many cases these examples would put far more in the jail than needed.
In the other extreme case a jail might contain only one file:
the executable to be run in the jail.
.Pp