Randy Barlow 57ab7b3
From 95574831e700bd481d5dbe918fde305585411535 Mon Sep 17 00:00:00 2001
Randy Barlow 57ab7b3
From: Randy Barlow <randy@electronsweatshop.com>
Randy Barlow 57ab7b3
Date: Thu, 11 Aug 2016 16:16:01 -0400
Randy Barlow 57ab7b3
Subject: [PATCH 2/2] Add a basic man page for the bodhi 2 cli.
Randy Barlow 57ab7b3
Randy Barlow 57ab7b3
---
Randy Barlow 57ab7b3
 docs/conf.py       |   6 +-
Randy Barlow 57ab7b3
 docs/index.rst     |   1 +
Randy Barlow 57ab7b3
 docs/man_bodhi.rst | 250 +++++++++++++++++++++++++++++++++++++++++++++++++++++
Randy Barlow 57ab7b3
 4 files changed, 255 insertions(+), 3 deletions(-)
Randy Barlow 57ab7b3
 create mode 100644 docs/man_bodhi.rst
Randy Barlow 57ab7b3
Randy Barlow 57ab7b3
diff --git a/docs/conf.py b/docs/conf.py
Randy Barlow 57ab7b3
index 12c6746..9f2b49b 100644
Randy Barlow 57ab7b3
--- a/docs/conf.py
Randy Barlow 57ab7b3
+++ b/docs/conf.py
Randy Barlow 57ab7b3
@@ -11,6 +11,7 @@
Randy Barlow 57ab7b3
 # All configuration values have a default; values that are commented out
Randy Barlow 57ab7b3
 # serve to show the default.
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
+import datetime
Randy Barlow 57ab7b3
 import sys, os
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
 # If extensions (or modules to document with autodoc) are in another directory,
Randy Barlow 57ab7b3
@@ -43,7 +44,7 @@ master_doc = 'index'
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
 # General information about the project.
Randy Barlow 57ab7b3
 project = u'bodhi'
Randy Barlow 57ab7b3
-copyright = u'2007-2014, Red Hat, Inc.'
Randy Barlow 57ab7b3
+copyright = u'2007-{}, Red Hat, Inc.'.format(datetime.datetime.utcnow().year)
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
 # The version info for the project you're documenting, acts as replacement for
Randy Barlow 57ab7b3
 # |version| and |release|, also used in various other places throughout the
Randy Barlow 57ab7b3
@@ -215,8 +216,7 @@ latex_documents = [
Randy Barlow 57ab7b3
 # One entry per manual page. List of tuples
Randy Barlow 57ab7b3
 # (source start file, name, description, authors, manual section).
Randy Barlow 57ab7b3
 man_pages = [
Randy Barlow 57ab7b3
-    ('index', 'bodhi', u'bodhi Documentation',
Randy Barlow 57ab7b3
-     [u'Luke Macken'], 1)
Randy Barlow 57ab7b3
+    ('man_bodhi', 'bodhi', u'manage Fedora updates', ['Randy Barlow', 'Luke Macken'], 1)
Randy Barlow 57ab7b3
 ]
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
 # If true, show URL addresses after external links.
Randy Barlow 57ab7b3
diff --git a/docs/index.rst b/docs/index.rst
Randy Barlow 57ab7b3
index b233638..fb2a3d9 100644
Randy Barlow 57ab7b3
--- a/docs/index.rst
Randy Barlow 57ab7b3
+++ b/docs/index.rst
Randy Barlow 57ab7b3
@@ -11,6 +11,7 @@ Contents:
Randy Barlow 57ab7b3
 .. toctree::
Randy Barlow 57ab7b3
    :maxdepth: 2
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
+   man_bodhi
Randy Barlow 57ab7b3
    services
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
 
Randy Barlow 57ab7b3
diff --git a/docs/man_bodhi.rst b/docs/man_bodhi.rst
Randy Barlow 57ab7b3
new file mode 100644
Randy Barlow 57ab7b3
index 0000000..7cc368b
Randy Barlow 57ab7b3
--- /dev/null
Randy Barlow 57ab7b3
+++ b/docs/man_bodhi.rst
Randy Barlow 57ab7b3
@@ -0,0 +1,250 @@
Randy Barlow 57ab7b3
+==================
Randy Barlow 57ab7b3
+bodhi CLI man page
Randy Barlow 57ab7b3
+==================
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Synopsis
Randy Barlow 57ab7b3
+========
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi`` COMMAND SUBCOMMAND [OPTIONS] [ARGS]...
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Description
Randy Barlow 57ab7b3
+===========
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi`` is the command line interface to bodhi, Fedora's update release management system. It can
Randy Barlow 57ab7b3
+be used to create or modify updates and overrides.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Options
Randy Barlow 57ab7b3
+=======
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Most of the commands will accept these three options:
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``--help``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Show help text and exit.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``--password <text>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    A password to authenticate as the user given by ``--user``.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``--staging``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Use the staging bodhi instance instead of the production instance.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``--user <username>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Many commands accept this flag to specify which user's updates should be operated upon.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Commands
Randy Barlow 57ab7b3
+========
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+There are two commands, ``overrides`` and ``updates``. They are described in more detail in their
Randy Barlow 57ab7b3
+own sections below.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi overrides <subcommand> [options] [args]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Provides commands to aid in management of build overrides. Supports subcommands ``query`` and
Randy Barlow 57ab7b3
+    ``save``, described below.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi updates <subcommand> [options] [args]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Provides an interface to manage updates. Supports subcommands ``comment``, ``download``,
Randy Barlow 57ab7b3
+    ``new``, ``query``, and ``request``, described below.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Overrides
Randy Barlow 57ab7b3
+=========
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+The ``overrides`` command allows users to manage build overrides.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi overrides query [options]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    The ``query`` subcommand provides an interface for users to query the bodhi server for existing
Randy Barlow 57ab7b3
+    overrides.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi overrides save [options] <nvr>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Save the build root given by ``<nvr>`` as a buildroot override. The ``save`` subcommand supports
Randy Barlow 57ab7b3
+    the following options:
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--duration <days>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        The number of days the override should exist, given as an integer.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--notes <text>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Notes on why this override is in place.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Updates
Randy Barlow 57ab7b3
+=======
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+The ``updates`` command allows users to interact with bodhi updates.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi updates comment [options] <update> <text>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Leave the given text as a comment on a bodhi update. The ``comment`` subcommand
Randy Barlow 57ab7b3
+    supports the following options:
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--karma [+1 | 0 | -1]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        The karma value you wish to contribute to the update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi updates download [options]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Download update(s) given by CVE(s), ID(s), or NVR(s). One of ``--cves``, ``--updateid``, or
Randy Barlow 57ab7b3
+    ``builds`` is required. The download subcommand supports the following options:
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--cves <cves>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        A comma-separated list of CVEs that identify updates you would like to download.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--updateid <ids>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        A comman-separated list of update IDs you would like to download.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--builds 
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        A comma-separated list of NVRs that identify updates you would like to download.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi updates new [options] <builds>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Create a new bodhi update containing the builds, given as a space separated list of NVRs. The
Randy Barlow 57ab7b3
+    ``new`` subcommand supports the following options:
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--type [security | bugfix | enhancement | newpackage]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        The type of the new update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--notes <text>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        The description of the update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--notes-file <path>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        A path to a file containing a description of the update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--bugs <bugs>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        A comma separated list of bugs to associate with this update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--close-bugs``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        If given, this flag will cause bodhi to close the referenced bugs automatically when the
Randy Barlow 57ab7b3
+        update reaches stable.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--request [testing | stable | upush]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        The repository requested for this update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--autokarma``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Enable autokarma for this update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--stable-karma <integer>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Configure the stable karma threshold for the given value.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--unstable-karma <integer>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Configure the unstable karma threshold for the given value.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--suggest [logout | reboot]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Suggest that the user logout or reboot upon applying the update.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--file <path>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        A path to a file containing all the update details.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi updates query [options]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Query the bodhi server for updates. The ``query`` subcommand supports the following options:
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--updateid <id>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for the update given by id.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--approved-since <timestamp>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates approved after the given timestamp.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--modified-since <timestamp>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates modified after the given timestamp.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--builds <builds>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates containing the given builds, given as a comma-separated list.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--bugs <bugs>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates related to the given bugs, given as a comma-separated list.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--critpath``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates submitted for the critical path.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--cves <cves>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates related to the given CVEs, given as a comma-separated list.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--packages <packages>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates related to the given packages, given as a comma-separated list.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--pushed``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates that have been pushed.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--pushed-since <timestamp>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates that have been pushed after the given timestamp.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--releases <releases>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates related to a list of releases, given as a comma-separated list.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--locked``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates that are currently locked.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--request [testing | stable | unpush]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates marked with the given request type.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--submitted-since <timestamp>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Query for updates that were submitted since the given timestamp.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--status [pending | testing | stable | obsolete | unpushed | processing]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Filter by status.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--suggest [logout | reboot]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Filter for updates that suggest logout or reboot to the user.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--type [newpackage | security | bugfix | enhancement]``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Filter by update type.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    ``--user 
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+        Filter for updates by the given username.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+``bodhi updates request [options] <update> <state>``
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    Request that the given update be changed to the given state. ``update`` should be given by
Randy Barlow 57ab7b3
+    update id, and ``state`` should be one of testing, stable, unpush, obsolete, or revoke.
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+Bugs
Randy Barlow 57ab7b3
+====
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+If you find bugs in bodhi (or in the mage page), please feel free to file a bug report or a pull
Randy Barlow 57ab7b3
+request::
Randy Barlow 57ab7b3
+
Randy Barlow 57ab7b3
+    https://github.com/fedora-infra/bodhi
Randy Barlow 57ab7b3
-- 
Randy Barlow 57ab7b3
2.7.4
Randy Barlow 57ab7b3