[openstack-keystone] add man pages
Alan Pevec
apevec at fedoraproject.org
Fri Jun 29 23:04:38 UTC 2012
commit f4d02733208375702e01df4fcfd349e1219d41c0
Author: Alan Pevec <apevec at redhat.com>
Date: Fri Jun 22 18:08:57 2012 +0200
add man pages
and move manual to -doc subpackage
0001-fix-man-page-build.patch | 137 ++++++++++++++++++++++++++++++++++++++++
0002-fix-sphinx-warnings.patch | 67 +++++++++++++++++++
openstack-keystone.spec | 34 +++++++++-
3 files changed, 236 insertions(+), 2 deletions(-)
---
diff --git a/0001-fix-man-page-build.patch b/0001-fix-man-page-build.patch
new file mode 100644
index 0000000..31c6996
--- /dev/null
+++ b/0001-fix-man-page-build.patch
@@ -0,0 +1,137 @@
+From 4d038ac64843e9022708b0fec9108ccd56835d15 Mon Sep 17 00:00:00 2001
+From: Alan Pevec <apevec at redhat.com>
+Date: Fri, 22 Jun 2012 19:39:45 +0200
+Subject: [PATCH] fix man page build
+
+there was an obsolete man_pages in conf.py
+sync keystone-all man page with keystone-all -h output
+
+Change-Id: Ie136d30d0ea647082459ae35720e48742aa2b722
+---
+ doc/source/conf.py | 12 ----------
+ doc/source/man/keystone-all.rst | 40 ++++++++++++++---------------------
+ doc/source/man/keystone-manage.rst | 6 ++--
+ 3 files changed, 19 insertions(+), 39 deletions(-)
+
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index ab5d591..073e598 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -240,18 +240,6 @@ latex_documents = [
+ #latex_domain_indices = True
+
+
+-# -- Options for manual page output
+-
+-# One entry per manual page. List of tuples
+-# (source start file, name, description, authors, manual section).
+-man_pages = [
+- ('index', 'keystone', u'Keystone Documentation',
+- [u'OpenStack'], 1)]
+-
+-# If true, show URL addresses after external links.
+-#man_show_urls = False
+-
+-
+ # -- Options for Texinfo output
+
+ # Grouping the document tree into Texinfo files. List of tuples
+diff --git a/doc/source/man/keystone-all.rst b/doc/source/man/keystone-all.rst
+index fc2d68d..882e568 100644
+--- a/doc/source/man/keystone-all.rst
++++ b/doc/source/man/keystone-all.rst
+@@ -1,15 +1,15 @@
+-========
+-keystone
+-========
++============
++keystone-all
++============
+
+----------------------------
+-Keystone Management Utility
+----------------------------
++------------------------
++Keystone Startup Command
++------------------------
+
+-:Author: keystone at lists.launchpad.net
++:Author: openstack at lists.launchpad.net
+ :Date: 2010-11-16
+ :Copyright: OpenStack LLC
+-:Version: 0.1.2
++:Version: 2012.1
+ :Manual section: 1
+ :Manual group: cloud computing
+
+@@ -25,26 +25,18 @@ keystone-all starts both the service and administrative APIs in a single
+ process to provide catalog, authorization, and authentication services for
+ OpenStack.
+
+-USAGE
+-=====
+-
+- ``keystone-all [options]``
+-
+-Common Options:
+-^^^^^^^^^^^^^^^
+- -h, --help show this help message and exit
+-
+-The following configuration options are common to all keystone
+-programs.::
++OPTIONS
++=======
+
+ -h, --help show this help message and exit
+ --config-file=PATH Path to a config file to use. Multiple config files
+ can be specified, with values in later files taking
+- precedence. The default files used are: []
++ precedence. The default files used are:
++ ['/etc/keystone/keystone.conf']
+ -d, --debug Print debugging output
+- --nodebug Print debugging output
++ --nodebug The inverse of --debug
+ -v, --verbose Print more verbose output
+- --noverbose Print more verbose output
++ --noverbose The inverse of --verbose
+ --log-config=PATH If this option is specified, the logging configuration
+ file specified is used and overrides any other logging
+ options specified. Please see the Python logging
+@@ -64,7 +56,7 @@ programs.::
+ (Optional) The syslog facility to use when logging to
+ syslog (defaults to LOG_USER)
+ --use-syslog Use syslog for logging.
+- --nouse-syslog Use syslog for logging.
++ --nouse-syslog The inverse of --use-syslog
+
+ FILES
+ =====
+@@ -80,4 +72,4 @@ SOURCE
+ ======
+
+ * Keystone source is managed in GitHub `Keystone <http://github.com/openstack/keystone>`__
+-* Keystone bugs are managed at Launchpad `Launchpad Keystone <https://bugs.launchpad.net/keystone>`__
++* Keystone bugs are managed at Launchpad `Keystone <https://bugs.launchpad.net/keystone>`__
+diff --git a/doc/source/man/keystone-manage.rst b/doc/source/man/keystone-manage.rst
+index 0c6a1e1..d547172 100644
+--- a/doc/source/man/keystone-manage.rst
++++ b/doc/source/man/keystone-manage.rst
+@@ -6,10 +6,10 @@ keystone-manage
+ Keystone Management Utility
+ ---------------------------
+
+-:Author: keystone at lists.launchpad.net
++:Author: openstack at lists.launchpad.net
+ :Date: 2010-11-16
+ :Copyright: OpenStack LLC
+-:Version: 0.1.2
++:Version: 2012.1
+ :Manual section: 1
+ :Manual group: cloud computing
+
+@@ -95,4 +95,4 @@ SOURCE
+ ======
+
+ * Keystone is sourced in GitHub `Keystone <http://github.com/openstack/keystone>`__
+-* Keystone bugs are managed at Launchpad `Launchpad Keystone <https://bugs.launchpad.net/keystone>`__
++* Keystone bugs are managed at Launchpad `Keystone <https://bugs.launchpad.net/keystone>`__
diff --git a/0002-fix-sphinx-warnings.patch b/0002-fix-sphinx-warnings.patch
new file mode 100644
index 0000000..78695bd
--- /dev/null
+++ b/0002-fix-sphinx-warnings.patch
@@ -0,0 +1,67 @@
+From 608fede80b33d1e2c484fd5560e6bc2ebb12a9b5 Mon Sep 17 00:00:00 2001
+From: Alan Pevec <apevec at redhat.com>
+Date: Fri, 22 Jun 2012 20:01:48 +0200
+Subject: [PATCH] fix sphinx warnings
+
+also disable building old docs
+
+Change-Id: I0bbbb2b702a12bd9acb79f89b5b5c92cffeec779
+---
+ doc/source/architecture.rst | 4 ++++
+ doc/source/conf.py | 2 +-
+ doc/source/configuringservices.rst | 2 +-
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/doc/source/architecture.rst b/doc/source/architecture.rst
+index cbd2f40..fd3cd78 100644
+--- a/doc/source/architecture.rst
++++ b/doc/source/architecture.rst
+@@ -84,18 +84,22 @@ which are thin wrapper classes which load the appropriate service driver based
+ on the keystone configuration.
+
+ * Identity
++
+ * :mod:`keystone.identity.core.TenantController`
+ * :mod:`keystone.identity.core.UserController`
+ * :mod:`keystone.identity.core.RoleController`
+
+ * Catalog
++
+ * :mod:`keystone.catalog.core.ServiceController`
+ * :mod:`keystone.service.VersionController`
+
+ * Token
++
+ * :mod:`keystone.service.TokenController`
+
+ * Misc
++
+ * :mod:`keystone.service.ExtensionsController`
+
+ At this time, the policy service and associated manager is not exposed as a URL
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index 073e598..319faf0 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -79,7 +79,7 @@ release = '2012.1-dev'
+
+ # List of patterns, relative to source directory, that match files and
+ # directories to ignore when looking for source files.
+-exclude_patterns = []
++exclude_patterns = ['old']
+
+ # The reST default role (used for this markup: `text`) to use for all
+ # documents.
+diff --git a/doc/source/configuringservices.rst b/doc/source/configuringservices.rst
+index 22a1590..e8f961a 100644
+--- a/doc/source/configuringservices.rst
++++ b/doc/source/configuringservices.rst
+@@ -21,7 +21,7 @@ Configuring Services to work with Keystone
+ .. toctree::
+ :maxdepth: 1
+
+- middleware_architecture
++ middleware_architecture
+
+ Once Keystone is installed and running (see :doc:`configuration`), services
+ need to be configured to work with it. To do this, we primarily install and
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index 49002cb..c49d2b4 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -8,6 +8,7 @@
%global git_revno r2300
%global snaptag ~%{release_letter}%{milestone}~%{snapdate}.%{git_revno}
+%global with_doc %{!?_without_doc:1}%{?_without_doc:0}
Name: openstack-keystone
Version: 2012.2
@@ -25,6 +26,9 @@ Source5: openstack-keystone-sample-data
Patch0: match-egg-and-spec-requires.patch
+Patch0001: 0001-fix-man-page-build.patch
+Patch0002: 0002-fix-sphinx-warnings.patch
+
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-sphinx >= 1.0
@@ -90,11 +94,28 @@ Keystone is a Python implementation of the OpenStack
This package contains the Keystone Authentication Middleware.
+%if 0%{?with_doc}
+%package doc
+Summary: Documentation for OpenStack Identity Service
+Group: Documentation
+
+Requires: %{name} = %{version}-%{release}
+
+%description doc
+Keystone is a Python implementation of the OpenStack
+(http://www.openstack.org) identity service API.
+
+This package contains documentation for Keystone.
+%endif
+
%prep
%setup -q -n keystone-%{version}
%patch0 -p1
+%patch0001 -p1
+%patch0002 -p1
+
find . \( -name .gitignore -o -name .placeholder \) -delete
find keystone -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
@@ -136,11 +157,15 @@ install -d -m 755 %{buildroot}%{_localstatedir}/log/keystone
# docs generation requires everything to be installed first
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
-if [ -x /usr/bin/sphix-apidoc ]; then
+if [ -x /usr/bin/sphinx-apidoc ]; then
make html
+ make man
else
make html SPHINXAPIDOC=echo
+ make man SPHINXAPIDOC=echo
fi
+mkdir -p %{buildroot}%{_mandir}/man1
+install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
popd
# Fix hidden-file-or-dir warnings
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
@@ -193,7 +218,7 @@ fi
%files
%doc LICENSE
%doc README.rst
-%doc doc/build/html
+%{_mandir}/man1/keystone*.1.gz
%{_bindir}/keystone-all
%{_bindir}/keystone-manage
%{_bindir}/openstack-keystone-sample-data
@@ -224,6 +249,11 @@ fi
%ghost %{python_sitelib}/keystone/middleware/__init__.py
%{python_sitelib}/keystone/middleware/auth_token.py*
+%if 0%{?with_doc}
+%files doc
+%doc LICENSE doc/build/html
+%endif
+
%changelog
* Fri May 25 2012 Alan Pevec <apevec at redhat.com> 2012.2-0.1.f1
- folsom-1 milestone
More information about the scm-commits
mailing list