[openstack-keystone/el6] Fleshed out the majority of the spec file, added correct sphinx10 deps. There is no 2011.3 at launch

oneiroi oneiroi at fedoraproject.org
Fri Oct 21 19:35:14 UTC 2011


commit fcdee6e5b9835982bca3e80b474929799d8b49b5
Author: David Busby <oneiroi at fedoraproject.org>
Date:   Fri Oct 21 20:34:47 2011 +0100

    Fleshed out the majority of the spec file, added correct sphinx10 deps.
    There is no 2011.3 at launchpad at the moment as such fedpkg build will fail.

 .gitignore              |    1 +
 openstack-keystone.spec |  154 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                 |    1 +
 3 files changed, 156 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..a123ed7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+keystone-2011.3.tar.gz
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
new file mode 100644
index 0000000..da870ac
--- /dev/null
+++ b/openstack-keystone.spec
@@ -0,0 +1,154 @@
+
+%global milestone d4
+%global snaptag ~%{milestone}~%{snapdate}.%{git_revno}
+
+Name:           openstack-keystone
+Version:        2011.3
+Release:        1%{?dist}
+Summary:        OpenStack Identity Service
+
+License:        ASL 2.0
+URL:            http://keystone.openstack.org/
+Source0:        https://launchpad.net/glance/diablo/2011.3/glance-%{version}.tar.gz
+Source1:        openstack-keystone.logrotate
+Source2:        openstack-keystone.service
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  python-sphinx10
+BuildRequires:  systemd-units
+
+Requires:       python-eventlet
+Requires:       python-httplib2
+Requires:       python-ldap
+Requires:       python-lxml
+Requires:       python-memcached
+Requires:       python-paste
+Requires:       python-paste-deploy
+Requires:       python-paste-script
+Requires:       python-routes
+Requires:       python-sqlalchemy
+Requires:       python-sqlite2
+Requires:       python-webob
+Requires:	python-passlib
+
+Requires(post):   systemd-units
+Requires(preun):  systemd-units
+Requires(postun): systemd-units
+Requires(pre):    shadow-utils
+
+%description
+Keystone is a proposed independent authentication service for
+OpenStack (http://www.openstack.org).
+
+This initial proof of concept aims to address the current use cases in
+Swift and Nova which are:
+
+* REST-based, token auth for Swift
+* many-to-many relationship between identity and tenant for Nova.
+
+
+%prep
+%setup -q -n keystone-%{version}
+
+sed -i 's|\(log_file = \)\(keystone.log\)|\1%{_localstatedir}/log/keystone/\2|' etc/keystone.conf
+sed -i 's|\(sql_connection = sqlite:///\)keystone.db|\1%{_sharedstatedir}/keystone/keystone.sqlite|' etc/keystone.conf
+
+find . \( -name .gitignore -o -name .placeholder \) -delete
+find keystone -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
+
+
+%build
+%{__python} setup.py build
+find examples -type f -exec chmod 0664 \{\} \;
+
+%install
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+install -p -D -m 644 etc/keystone.conf %{buildroot}%{_sysconfdir}/keystone/keystone.conf
+install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-keystone
+install -p -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/openstack-keystone.service
+install -d -m 755 %{buildroot}%{_sharedstatedir}/keystone
+install -d -m 755 %{buildroot}%{_localstatedir}/log/keystone
+
+rm -rf %{buildroot}%{python_sitelib}/tools
+rm -rf %{buildroot}%{python_sitelib}/examples
+rm -rf %{buildroot}%{python_sitelib}/doc
+
+# docs generation requires everything to be installed first
+export PYTHONPATH="$( pwd ):$PYTHONPATH"
+pushd doc
+make
+popd
+# Fix hidden-file-or-dir warnings
+rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
+
+%pre
+getent group keystone >/dev/null || groupadd -r keystone
+getent passwd keystone >/dev/null || \
+useradd -r -g keystone -d %{_sharedstatedir}/keystone -s /sbin/nologin \
+-c "OpenStack Keystone Daemons" keystone
+exit 0
+
+%post
+if [ $1 -eq 1 ] ; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable openstack-keystone.service > /dev/null 2>&1 || :
+    /bin/systemctl stop openstack-keystone.service > /dev/null 2>&1 || :
+fi
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+    # Package upgrade, not uninstall
+    /bin/systemctl try-restart openstack-keystone.service >/dev/null 2>&1 || :
+fi
+
+%files
+%doc README.md
+%doc doc/build/html
+%doc examples
+%{python_sitelib}/*
+%{_bindir}/keystone*
+%{_unitdir}/openstack-keystone.service
+%dir %{_sysconfdir}/keystone
+%config(noreplace) %{_sysconfdir}/keystone/keystone.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/openstack-keystone
+%dir %attr(-, keystone, keystone) %{_sharedstatedir}/keystone
+%dir %attr(-, keystone, keystone) %{_localstatedir}/log/keystone
+
+%changelog
+* Fri Oct 21 2011 David Busby <oneiroi at fedoraproject.com> - 2011.3-1
+- Update to Diablo Final d3
+
+* Wed Oct 19 2011 Matt Domsch <Matt_Domsch at dell.com> - 1.0-0.4.d4.1213
+- add Requires: python-passlib
+
+* Mon Oct 3 2011 Matt Domsch <Matt_Domsch at dell.com> - 1.0-0.2.d4.1213
+- update to diablo release.
+- BR systemd-units for _unitdir
+
+* Fri Sep  2 2011 Mark McLoughlin <markmc at redhat.com> - 1.0-0.2.d4.1078
+- Use upstream snapshot tarball
+- No need to define python_sitelib anymore
+- BR python2-devel
+- Remove BRs only needed for unit tests
+- No need to clean buildroot in install anymore
+- Use slightly more canonical site for URL tag
+- Prettify the requires tags
+- Cherry-pick tools.tracer patch from upstream
+- Add config file
+- Add keystone user and group
+- Ensure log file is in /var/log/keystone
+- Ensure the sqlite db is in /var/lib/keystone
+- Add logrotate support
+- Add system units
+
+* Thu Sep  1 2011 Matt Domsch <Matt_Domsch at dell.com> - 1.0-0.1.20110901git396f0bfd%{?dist}
+- initial packaging
diff --git a/sources b/sources
index e69de29..1c10883 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+89b621b75d72928a85f50891606df397  keystone-2011.3.tar.gz


More information about the scm-commits mailing list