27ff419
%global with_doc %{!?_without_doc:1}%{?_without_doc:0}
ead228f
%global git_snaptag 1680
ead228f
%global git_commit gd8a98dd
Alan Pevec dbb47e1
Alan Pevec dbb47e1
%{!?upstream_version:   %global upstream_version         %{version}.dev%{git_snaptag}.%{git_commit}}
27ff419
27ff419
# openstack-packstack ----------------------------------------------------------
Derek Higgins 2462458
Derek Higgins 2462458
Name:           openstack-packstack
Alan Pevec 7faf807
Epoch:          1
f2e9925
Version:        7.0.0
ead228f
Release:        0.9.dev%{git_snaptag}.%{git_commit}%{?dist}
Derek Higgins 2462458
Summary:        Openstack Install Utility
Derek Higgins 2462458
Derek Higgins 2462458
Group:          Applications/System
412a319
License:        ASL 2.0 and GPLv2
412a319
URL:            https://github.com/stackforge/packstack
412a319
# Tarball is created by bin/release.sh
Alan Pevec dbb47e1
Source0:        http://mmagr.fedorapeople.org/downloads/packstack/packstack-%{upstream_version}.tar.gz
Derek Higgins 2462458
Derek Higgins 2462458
BuildArch:      noarch
Derek Higgins 2462458
Derek Higgins 2462458
BuildRequires:  python2-devel
Derek Higgins 2462458
BuildRequires:  python-setuptools
Derek Higgins 2462458
Derek Higgins 2462458
Requires:       openssh-clients
64aa46d
Requires:       python-netaddr
30faa02
Requires:       openstack-packstack-puppet == %{epoch}:%{version}-%{release}
693b707
Requires:       openstack-puppet-modules >= 2014.2.10
295bf14
Obsoletes:      packstack-modules-puppet
Lukas Bezdicka b280da9
Requires:       python-setuptools
Lukas Bezdicka d8abb3a
Requires:       PyYAML
Alan Pevec dbb47e1
Requires:       python-docutils
Alan Pevec 0993140
Requires:       pyOpenSSL
Derek Higgins 2462458
Derek Higgins 2462458
%description
27ff419
Packstack is a utility that uses Puppet modules to install OpenStack. Packstack
27ff419
can be used to deploy various parts of OpenStack on multiple pre installed
27ff419
servers over ssh.
27ff419
27ff419
27ff419
# openstack-packstack-puppet ---------------------------------------------------
27ff419
27ff419
%package puppet
27ff419
Summary:        Packstack Puppet module
27ff419
Group:          Development/Libraries
Derek Higgins 2462458
27ff419
%description puppet
27ff419
Puppet module used by Packstack to install OpenStack
412a319
412a319
27ff419
# openstack-packstack-doc ------------------------------------------------------
412a319
27ff419
%if 0%{?with_doc}
27ff419
%package doc
27ff419
Summary:          Documentation for Packstack
27ff419
Group:            Documentation
27ff419
27ff419
%if 0%{?rhel} == 6
27ff419
BuildRequires:  python-sphinx10
0d2da66
%endif
31b87ae
BuildRequires:  /usr/bin/sphinx-build
27ff419
27ff419
%description doc
27ff419
This package contains documentation files for Packstack.
27ff419
%endif
27ff419
27ff419
27ff419
# prep -------------------------------------------------------------------------
412a319
Derek Higgins 2462458
%prep
Alan Pevec 1d55dff
%setup -q -n packstack-%{upstream_version}
Derek Higgins 2462458
89e8c65
# Sanitizing a lot of the files in the puppet modules
9842d83
find packstack/puppet/modules \( -name .fixtures.yml -o -name .gemfile -o -name ".travis.yml" -o -name .rspec \) -exec rm {} +
9842d83
find packstack/puppet/modules \( -name "*.py" -o -name "*.rb" -o -name "*.pl" \) -exec sed -i '/^#!/{d;q}' {} + -exec chmod -x {} +
9842d83
find packstack/puppet/modules \( -name "*.sh" \) -exec sed -i 's/^#!.*/#!\/bin\/bash/g' {} + -exec chmod +x {} +
9842d83
find packstack/puppet/modules -name site.pp -size 0 -exec rm {} +
9842d83
find packstack/puppet/modules \( -name spec -o -name ext \) | xargs rm -rf
Derek Higgins 2462458
Derek Higgins 2462458
# Moving this data directory out temporarily as it causes setup.py to throw errors
Derek Higgins 2462458
rm -rf %{_builddir}/puppet
Derek Higgins 2462458
mv packstack/puppet %{_builddir}/puppet
Derek Higgins 2462458
412a319
27ff419
# build ------------------------------------------------------------------------
Derek Higgins 2462458
27ff419
%build
Derek Higgins 2462458
%{__python} setup.py build
Derek Higgins 2462458
27ff419
%if 0%{?with_doc}
Derek Higgins 2462458
cd docs
9705ba3
%if 0%{?rhel} == 6
Derek Higgins 2462458
make man SPHINXBUILD=sphinx-1.0-build
Derek Higgins 2462458
%else
Derek Higgins 2462458
make man
Derek Higgins 2462458
%endif
27ff419
%endif
Derek Higgins 2462458
412a319
27ff419
# install ----------------------------------------------------------------------
27ff419
Derek Higgins 2462458
%install
Derek Higgins 2462458
%{__python} setup.py install --skip-build --root %{buildroot}
412a319
Derek Higgins 2a17b7c
# Delete tests
Derek Higgins 2a17b7c
rm -fr %{buildroot}%{python_sitelib}/tests
Derek Higgins 2a17b7c
27ff419
# Install Puppet module
27ff419
mkdir -p %{buildroot}/%{_datadir}/openstack-puppet/modules
27ff419
cp -r %{_builddir}/puppet/modules/packstack  %{buildroot}/%{_datadir}/openstack-puppet/modules/
Derek Higgins 2462458
Alan Pevec dbb47e1
# Move packstack documentation
Alan Pevec dbb47e1
mkdir -p %{buildroot}/%{_datadir}/packstack
Alan Pevec dbb47e1
install -p -D -m 644 docs/packstack.rst %{buildroot}/%{_datadir}/packstack
Alan Pevec dbb47e1
583f309
# Move Puppet manifest templates back to original place
583f309
mkdir -p %{buildroot}/%{python_sitelib}/packstack/puppet
583f309
mv %{_builddir}/puppet/templates %{buildroot}/%{python_sitelib}/packstack/puppet/
583f309
27ff419
%if 0%{?with_doc}
Derek Higgins 2462458
mkdir -p %{buildroot}%{_mandir}/man1
Derek Higgins 2462458
install -p -D -m 644 docs/_build/man/*.1 %{buildroot}%{_mandir}/man1/
27ff419
%endif
Derek Higgins 2462458
Alan Pevec dbb47e1
# Remove docs directory
Alan Pevec dbb47e1
rm -fr %{buildroot}%{python_sitelib}/docs
412a319
27ff419
# files ------------------------------------------------------------------------
27ff419
Derek Higgins 2462458
%files
Derek Higgins 2462458
%doc LICENSE
Derek Higgins 2462458
%{_bindir}/packstack
Alan Pevec dbb47e1
%{_datadir}/packstack
Derek Higgins 2462458
%{python_sitelib}/packstack
Alan Pevec dbb47e1
%{python_sitelib}/packstack-*.egg-info
Derek Higgins 2462458
27ff419
%files puppet
412a319
%defattr(644,root,root,755)
27ff419
%{_datadir}/openstack-puppet/modules/packstack
27ff419
27ff419
%if 0%{?with_doc}
27ff419
%files doc
27ff419
%{_mandir}/man1/packstack.1.gz
27ff419
%endif
412a319
412a319
27ff419
# changelog --------------------------------------------------------------------
27ff419
Derek Higgins 2462458
%changelog
ead228f
* Thu Dec 10 2015 Iván Chavero <ichavero@redhat.com> - 7.0.0-0.9.dev.dev1680.gd8a98dd
ead228f
- Remove 0001-Add-symlink-to-support-hiera-3.0.patch
ead228f
- Remove 0002-Do-not-enable-EPEL-when-installing-RDO.patch
ead228f
- Dashboard's local_settings file should not be world readable (rhbz#1217089)
ead228f
- Add support for Neutron ML2 SR-IOV mechanism driver (rhbz#1167099)
ead228f
- Do not enable EPEL when installing RDO
ead228f
- Add symlink to support hiera >= 3.0 (rhbz#1284978)
ead228f
31b87ae
* Thu Nov 26 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:7.0.0-0.8.dev.dev1661.gaf13b7e
31b87ae
- Require sphinx-build directly instead of a package name
31b87ae
0d2da66
* Wed Nov 25 2015 Javier Peña <jpena@redhat.com> - 7.0.0-0.7.dev.dev1661.gaf13b7e
0d2da66
- Adapt man build to updated sphinx package, by using python3-sphinx
0d2da66
8fed3aa
* Wed Nov 25 2015 Javier Peña <jpena@redhat.com> - 7.0.0-0.6.dev.dev1661.gaf13b7e
8fed3aa
- Do not enable EPEL when installing RDO
8fed3aa
Alan Pevec 466534a
* Wed Nov 25 2015 Alan Pevec <apevec@redhat.com> - 7.0.0-0.5.dev.dev1661.gaf13b7e
Alan Pevec 466534a
- Add symlink to support hiera >= 3.0 rhbz#1284978
Alan Pevec 466534a
Alan Pevec 65106b7
* Thu Oct 29 2015  Javier Pena <jpena@redhat.com> - 7.0.0-0.4.dev1661.gaf13b7e
30faa02
- Use epoch in dependency for openstack-packstack-puppet
30faa02
Alan Pevec 65106b7
* Mon Oct 26 2015  Martin Magr <mmagr@redhat.com> - 7.0.0-0.3.dev1661.gaf13b7e
f2e9925
-  Liberty rebase
f2e9925
Alan Pevec 0993140
* Sat Oct 10 2015  Alan Pevec <apevec@redhat.com> - 2015.2-0.1.dev.dev1654.gcbbf46e
Alan Pevec 0993140
-  Liberty release candidate