changeset 293:73ac6bec36fe

Man page for "ftjail copy-jail"
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 18 Sep 2022 14:47:41 +0200
parents d40e6e40c315
children c2e2fed957ed
files Makefile docs/conf.py docs/man/ftjail-copy-skel.rst docs/man/ftjail.rst docs/man/index.rst pkg-plist sbin/ftjail
diffstat 7 files changed, 125 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Sep 18 14:10:40 2022 +0200
+++ b/Makefile	Sun Sep 18 14:47:41 2022 +0200
@@ -83,7 +83,7 @@
 .endfor
 
 post-install-DOCS-on:
-.for _mp in local-bsdtools.8 fzfs.8 fzfs-mount.8 fzfs-umount.8
+.for _mp in local-bsdtools.8 ftjail.8 ftjail-copy-skel.8 fzfs.8 fzfs-mount.8 fzfs-umount.8
 	${INSTALL_DATA} ${WRKSRC}/docs/_build/man/${_mp} ${STAGEDIR}${LOCALBASE}/man/man8/${_mp}
 .endfor
 
--- a/docs/conf.py	Sun Sep 18 14:10:40 2022 +0200
+++ b/docs/conf.py	Sun Sep 18 14:47:41 2022 +0200
@@ -72,6 +72,8 @@
 # (source start file, name, description, authors, manual section).
 man_pages = [
     ("man/local-bsdtools", "local-bsdtools", 'FreeBSD specific administration helper tools v%s' % release, [author], 8),
+    ("man/ftjail", "ftjail", "Management helper for thin jails", [author], 8),
+    ("man/ftjail-copy-skel", "ftjail-copy-skel", "Recursively copy skeleton contents", [author], 8),        
     ("man/fzfs", "fzfs", "A ZFS management helper tool", [author], 8),
     ("man/fzfs-mount", "fzfs-mount", "Mount ZFS datasets recursively", [author], 8),
     ("man/fzfs-umount", "fzfs-umount", "Unmount ZFS datasets recursively", [author], 8),
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/ftjail-copy-skel.rst	Sun Sep 18 14:47:41 2022 +0200
@@ -0,0 +1,61 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+ftjail-copy-skel
+================
+
+Synopsis
+--------
+
+**fzfs copy-skel** [**-A**] [**-L**] [**-M** `mountpoint`] [**-P**] [**-u**] `source-dataset` `snapshot-name` `target-dataset`
+
+
+Description
+-----------
+
+Recursively copy the snapshot `snapshot-name` of the RW skeleton dataset
+`source-dataset` into dataset `target-dataset`.
+
+Apply knowledge of the type and typical layout of the RW skeleton
+(e.g. handle the intermediate dataset of :file:`usr` properly).
+
+
+Options
+-------
+
+.. program:: ftjail copy-skel
+
+.. option:: -A
+
+   Set the ZFS property `canmount=noauto` for all datasets in the
+   target dataset.
+
+.. option:: -L
+
+   Copy dataset properties optimized for employing a :file:`skeleton`
+   subdirectory.
+
+.. option:: -M mountpoint
+
+   Set the `mountpoint` property for the TARGET-DS to `mountpoint`.
+   All children will be set to inherit it.
+
+.. option:: -P
+
+   Copy dataset properties optimized for direct mounts of skeleton
+   children over an already mounted base.
+
+.. option:: -u
+
+   Do not mount the target dataset `target-dataset` automatically.
+
+
+Environment
+-----------
+
+All environment variables that affect :command:`zfs` are effective also.
+
+
+See Also
+--------
+
+:manpage:`ftjail(8)`
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/man/ftjail.rst	Sun Sep 18 14:47:41 2022 +0200
@@ -0,0 +1,56 @@
+.. -*- coding: utf-8; indent-tabs-mode: nil; -*-
+
+ftjail
+======
+
+Synopsis
+--------
+
+**ftjail -hV**
+
+**ftjail subcommand**
+
+
+Subcommands
+-----------
+
+:manpage:`ftjail-datasets-tmpl(8)`
+
+    Create the ZFS template datasets
+
+:manpage:`ftjail-mount-tmpl(8)`
+
+    Canonically mount the RO base and the RW skeleton
+
+:manpage:`ftjail-umount-tmpl(8)`
+
+    Unmount mounted template datasets
+
+:manpage:`ftjail-interlink-tmpl(8)`
+
+    Create symbolic links between the RO base and the RW skeleton
+
+:manpage:`ftjail-populate(8)`
+
+    Populate a mounted base and skeleton
+
+:manpage:`ftjail-snapshot-tmpl(8)`
+
+    Create a ZFS snapshot for base and skeleton
+
+:manpage:`ftjail-copy-skel(8)`
+
+    Copy a ZFS skeleton recursively
+
+
+Implementation Notes
+--------------------
+
+All commands with the exception of :command:`ftjail populate` require
+ZFS as filesystem.
+
+
+Environment
+-----------
+
+All environment variables that affect :command:`zfs` are effective also.
--- a/docs/man/index.rst	Sun Sep 18 14:10:40 2022 +0200
+++ b/docs/man/index.rst	Sun Sep 18 14:47:41 2022 +0200
@@ -10,6 +10,8 @@
 .. toctree::
 
    local-bsdtools
+   ftjail
+   ftjail-copy-skel
    fzfs
    fzfs-mount
    fzfs-umount
--- a/pkg-plist	Sun Sep 18 14:10:40 2022 +0200
+++ b/pkg-plist	Sun Sep 18 14:47:41 2022 +0200
@@ -7,6 +7,8 @@
 sbin/fpkg
 sbin/fzfs
 %%DOCS%%man/man8/local-bsdtools.8.gz
+%%DOCS%%man/man8/ftjail.8.gz
+%%DOCS%%man/man8/ftjail-copy-skel.8.gz
 %%DOCS%%man/man8/fzfs.8.gz
 %%DOCS%%man/man8/fzfs-mount.8.gz
 %%DOCS%%man/man8/fzfs-umount.8.gz
--- a/sbin/ftjail	Sun Sep 18 14:10:40 2022 +0200
+++ b/sbin/ftjail	Sun Sep 18 14:47:41 2022 +0200
@@ -71,16 +71,7 @@
 
   snapshot-tmpl BASE-RO SKELETON-RW SNAPSHOT-NAME
 
-  copy-skel [ OPTIONS ] SOURCE-DS SNAPSHOT-NAME TARGET-DS
-
-    -A        Set "canmount=noauto" for all datasets in the target dataset
-    -L        Copy dataset properties optimized for employing a
-              "skeleton" subdirectory
-    -M MOUNTPOINT   Set the "mountpoint" property for the TARGET-DS to
-              MOUNTPOINT (children will inherit it)
-    -P        Copy dataset properties optimized for direct mounts
-              of skeleton children over an already mounted base
-    -u        Do not mount the target dataset automatically
+  copy-skel [-A] [-L] [-M MOUNTPOINT] [-P] [-u]  SOURCE-DS SNAPSHOT-NAME TARGET-DS
 
 ENVIRONMENT: