diff --git a/.gitignore b/.gitignore index 15f5234..a9cb4f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /swift-2.3.0rc2.tar.gz /swift-2.3.0.tar.gz +/swift-2.4.0.tar.gz diff --git a/0001-remove-runtime-requirement-on-pbr.patch b/0001-remove-runtime-requirement-on-pbr.patch new file mode 100644 index 0000000..7785766 --- /dev/null +++ b/0001-remove-runtime-requirement-on-pbr.patch @@ -0,0 +1,38 @@ +From 8ac9e78933363d8213c256d204d71646a30bfb2f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?=
+Date: Wed, 9 Oct 2013 12:38:40 +0100
+Subject: [PATCH] remove runtime requirement on pbr
+
+---
+ swift/__init__.py | 18 ++----------------
+ 1 file changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/swift/__init__.py b/swift/__init__.py
+index 9d0e889..d7a4012 100644
+--- a/swift/__init__.py
++++ b/swift/__init__.py
+@@ -16,22 +16,8 @@
+ import os
+ import gettext
+
+-import pkg_resources
+-
+-try:
+- # First, try to get our version out of PKG-INFO. If we're installed,
+- # this'll let us find our version without pulling in pbr. After all, if
+- # we're installed on a system, we're not in a Git-managed source tree, so
+- # pbr doesn't really buy us anything.
+- __version__ = __canonical_version__ = pkg_resources.get_provider(
+- pkg_resources.Requirement.parse('swift')).version
+-except pkg_resources.DistributionNotFound:
+- # No PKG-INFO? We're probably running from a checkout, then. Let pbr do
+- # its thing to figure out a version number.
+- import pbr.version
+- _version_info = pbr.version.VersionInfo('swift')
+- __version__ = _version_info.release_string()
+- __canonical_version__ = _version_info.version_string()
++__version__ = "%RPMVERSION%-%RPMRELEASE%"
++__canonical_version__ = "%RPMVERSION%"
+
+ _localedir = os.environ.get('SWIFT_LOCALEDIR')
+ _t = gettext.translation('swift', localedir=_localedir, fallback=True)
diff --git a/0002-Add-fixes-for-building-the-doc-package.patch b/0002-Add-fixes-for-building-the-doc-package.patch
new file mode 100644
index 0000000..151b21f
--- /dev/null
+++ b/0002-Add-fixes-for-building-the-doc-package.patch
@@ -0,0 +1,39 @@
+From 0bab29e45f13cbb9a6348f4da3c2d4d0fdf5397c Mon Sep 17 00:00:00 2001
+From: Alan Pevec
+---
+ doc/source/conf.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index 5d2fbd3..3fa01c3 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -20,8 +20,8 @@ import datetime
+ # 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.extend([os.path.abspath('../swift'), os.path.abspath('..'),
+- os.path.abspath('../bin')])
++sys.path.extend([os.path.abspath('../../swift'), os.path.abspath('../..'),
++ os.path.abspath('../../bin')])
+
+ # -- General configuration ----------------------------------------------------
+
+@@ -29,7 +29,7 @@ sys.path.extend([os.path.abspath('../swift'), os.path.abspath('..'),
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+ extensions = ['sphinx.ext.autodoc',
+ 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath',
+- 'sphinx.ext.ifconfig', 'oslosphinx']
++ 'sphinx.ext.ifconfig', 'oslo.sphinx']
+ 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 439ecdc..e61bb7f 100644
--- a/openstack-swift.spec
+++ b/openstack-swift.spec
@@ -1,18 +1,20 @@
-%global release_name kilo
+%global release_name liberty
%global service swift
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Name: openstack-swift
-Version: 2.3.0
-Release: 2%{?milestone}%{?dist}
+Version: 2.4.0
+Release: 1%{?milestone}%{?dist}
Summary: OpenStack Object Storage (Swift)
-Group: Development/Languages
License: ASL 2.0
URL: http://launchpad.net/swift
Source0: http://launchpad.net/%{service}/%{release_name}/%{version}/+download/%{service}-%{upstream_version}.tar.gz
+Patch0001: 0001-remove-runtime-requirement-on-pbr.patch
+Patch0002: 0002-Add-fixes-for-building-the-doc-package.patch
+
Source2: %{name}-account.service
Source21: %{name}-account@.service
Source22: account-server.conf
@@ -89,7 +91,6 @@ expensive equipment.
%package account
Summary: Account services for Swift
-Group: Applications/System
Requires: %{name} = %{version}-%{release}
@@ -101,7 +102,6 @@ This package contains the %{name} account server.
%package container
Summary: Container services for Swift
-Group: Applications/System
Requires: %{name} = %{version}-%{release}
@@ -113,7 +113,6 @@ This package contains the %{name} container server.
%package object
Summary: Object services for Swift
-Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: rsync >= 3.0
@@ -126,11 +125,11 @@ This package contains the %{name} object server.
%package proxy
Summary: A proxy server for Swift
-Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: python-keystonemiddleware
Requires: openstack-swift-plugin-swift3
+Requires: openstack-swift-container
%description proxy
OpenStack Object Storage (Swift) aggregates commodity servers to work together
@@ -140,7 +139,7 @@ This package contains the %{name} proxy server.
%package doc
Summary: Documentation for %{name}
-Group: Documentation
+
BuildRequires: python-sphinx >= 1.0
BuildRequires: python-oslo-sphinx >= 2.5.0
# Required for generating docs (otherwise py-modindex.html is missing)
@@ -156,20 +155,23 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n swift-%{upstream_version}
+%patch0001 -p1
+%patch0002 -p1
+
# Let RPM handle the dependencies
rm -f requirements.txt
%build
-%{__python} setup.py build
+%{__python2} setup.py build
# Fails unless we create the build directory
mkdir -p doc/build
# Build docs
-%{__python} setup.py build_sphinx
+%{__python2} setup.py build_sphinx
# Fix hidden-file-or-dir warning
#rm doc/build/html/.buildinfo
%install
-%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
# systemd units
install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-account.service
install -p -D -m 644 %{SOURCE21} %{buildroot}%{_unitdir}/%{name}-account@.service
@@ -199,7 +201,7 @@ install -p -D -m 644 %{SOURCE59} %{buildroot}%{_unitdir}/%{name}-object-expirer.
install -p -D -m 644 %{SOURCE63} %{buildroot}%{_unitdir}/%{name}-container-reconciler.service
install -p -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}-proxy.service
# Remove tests
-rm -fr %{buildroot}/%{python_sitelib}/test
+rm -fr %{buildroot}/%{python2_sitelib}/test
# Misc other
install -d -m 755 %{buildroot}%{_sysconfdir}/swift
install -d -m 755 %{buildroot}%{_sysconfdir}/swift/account-server
@@ -339,13 +341,14 @@ exit 0
%dir %attr(0755, swift, root) %{_localstatedir}/run/swift
%dir %attr(0755, swift, root) %{_localstatedir}/cache/swift
%dir %attr(0755, swift, root) %{_sharedstatedir}/swift
-%dir %{python_sitelib}/swift
+%dir %{python2_sitelib}/swift
%{_bindir}/swift-account-audit
%{_bindir}/swift-config
%{_bindir}/swift-drive-audit
%{_bindir}/swift-get-nodes
%{_bindir}/swift-init
%{_bindir}/swift-ring-builder
+%{_bindir}/swift-ring-builder-analyzer
%{_bindir}/swift-dispersion-populate
%{_bindir}/swift-dispersion-report
%{_bindir}/swift-recon*
@@ -353,13 +356,13 @@ exit 0
%{_bindir}/swift-orphans
%{_bindir}/swift-form-signature
%{_bindir}/swift-temp-url
-%{python_sitelib}/swift/*.py*
-%{python_sitelib}/swift/cli
-%{python_sitelib}/swift/common
-%{python_sitelib}/swift/account
-%{python_sitelib}/swift/obj
-%{python_sitelib}/swift/locale
-%{python_sitelib}/swift-%{version}*.egg-info
+%{python2_sitelib}/swift/*.py*
+%{python2_sitelib}/swift/cli
+%{python2_sitelib}/swift/common
+%{python2_sitelib}/swift/account
+%{python2_sitelib}/swift/obj
+%{python2_sitelib}/swift/locale
+%{python2_sitelib}/swift-%{version}*.egg-info
%files account
%defattr(-,root,root,-)
@@ -400,7 +403,7 @@ exit 0
%{_bindir}/swift-container-replicator
%{_bindir}/swift-container-updater
%{_bindir}/swift-container-sync
-%{python_sitelib}/swift/container
+%{python2_sitelib}/swift/container
%files object
%defattr(-,root,root,-)
@@ -447,14 +450,16 @@ exit 0
%{_bindir}/swift-container-reconciler
%{_bindir}/swift-object-expirer
%{_bindir}/swift-proxy-server
-%{python_sitelib}/swift/proxy
+%{python2_sitelib}/swift/proxy
%files doc
%defattr(-,root,root,-)
-%license LICENSE
-%doc doc/build/html
+%doc LICENSE doc/build/html
%changelog
+* Wed Sep 30 2015 Haikel Guemar