[openstack-zaqar] Initial commit

Eduardo Javier Echeverria Alvarado echevemaster at fedoraproject.org
Wed Oct 1 06:57:02 UTC 2014


commit 9b236aa2806f51304ae45a38eaa97d5bce4d0b72
Author: Eduardo Echeverria <echevemaster at gmail.com>
Date:   Wed Oct 1 02:26:42 2014 -0430

    Initial commit

 .gitignore                                  |    1 +
 0001-Remove-runtime-dependency-on-PBR.patch |   36 ++++++
 openstack-zaqar.logrotate                   |    7 +
 openstack-zaqar.service                     |   12 ++
 openstack-zaqar.spec                        |  163 +++++++++++++++++++++++++++
 sources                                     |    1 +
 zaqar-dist.conf                             |    5 +
 7 files changed, 225 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..1b01b21 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/zaqar-2014.2.b3.tar.gz
diff --git a/0001-Remove-runtime-dependency-on-PBR.patch b/0001-Remove-runtime-dependency-on-PBR.patch
new file mode 100644
index 0000000..cd6eb4f
--- /dev/null
+++ b/0001-Remove-runtime-dependency-on-PBR.patch
@@ -0,0 +1,36 @@
+--- zaqar-2014.2.dev98.g89aa8d0-orig/zaqar/version.py	2014-09-01 20:36:53.682000000 -0430
++++ zaqar-2014.2.dev98.g89aa8d0/zaqar/version.py	2014-09-01 20:43:39.133000000 -0430
+@@ -13,11 +13,30 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ 
+-import pbr.packaging
+-import pbr.version
++ZAQAR_VENDOR = "Openstack Foundation"
++ZAQAR_PRODUCT = "Openstack Zaqar"
++ZAQAR_PACKAGE = None # Os distro package version suffix
+ 
++class VersionInfo(object):
++    release = "REDHATRELEASE"
++    version = "REDHATVERSION"
+ 
+-version_info = pbr.version.VersionInfo('zaqar')
++    def version_string(self):
++        return self.version
++
++    def cached_version_string(self):
++        return self.version
++
++    def release_string(self):
++        return self.release
++
++    def canonical_version_string(self):
++        return self.version
++
++    def version_string_with_vcs(self):
++        return self.release
++
++version_info = VersionInfo()
+ 
+ 
+ def verify_sha(expected):
diff --git a/openstack-zaqar.logrotate b/openstack-zaqar.logrotate
new file mode 100644
index 0000000..4a4ba7c
--- /dev/null
+++ b/openstack-zaqar.logrotate
@@ -0,0 +1,7 @@
+/var/log/zaqar/*.log {
+    weekly
+    rotate 4
+    missingok
+    compress
+    minsize 100k
+}
diff --git a/openstack-zaqar.service b/openstack-zaqar.service
new file mode 100644
index 0000000..f50eb62
--- /dev/null
+++ b/openstack-zaqar.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenStack Message Queuing Service (code-named Marconi) server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=zaqar
+ExecStart=/usr/bin/zaqar-server
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/openstack-zaqar.spec b/openstack-zaqar.spec
new file mode 100644
index 0000000..63457f9
--- /dev/null
+++ b/openstack-zaqar.spec
@@ -0,0 +1,163 @@
+%global project zaqar
+Name:           openstack-%{project}
+Version:        2014.2
+Release:        0.3.b3%{?dist}
+Summary:        Message queuing service for OpenStack
+
+Group:          Applications/System
+License:        ASL 2.0
+URL:            https://wiki.openstack.org/wiki/Zaqar
+Source0:        http://tarballs.openstack.org/zaqar/%{project}-%{version}.b3.tar.gz
+Source1:        %{project}-dist.conf
+
+Source10:       %{name}.service
+Source11:       %{name}.logrotate
+
+Patch0001: 0001-Remove-runtime-dependency-on-PBR.patch
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  systemd
+BuildRequires:  python-setuptools
+BuildRequires:  python-pbr
+BuildRequires:  openstack-utils
+
+Obsoletes:      openstack-marconi < 2014.1-2.2
+
+Requires(pre):  shadow-utils
+Requires(post):   systemd
+Requires(preun):  systemd
+Requires(postun): systemd
+
+Requires:         python-six
+Requires:         python-stevedore
+Requires:         python-jsonschema
+Requires:         python-oslo-config
+Requires:         python-oslo-utils
+Requires:         python-oslo-i18n
+Requires:         python-falcon
+Requires:         python-pymongo
+Requires:         python-sqlite3dbm
+Requires:         python-memcached
+Requires:         python-babel
+Requires:         python-bson
+Requires:         python-sqlalchemy
+Requires:         python-keystoneclient
+Requires:         python-netaddr
+Requires:         python-iso8601
+Requires:         python-msgpack
+Requires:         python-webob
+Requires:         python-posix_ipc
+
+%description
+Zaqar is a new OpenStack project to create a multi-tenant cloud queuing 
+service.The project will define a clean, RESTful API, use a modular 
+architecture, and will support both eventing and job-queuing semantics.
+Users will be able to customize Zaqar to achieve a wide range of performance,
+durability, availability,and efficiency goals
+
+%prep
+%setup -q -n %{project}-%{version}.b3
+%patch0001 -p1
+sed -i 's/REDHATVERSION/%{version}/; s/REDHATRELEASE/%{release}/' %{project}/version.py
+
+# Remove the requirements file so that pbr hooks don't add it
+# to distutils requires_dist config
+rm -rf {test-,}requirements.txt
+
+%build
+%{__python2} setup.py build
+
+# Programmatically update defaults in sample configs
+
+#  First we ensure all values are commented in appropriate format.
+#  Since icehouse, there was an uncommented keystone_authtoken section
+#  at the end of the file which mimics but also conflicted with our
+#  distro editing that had been done for many releases.
+sed -i '/^[^#[]/{s/^/#/; s/ //g}; /^#[^ ]/s/ = /=/' etc/%{project}.conf.sample etc/logging.conf.sample
+
+#  TODO: Make this more robust
+#  Note it only edits the first occurance, so assumes a section ordering in sample
+#  and also doesn't support multi-valued variables like dhcpbridge_flagfile.
+while read name eq value; do
+  test "$name" && test "$value" || continue
+  sed -i "0,/^# *$name=/{s!^# *$name=.*!#$name=$value!}" etc/%{project}.conf.sample
+done < %{SOURCE1}']'
+
+
+%install
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+ 
+# Setup directories
+install -d -m 755 %{buildroot}%{_unitdir}
+install -d -m 755 %{buildroot}%{_datadir}/%{project}
+install -d -m 755 %{buildroot}%{_sharedstatedir}/%{project}
+install -d -m 755 %{buildroot}%{_localstatedir}/log/%{project}
+
+# Install config files
+install -p -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/%{project}/%{project}-dist.conf
+install -d -m 755 %{buildroot}%{_sysconfdir}/%{project}
+
+install -p -D -m 640 etc/%{project}.conf.sample %{buildroot}%{_sysconfdir}/%{project}/%{project}.conf
+install -p -D -m 640 etc/logging.conf.sample    %{buildroot}%{_sysconfdir}/%{project}/logging.conf
+
+# Install logrotate
+install -p -D -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+
+# Install initscripts
+install -p -m 644 %{SOURCE10} %{buildroot}%{_unitdir}
+
+%pre
+USERNAME=%{project}
+GROUPNAME=$USERNAME
+HOMEDIR=%{_sharedstatedir}/$USERNAME
+getent group $GROUPNAME >/dev/null || groupadd -r $GROUPNAME
+getent passwd $USERNAME >/dev/null || \
+  useradd -r -g $GROUPNAME -G $GROUPNAME -d $HOMEDIR -s /sbin/nologin \
+    -c "OpenStack Zaqar Daemon" $USERNAME
+exit 0
+
+%post
+%systemd_post openstack-zaqar.service
+
+%preun
+%systemd_preun openstack-zaqar.service
+
+%postun
+%systemd_postun_with_restart openstack-zaqar.service
+
+%files
+%doc LICENSE README.rst
+
+%dir %{_sysconfdir}/%{project}
+%config(noreplace) %attr(0640, root, %{project}) %{_sysconfdir}/%{project}/%{project}.conf
+%config(noreplace) %attr(0640, root, %{project}) %{_sysconfdir}/%{project}/logging.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+
+%dir %attr(0755, %{project}, root) %{_localstatedir}/log/%{project}
+
+%{_bindir}/marconi-server
+%{_bindir}/%{project}-server
+%{_bindir}/%{project}-bench
+%{_bindir}/%{project}-gc
+
+%{_datarootdir}/%{project}
+
+%defattr(-, %{project}, %{project}, -)
+%dir %{_sharedstatedir}/%{project}
+
+%defattr(-,root,root,-)
+%{_unitdir}/%{name}.service
+%{python_sitelib}/%{project}
+%{python_sitelib}/%{project}-%{version}*.egg-info
+
+%changelog
+* Sun Sep 10 2014 Eduardo Echeverria <echevemaster at gmail.com> 2014.2-0.3.b3
+- Adding missing requires
+
+* Sun Sep 07 2014 Eduardo Echeverria <echevemaster at gmail.com> 2014.2-0.2.b3
+- Adding obsoletes to the spec.
+
+* Fri Aug 22 2014 Eduardo Echeverria <echevemaster at gmail.com> 2014.2-0.1.b3
+- Initial commit
diff --git a/sources b/sources
index e69de29..b85a832 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+aff68e04a22994464866ed6a5c0e7a76  zaqar-2014.2.b3.tar.gz
diff --git a/zaqar-dist.conf b/zaqar-dist.conf
new file mode 100644
index 0000000..fe35ee6
--- /dev/null
+++ b/zaqar-dist.conf
@@ -0,0 +1,5 @@
+[DEFAULT]
+log_file = /var/log/zaqar/zaqar.log
+
+[drivers]
+storage=sqlite


More information about the scm-commits mailing list