[openstack-swift/el6: 11/11] Add fixes for building the doc package

Alan Pevec apevec at fedoraproject.org
Wed Jan 4 23:09:19 UTC 2012


commit 29b0e5e6048edd490517e324e7d2a4c9960c9b06
Author: Alan Pevec <apevec at redhat.com>
Date:   Thu Jan 5 00:03:00 2012 +0100

    Add fixes for building the doc package
    
    Don't access the net and always reference
    the swift module from the package we're building
    Based on Nova/Glance EPEL patch by Pádraig Brady <P at draigBrady.com>

 openstack-swift-docmod.patch |   14 ++++++++++++++
 openstack-swift-nonet.patch  |   11 +++++++++++
 openstack-swift.spec         |    6 ++++++
 3 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/openstack-swift-docmod.patch b/openstack-swift-docmod.patch
new file mode 100644
index 0000000..03f193c
--- /dev/null
+++ b/openstack-swift-docmod.patch
@@ -0,0 +1,14 @@
+--- swift-1.4.4/doc/source/conf.py.orig	2011-11-24 08:59:50.000000000 -0500
++++ swift-1.4.4/doc/source/conf.py	2012-01-04 22:35:55.571492761 -0500
+@@ -31,7 +31,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('../swift'), os.path.abspath('..'), os.path.abspath('../bin')])
++sys.path = [os.path.abspath('../../swift'),
++    os.path.abspath('../..'),
++    os.path.abspath('../../bin')
++    ] + sys.path
+ 
+ # -- General configuration -----------------------------------------------------
+ 
diff --git a/openstack-swift-nonet.patch b/openstack-swift-nonet.patch
new file mode 100644
index 0000000..af8cad4
--- /dev/null
+++ b/openstack-swift-nonet.patch
@@ -0,0 +1,11 @@
+--- swift-1.4.4/doc/source/conf.py.orig	2012-01-04 22:40:43.190300958 -0500
++++ swift-1.4.4/doc/source/conf.py	2012-01-04 22:41:26.980492712 -0500
+@@ -40,7 +40,7 @@
+ 
+ # Add any Sphinx extension module names here, as strings. They can be extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig']
++extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig']
+ todo_include_todos = True
+ 
+ # Add any paths that contain templates here, relative to this directory.
diff --git a/openstack-swift.spec b/openstack-swift.spec
index b64e9c3..adda1c4 100644
--- a/openstack-swift.spec
+++ b/openstack-swift.spec
@@ -18,6 +18,8 @@ Source5:          %{name}-object.init
 Source6:          %{name}-proxy.init
 Source20:         %{name}.tmpfs
 Patch0:           openstack-swift-newdeps.patch
+Patch1:           openstack-swift-docmod.patch
+Patch2:           openstack-swift-nonet.patch
 
 BuildRoot:        %{_tmppath}/swift-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -129,6 +131,8 @@ This package contains documentation files for %{name}.
 %prep
 %setup -q -n swift-%{version}
 %patch0 -p1 -b .newdeps
+%patch1 -p1 -b .docmod
+%patch2 -p1 -b .nonet
 # Fix wrong-file-end-of-line-encoding warning
 dos2unix LICENSE
 
@@ -313,6 +317,8 @@ fi
 %changelog
 * Wed Jan 04 2012 Alan Pevec <apevec at redhat.com> 1.4.4-1
 - 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)
 - Update to 1.4.4
 
 * Wed Nov 23 2011 David Nalley <david at gnsa.us> -1.4.3-2


More information about the scm-commits mailing list