From 9cb9a31b4f516d01370ccfcfc1213d558ac0f441 Mon Sep 17 00:00:00 2001 From: Anne LoVerso Date: Tue, 17 Jun 2014 15:24:08 -0400 Subject: [PATCH] manpage: Add separate manpages for each command Using docker as a model, this update creates separate manpages for each OSTree command, such that the main manpage is not cluttered and the separate pages can provide more in-depth detail and exanples that might be useful to a user. Each page includes synopsis, description, example, and a list of options if needd. This update also alphabetizes the usage error output for ostree and ostree admin so that it matches the list on the manpage. --- doc/Makefile.am | 3 +- doc/ostree-admin-cleanup.xml | 68 ++++ doc/ostree-admin-config-diff.xml | 84 +++++ doc/ostree-admin-deploy.xml | 138 +++++++ doc/ostree-admin-init-fs.xml | 73 ++++ doc/ostree-admin-instutil.xml | 86 +++++ doc/ostree-admin-os-init.xml | 69 ++++ doc/ostree-admin-status.xml | 73 ++++ doc/ostree-admin-switch.xml | 83 +++++ doc/ostree-admin-undeploy.xml | 79 ++++ doc/ostree-admin-upgrade.xml | 100 +++++ doc/ostree-admin.xml | 102 +++++ doc/ostree-cat.xml | 70 ++++ doc/ostree-checkout.xml | 125 +++++++ doc/ostree-checksum.xml | 69 ++++ doc/ostree-commit.xml | 209 +++++++++++ doc/ostree-config.xml | 70 ++++ doc/ostree-diff.xml | 93 +++++ doc/ostree-fsck.xml | 93 +++++ doc/ostree-init.xml | 79 ++++ doc/ostree-log.xml | 89 +++++ doc/ostree-ls.xml | 115 ++++++ doc/ostree-prune.xml | 101 +++++ doc/ostree-pull-local.xml | 94 +++++ doc/ostree-pull.xml | 70 ++++ doc/ostree-refs.xml | 84 +++++ doc/ostree-remote.xml | 91 +++++ doc/ostree-reset.xml | 81 ++++ doc/ostree-rev-parse.xml | 71 ++++ doc/ostree-show.xml | 116 ++++++ doc/ostree-static-delta.xml | 100 +++++ doc/ostree-trivial-httpd.xml | 108 ++++++ doc/ostree.xml | 617 +++++++++++++++++++------------ src/ostree/main.c | 10 +- src/ostree/ot-builtin-admin.c | 12 +- 35 files changed, 3273 insertions(+), 252 deletions(-) create mode 100644 doc/ostree-admin-cleanup.xml create mode 100644 doc/ostree-admin-config-diff.xml create mode 100644 doc/ostree-admin-deploy.xml create mode 100644 doc/ostree-admin-init-fs.xml create mode 100644 doc/ostree-admin-instutil.xml create mode 100644 doc/ostree-admin-os-init.xml create mode 100644 doc/ostree-admin-status.xml create mode 100644 doc/ostree-admin-switch.xml create mode 100644 doc/ostree-admin-undeploy.xml create mode 100644 doc/ostree-admin-upgrade.xml create mode 100644 doc/ostree-admin.xml create mode 100644 doc/ostree-cat.xml create mode 100644 doc/ostree-checkout.xml create mode 100644 doc/ostree-checksum.xml create mode 100644 doc/ostree-commit.xml create mode 100644 doc/ostree-config.xml create mode 100644 doc/ostree-diff.xml create mode 100644 doc/ostree-fsck.xml create mode 100644 doc/ostree-init.xml create mode 100644 doc/ostree-log.xml create mode 100644 doc/ostree-ls.xml create mode 100644 doc/ostree-prune.xml create mode 100644 doc/ostree-pull-local.xml create mode 100644 doc/ostree-pull.xml create mode 100644 doc/ostree-refs.xml create mode 100644 doc/ostree-remote.xml create mode 100644 doc/ostree-reset.xml create mode 100644 doc/ostree-rev-parse.xml create mode 100644 doc/ostree-show.xml create mode 100644 doc/ostree-static-delta.xml create mode 100644 doc/ostree-trivial-httpd.xml diff --git a/doc/Makefile.am b/doc/Makefile.am index 40fa5620..228de4f3 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -108,7 +108,8 @@ include $(top_srcdir)/gtk-doc.make man1_MANS = if ENABLE_GTK_DOC -man1_MANS += ostree.1 ostree.repo.5 ostree.repo-config.5 +man1_MANS += ostree.1 ostree.repo.5 ostree.repo-config.5 ostree-admin-cleanup.1 ostree-admin-config-diff.1 ostree-admin-deploy.1 ostree-admin-init-fs.1 ostree-admin-instutil.1 ostree-admin-os-init.1 ostree-admin-status.1 ostree-admin-switch.1 ostree-admin-undeploy.1 ostree-admin-upgrade.1 ostree-admin.1 ostree-cat.1 ostree-checkout.1 ostree-checksum.1 ostree-commit.1 ostree-config.1 ostree-diff.1 ostree-fsck.1 ostree-init.1 ostree-log.1 ostree-ls.1 ostree-prune.1 ostree-pull-local.1 ostree-pull.1 ostree-refs.1 ostree-remote.1 ostree-reset.1 ostree-rev-parse.1 ostree-show.1 ostree-static-delta.1 ostree-trivial-httpd.1 + XSLTPROC_FLAGS = \ --nonet \ diff --git a/doc/ostree-admin-cleanup.xml b/doc/ostree-admin-cleanup.xml new file mode 100644 index 00000000..e91e1c46 --- /dev/null +++ b/doc/ostree-admin-cleanup.xml @@ -0,0 +1,68 @@ + + + + + + + + + ostree admin cleanup + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin cleanup + 1 + + + + ostree-admin-cleanup + Delete untagged deployments and repository objects + + + + + ostree admin cleanup + + + + + Description + + + OSTree sysroot cleans up other bootversions and old deployments. If/when a pull or deployment is interrupted, a partially written state may remain on disk. This command cleans up any such partial states. + + + + + Example + $ ostree admin cleanup + + diff --git a/doc/ostree-admin-config-diff.xml b/doc/ostree-admin-config-diff.xml new file mode 100644 index 00000000..dd1d17a8 --- /dev/null +++ b/doc/ostree-admin-config-diff.xml @@ -0,0 +1,84 @@ + + + + + + + + + ostree admin config-diff + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin config-diff + 1 + + + + ostree-admin-config-diff + Diff current /etc configuration versus default + + + + + ostree admin config-diff OPTIONS + + + + + Description + + + Prints the differences between the current /etc directory and the default configuration in /usr/etc. Newly added files (present in /etc but not in /usr/etc) will be prefixed with 'A'. Mnodified files will be prefixed with 'M', and deleted files with 'D'. + + + + + Options + + + + ="OSNAME" + + + If provided, specifies the operating system root. Default is the current one. + + + + + + + Example + $ ostree admin config-diff + M shadow + A example.txt + + diff --git a/doc/ostree-admin-deploy.xml b/doc/ostree-admin-deploy.xml new file mode 100644 index 00000000..2754122a --- /dev/null +++ b/doc/ostree-admin-deploy.xml @@ -0,0 +1,138 @@ + + + + + + + + + ostree admin deploy + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin deploy + 1 + + + + ostree-admin-deploy + Checkout a revision as the new default deployment + + + + + ostree admin deploy OPTIONS REFSPEC + + + + + Description + + + Takes a commit or revision REFSPEC, and queues the new deployment as default upon reboot. + + + + + Options + + + + ="OSNAME" + + + If provided, specifies the operating system root. Default is the current one. + + + + + ="FILENAME" + + + Use FILENAME as the origin, which is where OSTree will look for updated versions of the tree. + + + + + + + + Do not delete previous deployment. + + + + + + + + Import current /proc/cmdline. + + + + + ="KEY=VALUE" + + + Set kernel argument, like root=/dev/sda1; this overrides any earlier argument with the same name. + + + + + ="KEY=VALUE" + + + Append kernel argument; useful with e.g. console= that can be used multiple times. + + + + + + + Example + $ ostree admin status + * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1ce3.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + +$ ostree admin deploy gnome-ostree/buildmaster/x86_64-runtime + ostadmin: Creating deployment /ostree/deploy/gnome-ostree/deploy/7e382b11d213a402a5313e61cbc69dfd5ab93cb07.1 + ostadmin: Processing /etc: 3 modified, 0 removed, 29 added + Transaction complete: bootconfig swap: no deployment count change: 0) + +$ ostree admin status + gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.1 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + + + diff --git a/doc/ostree-admin-init-fs.xml b/doc/ostree-admin-init-fs.xml new file mode 100644 index 00000000..bac7ca42 --- /dev/null +++ b/doc/ostree-admin-init-fs.xml @@ -0,0 +1,73 @@ + + + + + + + + + ostree admin init-fs + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin init-fs + 1 + + + + ostree-admin-init-fs + Initialize a new root filesystem + + + + + ostree admin init-fs OPTIONS PATH + + + + + Description + + + Initialize an empty physical root filesystem in the designated PATH, with normal toplevels and correct permissions for each directory. Primarily useful for operating system installers. + + + + + Example + $ mkdir /example + $ ostree admin init-fs /example + $ ls /example + + boot   dev   home   ostree   proc   root   run   sys   tmp + + + diff --git a/doc/ostree-admin-instutil.xml b/doc/ostree-admin-instutil.xml new file mode 100644 index 00000000..349ced2d --- /dev/null +++ b/doc/ostree-admin-instutil.xml @@ -0,0 +1,86 @@ + + + + + + + + + ostree admin instutil + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin instutil + 1 + + + + ostree-admin-instutil + Utility functions intended primarily for operating system installation programs + + + + + ostree admin instutil SUBCOMMAND ARGS + + + + + Description + + + Use the subcommands to toggle admin installation utilities for selinux policies and kernel arguments. + + + + + + Subcommands + + + + selinux-ensure-labeled + + + Ensure all files and directories are labeled according to SELinux policy of the first deployment. First argument is the subpath and second argument is the prefix. + + + + + set-kargs + + + Replace the kernel arguments of the default deployment. + + + + + diff --git a/doc/ostree-admin-os-init.xml b/doc/ostree-admin-os-init.xml new file mode 100644 index 00000000..3dbc900c --- /dev/null +++ b/doc/ostree-admin-os-init.xml @@ -0,0 +1,69 @@ + + + + + + + + + ostree admin os-init + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin os-init + 1 + + + + ostree-admin-os-init + Initialize empty state for a given operating system + + + + + ostree admin os-init OSNAME + + + + + Description + + + Initializes an new state for an operating system. Ensures that the core subdirectories of /var (/tmp, /lib, /run, and /lock) exist and initialize the given OSNAME as OSTree root. Each deployment location is comprised of a single shared var and a set of deployments (chroots). + + + + + Example + $ ostree admin os-init gnome-ostree + ostree/deploy/gnome-ostree initialized as OSTree root + + diff --git a/doc/ostree-admin-status.xml b/doc/ostree-admin-status.xml new file mode 100644 index 00000000..599d47fd --- /dev/null +++ b/doc/ostree-admin-status.xml @@ -0,0 +1,73 @@ + + + + + + + + + ostree admin status + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin status + 1 + + + + ostree-admin-status + List deployments + + + + + ostree admin status + + + + + Description + + + Lists the deployments available to be booted into. Includes osname, the checksum followed by the deploy serial, and the refspec. An asterisk indicates the current booted deployment. + + + + + Example + $ ostree admin status + * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + + + diff --git a/doc/ostree-admin-switch.xml b/doc/ostree-admin-switch.xml new file mode 100644 index 00000000..4a09b711 --- /dev/null +++ b/doc/ostree-admin-switch.xml @@ -0,0 +1,83 @@ + + + + + + + + + ostree admin switch + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin switch + 1 + + + + ostree-admin-switch + Construct new tree from current origin and deploy it, if it changed + + + + + ostree admin switch REF + + + + + Description + + + Choose a different REF forom the current remote to track. This is the ref that will be "tracked" and upgraded with ostree admin upgrade. Like an upgrade, the operating system state will be preserved. + + + + + Options + + + + ="OSNAME" + + + If provided, specifies the operating system root. Default is the current one. + + + + + + + Example + + $ ostree admin switch fedostree/20/workstation/gnome/core + + diff --git a/doc/ostree-admin-undeploy.xml b/doc/ostree-admin-undeploy.xml new file mode 100644 index 00000000..98e72f1c --- /dev/null +++ b/doc/ostree-admin-undeploy.xml @@ -0,0 +1,79 @@ + + + + + + + + + ostree admin undeploy + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin undeploy + 1 + + + + ostree-admin-undeploy + Delete deployment at a given index + + + + + ostree admin undeploy INDEX + + + + + Description + + + Deletes the deployment at INDEX. INDEX must be in range and not reference the currently booted deployment. + + + + + Example + $ ostree admin status + * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + gnome-ostree ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime +$ ostree admin undeploy 1 + Transaction complete; bootconfig swap: no deployment count change: -1) + Freed objects: 326.5 kB + Deleted deployment ce19c41036cc45e49b0cecf6b157523c2105c4de1c.0 +$ ostree admin status + * gnome-ostree 67e382b11d213a402a5313e61cbc69dfd5ab93cb07.0 + origin refspec: gnome-ostree/buildmaster/x86_64-runtime + + diff --git a/doc/ostree-admin-upgrade.xml b/doc/ostree-admin-upgrade.xml new file mode 100644 index 00000000..ab2672b4 --- /dev/null +++ b/doc/ostree-admin-upgrade.xml @@ -0,0 +1,100 @@ + + + + + + + + + ostree admin upgrade + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin upgrade + 1 + + + + ostree-admin-upgrade + Construct new tree from current origin and deploy it, if it changed + + + + + ostree admin upgrade OPTIONS + + + + + Description + + + Downloads the latest version of the current ref from the build server and deploys it, if it changed. Reboot the machine for the changes to take effect. + + + + + Options + + + + ="OSNAME" + + + If provided, specifies the operating system root. Default is the current one. + + + + + , + + + Reboot after a successful upgrade. + + + + + + + + Permit deployment of chronologically older trees. + + + + + + + + Example + $ ostree admin upgrade + No update available. + + diff --git a/doc/ostree-admin.xml b/doc/ostree-admin.xml new file mode 100644 index 00000000..88a63edd --- /dev/null +++ b/doc/ostree-admin.xml @@ -0,0 +1,102 @@ + + + + + + + + + ostree admin + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree admin + 1 + + + + ostree-admin + Use one of the ostree admin commands + + + + + ostree admin SUBCOMMAND + + + + + Description + + + Use ostree admin subcommands. + + + + + Subcommands + + + cleanup + config-diff + deploy + init-fs + instutil + os-init + status + switch + undeploy + upgrade + + + + View manpages for each admin subcommand using, for example: + + + $ man ostree-admin cleanup + + + + Options + + + , + Usage help + + + + + ="PATH" + Creates a new OSTree sysroot at PATH + + + + diff --git a/doc/ostree-cat.xml b/doc/ostree-cat.xml new file mode 100644 index 00000000..c8ec1c9c --- /dev/null +++ b/doc/ostree-cat.xml @@ -0,0 +1,70 @@ + + + + + + + + + ostree cat + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree cat + 1 + + + + ostree-cat + Display or concatenate contents of files + + + + + ostree cat COMMIT PATH PATH + + + + + Description + + + This command functions much like the typical Unix "cat" command, in that it displays the contents of a file, or concatenates them given two or more files. However, this command requires the user to specify a commit - a checksum or refspec corresponding to a given build. If you use a refspec, OSTree will refer to the most recent commit, unless you specify a parent build using the carat (^) at the end of the refspec. It will then operate the command in that given commit. + + + + + + Example + $ ostree cat my-branch helloworld.txt + Hello, world! + + diff --git a/doc/ostree-checkout.xml b/doc/ostree-checkout.xml new file mode 100644 index 00000000..d1205e1f --- /dev/null +++ b/doc/ostree-checkout.xml @@ -0,0 +1,125 @@ + + + + + + + + + ostree checkout + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree checkout + 1 + + + + ostree-checkout + Check out a commit into a filesystem + + + + + ostree checkout OPTIONS COMMIT DESTINATION + + + + + Description + + + Checks out the given commit into the filesystem under directory DESTINATION. If DESTINATION is not specified, the COMMIT will become the destination checkout target. If COMMIT destination already exists, command will error unless option is selected. + + + + + Options + + + + , + + + Do not change file ownership or initialize extended attributes. + + + + + ="PATH" + + + Checkout sub-directory PATH. + + + + + + + + Keep existing directories and unchanged files, overwrite existing files. + + + + + + + + Do nothing if specified path does not exist. + + + + + + + + Process many checkouts from standard input. + + + + + ="FILE" + + + Process many checkouts from input file. + + + + + + + + Example + $ ostree checkout my-branch + $ ls + file1    file2    my-branch + + diff --git a/doc/ostree-checksum.xml b/doc/ostree-checksum.xml new file mode 100644 index 00000000..a6ed8956 --- /dev/null +++ b/doc/ostree-checksum.xml @@ -0,0 +1,69 @@ + + + + + + + + + ostree checksum + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree checksum + 1 + + + + ostree-checksum + Checksum a file or directory + + + + + ostree checksum FILE + + + + + Description + + + Generates a checksum for a given file or directory. + + + + + Example + $ ostree checksum file1 + 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc + + diff --git a/doc/ostree-commit.xml b/doc/ostree-commit.xml new file mode 100644 index 00000000..4469ce51 --- /dev/null +++ b/doc/ostree-commit.xml @@ -0,0 +1,209 @@ + + + + + + + + + ostree commit + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree commit + 1 + + + + ostree-commit + Commit a new revision + + + + + ostree commit OPTIONS --branch=BRANCH + + + + + Description + + + This allows you to commit changes to a branch. The specification of the branch is required. If no commit message is specified with then a text editor will be opened. The commit will be aborted if the commit subject is left empty. The command will print the checksum of a successful commit. + + + + + Options + + + , ="subject" + + + One line subject. + + + + + , ="body" + + + Full description. + + + + + , ="branch" + + + Branch. + + + + + ="NAME" + + + Overlay the given argument as a tree. + + + + + ="KEY=VALUE" + + + Append given key and value (in string format) to metadata. + + + + + ="KEY=VALUE" + + + Append given key and value (in string format) to detached metadata. + + + + + ="UID" + + + Set file ownership user id. + + + + + ="GID" + + + Set file ownership group id. + + + + + + + Do not import extended attributes. + + + + + + + + Optimize for commits of trees composed of hardlinks into the repository. + + + + + + + + When loading tar archives, automatically create parent directories as needed. + + + + + + + + If the contents are unchanged from previous commit, do nothing. + + + + + ="PATH" + + + File containing list of modifications to make permissions. + + + + + + + + Output more information in a KEY: VALUE format. + + + + + + + + Generate size information along with commit metadata. + + + + + ="key-id" + + + GPG Key ID with which to sign the commit (if have GPGME - GNU Privacy Guard Made Easy). + + + + + ="homedir" + + + GPG home directory to use when looking for keyrings (if have GPGME - GNU Privacy Guard Made Easy). + + + + + + + Example + $ ostree commit --branch=my-branch --subject="Initial commit" + 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc + + diff --git a/doc/ostree-config.xml b/doc/ostree-config.xml new file mode 100644 index 00000000..c2b2f09d --- /dev/null +++ b/doc/ostree-config.xml @@ -0,0 +1,70 @@ + + + + + + + + + ostree config + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree config + 1 + + + + ostree-config + Change configuration settings + + + + + ostree config OPERATION KEY VALUE + + + + + Description + + + Changes the configuration settings. Possible operations inlclude either "set" or "get". If OPERATION is "set", KEY and VALUE are required. If OPERATION is "get", only KEY is necessary. KEY must be of the form "sectionname.keyname". + + + + + + Example + $ ostree config get sectionname.keyname + keyvalue + + diff --git a/doc/ostree-diff.xml b/doc/ostree-diff.xml new file mode 100644 index 00000000..baaa343a --- /dev/null +++ b/doc/ostree-diff.xml @@ -0,0 +1,93 @@ + + + + + + + + + ostree diff + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree diff + 1 + + + + ostree-diff + Compare a directory against a revision + + + + + ostree diff OPTIONS REV TARGETDIR + + + + + Description + + + Compare directory TARGETDIR against revision REV. Shows files and directories modified, added, and deleted. If there is a file in TARGETDIR not in REV, it will show with an "A" for "added". If a file in REV is not in TARGETDIR, it shows "D" for "deleted". "M" for "modified" will also show. + + + + + Options + + + + + + Print various statistics. + + + + + + + Print filesystem diff. + + + + + + + Example + $ ostree diff my-branch^ my-branch + A /testdirectory + M /helloworld.txt +$ ostree diff my-branch my-branch^ + D /testdirectory + M /helloworld.txt + + \ No newline at end of file diff --git a/doc/ostree-fsck.xml b/doc/ostree-fsck.xml new file mode 100644 index 00000000..c93166b8 --- /dev/null +++ b/doc/ostree-fsck.xml @@ -0,0 +1,93 @@ + + + + + + + + + ostree fsck + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree fsck + 1 + + + + ostree-fsck + Check the repository for consistency + + + + + ostree fsck OPTIONS + + + + + Description + + + Checks the repository to verify the content integrity of commit objects. Looks for missing and corrupted objects and metadata, and validates directory structure and metadata. + + + + + Options + + + + , + + Only print error messages. + + + + + + + Remove corrupted objects. + + + + + + + + Example + $ ostree fsck + Enumerating objects... + Verifying content integrity of of 2 commit objects + 0/2572 objects + 2571/2572 objects + + diff --git a/doc/ostree-init.xml b/doc/ostree-init.xml new file mode 100644 index 00000000..ec1962c0 --- /dev/null +++ b/doc/ostree-init.xml @@ -0,0 +1,79 @@ + + + + + + + + + ostree init + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree init + 1 + + + + ostree-init + Initialize a new empty repository + + + + + ostree init OPTIONS + + + + + Description + + + Creates a new empty repository. + + + + + Options + + + + ="MODE" + + Initialize repository in given mode (bare, archive-z2). Default is "bare". + + + + + + + + diff --git a/doc/ostree-log.xml b/doc/ostree-log.xml new file mode 100644 index 00000000..51d2caf0 --- /dev/null +++ b/doc/ostree-log.xml @@ -0,0 +1,89 @@ + + + + + + + + + ostree log + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree log + 1 + + + + ostree-log + Show log starting at a commit or ref + + + + + ostree log OPTIONS REF + + + + + Description + + + Shows a log of commits to a given ref or branch. Includes commit checksum, timestamp, and commit message. + + + + + Options + + + + + + Show raw variant data. + + + + + + + Example + $ ostree log my-branch + commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07fbb8b71c2e84f79fa5d7dc + Date: 2014-06-12 13:42:54 +0000 + This is the second commit + + commit ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e + Date: 2014-06-12 11:20:08 +0000 + Initial commit + + + diff --git a/doc/ostree-ls.xml b/doc/ostree-ls.xml new file mode 100644 index 00000000..d67e7d74 --- /dev/null +++ b/doc/ostree-ls.xml @@ -0,0 +1,115 @@ + + + + + + + + + ostree ls + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree ls + 1 + + + + ostree-ls + List file paths + + + + + ostree ls OPTIONS COMMIT PATHS + + + + + Description + + + Prints a list of file paths within the given commit, and within the given path(s) if specified. The first letter of the file line output specifies the type: "-" for regular file, "d" for directory, "l" for symbolic link. See EXAMPLE section for more detail on the specific output. + + + + + Options + + + + , + + Do not recurse into directory arguments. + + + + + , + + Print directories recursively. + + + + + , + + Print checksum. + + + + + , + + Print extended attributes. + + + + + + + Print only filenames, NUL separated. + + + + + + + + Example + $ ostree ls my-branch + d00644 0 0 0 / + -00644 0 0 2 /helloworld.txt + d00755 0 0 0 /testdirectory + +Here, the first column is the file-type symbol (as explained in the DESCRIPTION section) followed by the S_IFMT file type. The next two columns (here: 0 0) are respectively the user ID and group ID for the file. After the break, the next number represents that file's standard size. The final column is the file path. + + diff --git a/doc/ostree-prune.xml b/doc/ostree-prune.xml new file mode 100644 index 00000000..08bd8c22 --- /dev/null +++ b/doc/ostree-prune.xml @@ -0,0 +1,101 @@ + + + + + + + + + ostree prune + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree prune + 1 + + + + ostree-prune + Search for unreachable objects + + + + + ostree prune OPTIONS + + + + + Description + + + This searches for unreachable objects in the current repository. If unreachable objects are found, the command delete them to free space. If the option is invoked, the command will just print unreachable objects and recommend deleting them. + + + + + Options + + + + + + + Only display unreachable objects; don't delete. + + + + + + + + Only compute reachability via refs. + + + + + =DEPTH + + + Only traverse DEPTH (integer) parents for each commit (default: -1=infinite). + + + + + + + + Example + $ ostree prune + Total objects: 25627 + No unreachable objects + + diff --git a/doc/ostree-pull-local.xml b/doc/ostree-pull-local.xml new file mode 100644 index 00000000..662bbaa8 --- /dev/null +++ b/doc/ostree-pull-local.xml @@ -0,0 +1,94 @@ + + + + + + + + + ostree pull-local + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree pull-local + 1 + + + + ostree-pull-local + Copy data from a source repository + + + + + ostree pull-local OPTIONS SOURCE_REPO REFS + + + + + Description + + + Copies data from a given repository; optimized for copies only between repositories on the same system. + + + + + Options + + + + ="REMOTE" + + + Add REMOTE to refspec. + + + + + + + + Do no invoke fsync(). + + + + + + + + Example + $ ostree pull-local /ostree/repo + Enumerating objects... + pull: 25709/25709 scanned, 0 objects copied + Writing 5 refs + + diff --git a/doc/ostree-pull.xml b/doc/ostree-pull.xml new file mode 100644 index 00000000..e513461f --- /dev/null +++ b/doc/ostree-pull.xml @@ -0,0 +1,70 @@ + + + + + + + + + ostree pull + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree pull + 1 + + + + ostree-pull + Download data from a remote repository + + + + + ostree pull REMOTE BRANCH + + + + + Description + + + Downloads all content corresponding to the provided branch or commit from the given remote. + + + + + Example + + $ ostree pull remote_name + + + diff --git a/doc/ostree-refs.xml b/doc/ostree-refs.xml new file mode 100644 index 00000000..77f226be --- /dev/null +++ b/doc/ostree-refs.xml @@ -0,0 +1,84 @@ + + + + + + + + + ostree refs + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree refs + 1 + + + + ostree-refs + List refs + + + + + ostree refs OPTIONS PREFIX + + + + + + Description + + Lists all refs available on the host. If pecified, PREFIX assigns the refspec prefix; default prefix is null, which lists all refs. + + + + + Options + + + + + + + Delete refs which match PREFIX, rather than listing them. + + + + + + + Example + $ ostree refs + my-branch + gnome-ostree/buildmaster/x86_64-runtime + + diff --git a/doc/ostree-remote.xml b/doc/ostree-remote.xml new file mode 100644 index 00000000..6d594c69 --- /dev/null +++ b/doc/ostree-remote.xml @@ -0,0 +1,91 @@ + + + + + + + + + ostree remote + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree remote + 1 + + + + ostree-remote + Control remote repository configuration + + + + + ostree remote OPTIONS OPERATION NAME args + + + + + Description + + + Changes remote respository configurations. Possible operations include either "add" or "show-url". If OPERATION is "add", a URL must be specified in [args]. The NAME refers to the name of the remote. + + + + + Options + + + + ="KEY=VALUE" + + + Set config option KEY=VALUE for remote. + + + + + + + + Disable GPG verification. + + + + + + + Example + $ ostree remote show-url local + http://192.168.122.1/repo + + diff --git a/doc/ostree-reset.xml b/doc/ostree-reset.xml new file mode 100644 index 00000000..5d2d6b9a --- /dev/null +++ b/doc/ostree-reset.xml @@ -0,0 +1,81 @@ + + + + + + + + + ostree reset + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree reset + 1 + + + + ostree-reset + Reset a ref to a previous commit + + + + + ostree reset REF REF_TO_RESET_TO + + + + + Description + + + Given a commit, this command will reset the ref to a previous specified commit. + + + + + Example + $ ostree log my-branch + commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07 + Date: 2014-06-12 13:42:54 +0000 + This is the second commit + + commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c + Date: 2014-06-12 11:20:08 +0000 + Initial commit + +$ ostree reset my-branch my-branch^ + $ ostree log my-branch + commit ce19c41036cc45e49b0cecf6b157523c2105c4de1c + Date: 2014-06-12 11:20:08 +0000 + Initial commit + + diff --git a/doc/ostree-rev-parse.xml b/doc/ostree-rev-parse.xml new file mode 100644 index 00000000..a66fa709 --- /dev/null +++ b/doc/ostree-rev-parse.xml @@ -0,0 +1,71 @@ + + + + + + + + + ostree rev-parse + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree rev-parse + 1 + + + + ostree-rev-parse + Output the target of a rev + + + + + ostree rev-parse REV PATH + + + + + + + Description + + + Given a REV, outputs the checksum of the latest commit of that revision. + + + + + Example + $ ostree rev-parse my-branch + ce19c41036cc45e49b0cecf6b157523c2105c4de1ce30101def1f759daafcc3e + + diff --git a/doc/ostree-show.xml b/doc/ostree-show.xml new file mode 100644 index 00000000..b2ee463d --- /dev/null +++ b/doc/ostree-show.xml @@ -0,0 +1,116 @@ + + + + + + + + + ostree show + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree show + 1 + + + + ostree-show + Output a metadata object + + + + + ostree show OPTIONS OBJECT + + + + + Description + + + Given an object, shows the metadata for that object. For a particular revision, it will show the data for the most recent commit to that revision. + + + + + Options + + + + + + + Show the "related" commits. + + + + + ="FILENAME" + + + Argument should be a filename and it will be interpreted as this type. + + + + + ="KEY" + + + Print string value of metadata key KEY for given commit. + + + + + ="KEY" + + + Print string value of detached metadata key KEY for given commit. + + + + + + + + Show raw variant data. + + + + + + + Example + $ ostree show my-branch + commit 67e382b11d213a402a5313e61cbc69dfd5ab93cb07 + Date: 2014-06-12 13:42:54 +0000 + + diff --git a/doc/ostree-static-delta.xml b/doc/ostree-static-delta.xml new file mode 100644 index 00000000..b28b4ed6 --- /dev/null +++ b/doc/ostree-static-delta.xml @@ -0,0 +1,100 @@ + + + + + + + + + ostree static-delta + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree static-delta + 1 + + + + ostree-static-delta + Manage static delta files + + + + + ostree static-delta OPTIONS REV + + + + + Description + + + If no options are selected, this command will list the static deltas in this repo. The options allow creating and applying delta fles. + + + + + Options + + + + ="REV" + + + Create delta from revision REV. + + + + + ="REV" + + + Create delta to revision REV. + + + + + ="PATH" + + + Apply delta from PATH. + + + + + + + + Example + $ ostree static-delta + (No static deltas) + + diff --git a/doc/ostree-trivial-httpd.xml b/doc/ostree-trivial-httpd.xml new file mode 100644 index 00000000..0b6a3056 --- /dev/null +++ b/doc/ostree-trivial-httpd.xml @@ -0,0 +1,108 @@ + + + + + + + + + ostree trivial-httpd + OSTree + + + + Developer + Colin + Walters + walters@verbum.org + + + + + + ostree trivial-httpd + 1 + + + + ostree-trivial-httpd + Simple webserver + + + + + ostree trivial-httpd OPTIONS DIR + + + + + + Description + + + This runs a simple webserver and keeps it running until killed. If DIR is not specified, it defaults to the current directory. + + + + + Options + + + + , + + + Fork into background when ready. + + + + + + + + Automatically exit when directory is deleted. + + + + + ,="PATH" + + + Write port number to PATH (- for standard output). + + + + + + + + Force range requests by only serving half of files. + + + + + + + + Example + $ ostree trivial-httpd + + diff --git a/doc/ostree.xml b/doc/ostree.xml index 82eaf063..00ca7f74 100644 --- a/doc/ostree.xml +++ b/doc/ostree.xml @@ -1,287 +1,424 @@ + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> - - ostree - OSTree + + ostree + OSTree - - - Developer - Colin - Walters - walters@verbum.org - - - + + + Developer + Colin + Walters + walters@verbum.org + + + - - ostree - 1 - + + ostree + 1 + - - ostree - Manage multiple bootable versioned filesystem trees - + + ostree + Manage multiple bootable versioned filesystem trees + - - - ostree COMMAND OPTIONS - - + + + ostree COMMAND OPTIONS + + - - Description + + Description - - OSTree is a tool for managing multiple bootable - versioned filesystem trees, or just "tree" for - short. In the OSTree model, operating systems no - longer live in the physical "/" root directory. - Instead, they parallel install to the new toplevel - /ostree directory. Each - installed system gets its own - /ostree/deploy/osname - directory. - - - Unlike rpm or - dpkg, OSTree is only aware of - complete filesystem trees. It has no built-in - knowledge of what components went into creating the - filesystem tree. - - - It is possible to use OSTree in several modes; the - most basic form is to replicate pre-built trees from - a build server. Usually, these pre-built trees are - derived from packages. You might also be using - OSTree underneath a higher level tool which computes - filesystem trees locally. - - - It must be emphasized that OSTree only supports - read-only trees. To change to - a different tree (upgrade, downgrade, install - software), a new tree is checked out, and a 3-way - merge of configuration is performed. The currently - running tree is not ever modified; the new tree will - become active on a system reboot. - - + + OSTree is a tool for managing multiple bootable + versioned filesystem trees, or just "tree" for + short. In the OSTree model, operating systems no + longer live in the physical "/" root directory. + Instead, they parallel install to the new toplevel + /ostree directory. Each + installed system gets its own + /ostree/deploy/osname + directory. + + + Unlike rpm or + dpkg, OSTree is only aware of + complete filesystem trees. It has no built-in + knowledge of what components went into creating the + filesystem tree. + + + It is possible to use OSTree in several modes; the + most basic form is to replicate pre-built trees from + a build server. Usually, these pre-built trees are + derived from packages. You might also be using + OSTree underneath a higher level tool which computes + filesystem trees locally. + + + It must be emphasized that OSTree only supports + read-only trees. To change to + a different tree (upgrade, downgrade, install + software), a new tree is checked out, and a 3-way + merge of configuration is performed. The currently + running tree is not ever modified; the new tree will + become active on a system reboot. + - - Options + + To see the man page for a command run man ostree COMMAND or man ostree-admin COMMAND + + - The following options are understood: + + Options - - - + The following options are understood: - For most commands, - when run as non-root, repository is - required. If - ostree is run as - root, it is assumed operations will be - performed on the - /sysroot/ostree/repo - repository. - - + + + - + + For most commands, + when run as non-root, repository is + required. If + ostree is run as + root, it is assumed operations will be + performed on the + /sysroot/ostree/repo + repository. + + + + - System administrators will primarily interact - with OSTree via the subcommand ostree - admin. + + Commands - - - admin os-init NAME + System administrators will primarily interact + with OSTree via the subcommand ostree + admin. - Initialize the - deployment location for an operating - system with name - NAME. Each - deployment location is comprised of a - single shared var - and a set of - deployments (chroots). - - - admin init-fs PATH + + + ostree-admin-cleanup1 + + +  Delete untagged + deployments and repository objects. + + - Initialize a root filesystem - in PATH by creating top level directories with - proper permissions. - - - admin deploy + + ostree-admin-config-diff1 - This is a relatively - low level command - takes a particular - commit or revision, and sets it up for - the next boot. - - - admin undeploy INDEX + +  See changes to + /etc as compared + to the current default (from + /usr/etc). + + - Remove the previously - INDEX - deployed tree from the bootloader - configuration. - - - admin cleanup + + ostree-admin-deploy1 - Delete untagged - deployments and repository objects. - - - - admin upgrade + +  Takes a particular + commit or revision, and sets it up for + the next boot. + + - If you are replicating - from a build server, this command will - download the latest version for the - current ref, and deploy it. Reboot - the system for the changes to take - effect. - - - admin status + + ostree-admin-init-fs1 - Show and list the deployments. - - - - admin switch + +  Initialize a root filesystem + in a specified path. + + - Choose a different ref - to track from the same remote as the - current tree. - - - admin config-diff + + ostree-admin-instutil1 - See changes to - /etc as compared - to the current default (from - /usr/etc). - - - + +  Utility functions intended primarily for operating system installation programs + + - Both administrators and operating system - builders may interact with OSTree via the regular - filesystem manipulation commands. - - - - - init + + ostree-admin-os-init1 - Initialize a new - repository. Must be given the path to - an existing (empty) directory. If you - want to serve a repository over plain - HTTP, use - archive-z2 for - - - - diff + +  Initialize the + deployment location for an operating + system with a specified name. + + - Concisely list - differences between the given refs, - without checking them out into the - physical filesystem. If only one ref - is provided, the parent commit will be - assumed to be the diff source. - - - - commit + + ostree-admin-status1 - Given one or more - trees (from the local filesystem, a - tarball, or a specified revision for - example), create a new commit using those contents. - - - - log + +  Show and list the deployments. + + - Show revision log. - - - ls + + ostree-admin-switch1 - List the contents of a given commit. - - - fsck + +  Choose a different ref + to track from the same remote as the + current tree. + + - Check a repository for consistency. - - - remote + + ostree-admin-undeploy1 - Manipulate remote archive configuration. - - - rev-parse + +  Remove the previously + INDEX + deployed tree from the bootloader + configuration. + + - Show the SHA256 corresponding to a given rev. - - - show + + ostree-admin-upgrade1 - Given an OSTree SHA256 checksum, display its contents. - - + +  Download the latest version for the + current ref, and deploy it. + + + - + Both administrators and operating system + builders may interact with OSTree via the regular + filesystem manipulation commands. + + + + + ostree-cat1 - - GPG verification + +  Concatenate contents of files + + - OSTree supports signing commits with GPG. The - set of trusted keys is stored as keyring files in - /usr/share/ostree/trusted.gpg.d. Any key in - any keyring in that directory may be used to sign commits. - - + + ostree-checkout1 - - See Also - - ostree.repo5 - - + +  Check out a commit into a filesystem tree. + + + + ostree-checksum1 + + +  Gives checksum of any file. + + + + + ostree-commit1 + + +  Given one or more + trees, create a new commit using those contents. + + + + + ostree-config1 + + +  Change settings. + + + + + ostree-diff1 + + +  Concisely list + differences between the given refs. + + + + + ostree-fsck1 + + +  Check a repository for consistency. + + + + + ostree-init1 + + +  Initialize a new repository. + + + + + ostree-log1 + + +  Show revision log. + + + + + ostree-ls1 + + +  List the contents of a given commit. + + + + + ostree-prune1 + + +  Search for unreachable objects. + + + + + ostree-pull-local1 + + +  Copy data from source-repo. + + + + + ostree-pull1 + + +  Download data from remote repo. If you have libsoup. + + + + + ostree-refs1 + + +  List refs. + + + + + ostree-remote1 + + +  Manipulate remote archive configuration. + + + + + ostree-reset1 + + +  Reset a ref to a previous commit. + + + + + ostree-rev-parse1 + + +  Show the SHA256 corresponding to a given rev. + + + + + ostree-show1 + + +  Given an OSTree SHA256 checksum, display its contents. + + + + + ostree-static-delta1 + + +  Manage static delta files. + + + + + ostree-trivial-httpd1 + + +  Simple webserver. + + + + + + + Examples + + For specific examples, please see the man page regarding the specific ostree command. For example: + + + man ostree init or man ostree-admin status + + + + + GPG verification + + + OSTree supports signing commits with GPG. The + set of trusted keys is stored as keyring files in + /usr/share/ostree/trusted.gpg.d. Any key in + any keyring in that directory may be used to sign commits. + + + + + See Also + + ostree.repo5 + + diff --git a/src/ostree/main.c b/src/ostree/main.c index 5463ce1b..b16d8c12 100644 --- a/src/ostree/main.c +++ b/src/ostree/main.c @@ -35,23 +35,23 @@ static OstreeCommand commands[] = { { "admin", ostree_builtin_admin, OSTREE_BUILTIN_FLAG_NO_REPO }, { "cat", ostree_builtin_cat, 0 }, - { "commit", ostree_builtin_commit, 0 }, - { "config", ostree_builtin_config, 0 }, { "checkout", ostree_builtin_checkout, 0 }, { "checksum", ostree_builtin_checksum, OSTREE_BUILTIN_FLAG_NO_REPO }, + { "commit", ostree_builtin_commit, 0 }, + { "config", ostree_builtin_config, 0 }, { "diff", ostree_builtin_diff, 0 }, { "fsck", ostree_builtin_fsck, 0 }, { "init", ostree_builtin_init, OSTREE_BUILTIN_FLAG_NO_CHECK }, { "log", ostree_builtin_log, 0 }, { "ls", ostree_builtin_ls, 0 }, - { "refs", ostree_builtin_refs, 0 }, - { "reset", ostree_builtin_reset, 0 }, { "prune", ostree_builtin_prune, 0 }, + { "pull-local", ostree_builtin_pull_local, 0 }, #ifdef HAVE_LIBSOUP { "pull", ostree_builtin_pull, 0 }, #endif - { "pull-local", ostree_builtin_pull_local, 0 }, + { "refs", ostree_builtin_refs, 0 }, { "remote", ostree_builtin_remote, 0 }, + { "reset", ostree_builtin_reset, 0 }, { "rev-parse", ostree_builtin_rev_parse, 0 }, { "show", ostree_builtin_show, 0 }, { "static-delta", ostree_builtin_static_delta, 0 }, diff --git a/src/ostree/ot-builtin-admin.c b/src/ostree/ot-builtin-admin.c index 9da8f77b..f7dce93a 100644 --- a/src/ostree/ot-builtin-admin.c +++ b/src/ostree/ot-builtin-admin.c @@ -38,16 +38,16 @@ typedef struct { } OstreeAdminCommand; static OstreeAdminCommand admin_subcommands[] = { - { "os-init", ot_admin_builtin_os_init }, + { "cleanup", ot_admin_builtin_cleanup }, + { "config-diff", ot_admin_builtin_diff }, + { "deploy", ot_admin_builtin_deploy }, { "init-fs", ot_admin_builtin_init_fs }, { "instutil", ot_admin_builtin_instutil }, - { "deploy", ot_admin_builtin_deploy }, - { "undeploy", ot_admin_builtin_undeploy }, - { "upgrade", ot_admin_builtin_upgrade }, - { "cleanup", ot_admin_builtin_cleanup }, + { "os-init", ot_admin_builtin_os_init }, { "status", ot_admin_builtin_status }, { "switch", ot_admin_builtin_switch }, - { "config-diff", ot_admin_builtin_diff }, + { "undeploy", ot_admin_builtin_undeploy }, + { "upgrade", ot_admin_builtin_upgrade }, { NULL, NULL } };