[openstack-keystone/el6] Add fixes for building the doc package
Alan Pevec
apevec at fedoraproject.org
Wed Nov 30 22:49:15 UTC 2011
commit 87797da5387f6855ea196ea0cda669f73d5c98b2
Author: Pádraig Brady <P at draigBrady.com>
Date: Wed Nov 30 22:26:33 2011 +0100
Add fixes for building the doc package
Don't access the net and always reference
the keystone module from the package we're building
openstack-keystone-docmod.patch | 22 ++++++++++++++++++++++
openstack-keystone-nonet.patch | 12 ++++++++++++
openstack-keystone.spec | 17 ++++++++++-------
3 files changed, 44 insertions(+), 7 deletions(-)
---
diff --git a/openstack-keystone-docmod.patch b/openstack-keystone-docmod.patch
new file mode 100644
index 0000000..20c7216
--- /dev/null
+++ b/openstack-keystone-docmod.patch
@@ -0,0 +1,22 @@
+Ensure that the local keystone is used to build docs,
+rather than the system version which might not even be installed.
+This needs to go upstream along with the related
+https://review.openstack.org/#change,1849
+
+--- glance-2011.3.orig/doc/source/conf.py 2011-09-21 21:46:35.000000000 +0100
++++ glance-2011.3/doc/source/conf.py 2011-11-22 15:03:59.306468960 +0000
+@@ -33,10 +33,10 @@
+ # If extensions (or modules to document with autodoc) are in another directory,
+ # add these directories to sys.path here. If the directory is relative to the
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
+-sys.path.append([os.path.abspath('../keystone'),
+- os.path.abspath('..'),
+- os.path.abspath('../bin')
+- ])
++sys.path = [os.path.abspath('../../keystone'),
++ os.path.abspath('../..'),
++ os.path.abspath('../../bin')
++ ] + sys.path
+
+ # -- General configuration ---------------------------------------------------
+
diff --git a/openstack-keystone-nonet.patch b/openstack-keystone-nonet.patch
new file mode 100644
index 0000000..dda938a
--- /dev/null
+++ b/openstack-keystone-nonet.patch
@@ -0,0 +1,12 @@
+Don't access the net to load public links.
+
+--- keystone-2011.3.1/doc/source/conf.py.orig 2011-11-30 21:40:44.822527914 +0100
++++ keystone-2011.3.1/doc/source/conf.py 2011-11-30 21:42:16.279821522 +0100
+@@ -46,7 +46,6 @@
+ 'sphinx.ext.coverage',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.ifconfig',
+- 'sphinx.ext.intersphinx',
+ 'sphinx.ext.pngmath',
+ 'sphinx.ext.graphviz',
+ 'sphinx.ext.todo']
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
index da6a7d4..f8bd9cd 100644
--- a/openstack-keystone.spec
+++ b/openstack-keystone.spec
@@ -18,6 +18,8 @@ Source0: http://keystone.openstack.org/tarballs/keystone-%{version}%{snap
Source1: openstack-keystone.logrotate
Source2: openstack-keystone.init
Patch0: openstack-keystone-newdeps.patch
+Patch1: openstack-keystone-docmod.patch
+Patch2: openstack-keystone-nonet.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -66,6 +68,8 @@ Services included are:
%prep
%setup -q -n keystone-%{version}
%patch0 -p1 -b .newdeps
+%patch1 -p1 -b .docmod
+%patch2 -p1 -b .nonet
# log_file is ignored, use log_dir instead
# https://bugs.launchpad.net/keystone/+bug/844959/comments/3
@@ -83,10 +87,6 @@ fp.close()'
find . \( -name .gitignore -o -name .placeholder \) -delete
find keystone -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
-# change sphinx-build to sphinx-1.0-build in makefiles
-#sed -i 's|sphinx-build|sphinx-1\.0-build|' build/lib/doc/Makefile
-sed -i 's|sphinx-build|sphinx-1\.0-build|' doc/Makefile
-
%build
%{__python} setup.py build
find examples -type f -exec chmod 0664 \{\} \;
@@ -107,9 +107,7 @@ rm -rf %{buildroot}%{python_sitelib}/doc
# docs generation requires everything to be installed first
export PYTHONPATH="$( pwd ):$PYTHONPATH"
-pushd doc
-make
-popd
+make SPHINXBUILD=sphinx-1.0-build -C doc
# Fix hidden-file-or-dir warnings
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
@@ -166,6 +164,11 @@ fi
%dir %attr(-, keystone, keystone) %{_localstatedir}/run/keystone
%changelog
+* Wed Nov 30 2011 Alan Pevec <apevec at redhat.com> 2011.3.1-3
+- Use updated parallel install versions of epel packages (pbrady)
+- Ensure the docs aren't built with the system glance module (pbrady)
+- Ensure we don't access the net when building docs (pbrady)
+
* Thu Nov 24 2011 Alan Pevec <apevec at redhat.com> 2011.3.1-2
- include LICENSE, update package description from README.md
More information about the scm-commits
mailing list