[openstack-keystone] initial import

Matt Domsch mdomsch at fedoraproject.org
Tue Oct 4 13:16:37 UTC 2011


commit 0b714a355fc71d52b56d723b6ad837c12d2f340a
Author: Matt Domsch <Matt_Domsch at dell.com>
Date:   Tue Oct 4 08:16:12 2011 -0500

    initial import

 .gitignore                   |    1 +
 openstack-keystone.logrotate |    7 ++
 openstack-keystone.service   |   11 +++
 openstack-keystone.spec      |  149 ++++++++++++++++++++++++++++++++++++++++++
 sources                      |    1 +
 5 files changed, 169 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f02f3ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/keystone-1.0~d4~20110930.1213.tar.gz
diff --git a/openstack-keystone.logrotate b/openstack-keystone.logrotate
new file mode 100644
index 0000000..8956a5f
--- /dev/null
+++ b/openstack-keystone.logrotate
@@ -0,0 +1,7 @@
+/var/log/keystone/*.log {
+    weekly
+    rotate 4
+    missingok
+    compress
+    minsize 100k
+}
diff --git a/openstack-keystone.service b/openstack-keystone.service
new file mode 100644
index 0000000..44aa64c
--- /dev/null
+++ b/openstack-keystone.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenStack Identity Service (code-named Keystone)
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=keystone
+ExecStart=/usr/bin/keystone --config-file /etc/keystone/keystone.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack-keystone.spec b/openstack-keystone.spec
new file mode 100644
index 0000000..45aa6ab
--- /dev/null
+++ b/openstack-keystone.spec
@@ -0,0 +1,149 @@
+
+%global milestone d4
+%global git_revno 1213
+%global snapdate 20110930
+%global snaptag ~%{milestone}~%{snapdate}.%{git_revno}
+
+Name:           openstack-keystone
+Version:        1.0
+Release:        0.3.%{milestone}.%{git_revno}%{?dist}
+Summary:        OpenStack Identity Service
+
+License:        ASL 2.0
+URL:            http://keystone.openstack.org/
+Source0:        http://keystone.openstack.org/tarballs/keystone-%{version}%{snaptag}.tar.gz
+Source1:        openstack-keystone.logrotate
+Source2:        openstack-keystone.service
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  python-sphinx >= 1.0
+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(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
+* 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..82b556c 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6fa7c8a07dcd26fa2e8098b1d25e4b8f  keystone-1.0~d4~20110930.1213.tar.gz


More information about the scm-commits mailing list