[openstack-glance] Add fixes for building the doc package
Pádraig Brady
pbrady at fedoraproject.org
Thu Nov 24 11:02:02 UTC 2011
commit 029ffcd45bfe937ebb01f2ace4ce3ffcf81e6fdf
Author: Pádraig Brady <P at draigBrady.com>
Date: Wed Nov 23 16:22:47 2011 +0000
Add fixes for building the doc package
Don't access the net and always reference
the glance module from the package we're building
openstack-glance-docmod.patch | 22 ++++++++++++++++++++++
openstack-glance-nonet.patch | 13 +++++++++++++
openstack-glance.spec | 10 +++++++++-
3 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/openstack-glance-docmod.patch b/openstack-glance-docmod.patch
new file mode 100644
index 0000000..aec136a
--- /dev/null
+++ b/openstack-glance-docmod.patch
@@ -0,0 +1,22 @@
+Ensure that the local glance is used to build docs,
+rather than the system version which might not even be installed.
+This is reported upstream so may be fixed in Essex.
+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('../glance'),
+- os.path.abspath('..'),
+- os.path.abspath('../bin')
+- ])
++sys.path = [os.path.abspath('../../glance'),
++ os.path.abspath('../..'),
++ os.path.abspath('../../bin')
++ ] + sys.path
+
+ # -- General configuration ---------------------------------------------------
+
diff --git a/openstack-glance-nonet.patch b/openstack-glance-nonet.patch
new file mode 100644
index 0000000..80ffc1d
--- /dev/null
+++ b/openstack-glance-nonet.patch
@@ -0,0 +1,13 @@
+Don't access the net to load public links for the nova and swift projects.
+These don't seem to be referenced yet in any case.
+
+--- 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-23 15:57:39.113642425 +0000
+@@ -45,7 +45,6 @@
+ extensions = ['sphinx.ext.autodoc',
+ 'sphinx.ext.coverage',
+ 'sphinx.ext.ifconfig',
+- 'sphinx.ext.intersphinx',
+ 'sphinx.ext.pngmath',
+ 'sphinx.ext.graphviz',
+ 'sphinx.ext.todo']
diff --git a/openstack-glance.spec b/openstack-glance.spec
index 56e6530..335e081 100644
--- a/openstack-glance.spec
+++ b/openstack-glance.spec
@@ -1,7 +1,7 @@
Name: openstack-glance
Version: 2011.3
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: OpenStack Image Service
Group: Applications/System
@@ -11,6 +11,8 @@ Source0: http://launchpad.net/glance/diablo/%{version}/+download/glance
Source1: openstack-glance-api.service
Source2: openstack-glance-registry.service
Source3: openstack-glance.logrotate
+Patch0: openstack-glance-docmod.patch
+Patch1: openstack-glance-nonet.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -87,6 +89,8 @@ This package contains documentation files for glance.
%prep
%setup -q -n glance-%{version}
+%patch0 -p1 -b .docmod
+%patch1 -p1 -b .nonet
sed -i 's|\(sql_connection = sqlite:///\)\(glance.sqlite\)|\1%{_sharedstatedir}/glance/\2|' etc/glance-registry.conf
@@ -199,6 +203,10 @@ fi
%doc doc/build/html
%changelog
+* Tue Nov 22 2011 Pádraig Brady <P at draigBrady.com> - 2011.3-2
+- Ensure the docs aren't built with the system glance module
+- Ensure we don't access the net when building docs
+
* Tue Sep 27 2011 Mark McLoughlin <markmc at redhat.com> - 2011.3-1
- Update to Diablo final
More information about the scm-commits
mailing list