[matahari] Upload a new upstream release

Andrew Beekhof beekhof at fedoraproject.org
Mon Jan 31 15:49:14 UTC 2011


commit 8c375cd8cda21096007f59af4d989f1bd6763e0f
Author: Andrew Beekhof <andrew at beekhof.net>
Date:   Mon Jan 31 16:48:52 2011 +0100

    Upload a new upstream release

 .gitignore    |    1 +
 matahari.spec |  172 ++++++++++++++++++++++++++++++++++++++++++++-------------
 sources       |    2 +-
 3 files changed, 136 insertions(+), 39 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a102b20..aaf0b08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 matahari-0.0.5.tar.gz
+/matahari-matahari-8003b6c.tgz
diff --git a/matahari.spec b/matahari.spec
index b396ee6..09b5324 100644
--- a/matahari.spec
+++ b/matahari.spec
@@ -1,33 +1,44 @@
-Summary: Qpid QMF Agent for Ovirt Nodes
-Name: matahari
-Version: 0.0.5
-Release: 4%{?dist}
-Source: http://mcpierce.fedorapeople.org/sources/matahari-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-License: GPLv2
-Group: Applications/System
-URL: http://matahari.fedorahosted.org/
-Patch0: matahari-0.0.5-gcc-fix.patch
-
-Requires: dbus >= 1.2.12
-Requires: hal >= 0.5.12
-Requires: qpid-cpp-client >= 0.6.895736
-Requires: qmf >= 0.6.895736
-Requires: libvirt >= 0.6.2
-Requires: pcre >= 7.8
-
-BuildRequires: gcc-c++ >= 4.4.0
-BuildRequires: dbus-devel >= 1.2.12
-BuildRequires: hal-devel >= 0.5.12
-BuildRequires: qpid-cpp-client-devel >= 0.6.895736
-BuildRequires: qmf-devel >= 0.6.895736
-BuildRequires: libvirt-devel >= 0.6.2
-BuildRequires: pcre-devel >= 7.8
+%global specversion 1
+%global upstream_version 8003b6c
+
+# Keep around for when/if required
+%global alphatag %{upstream_version}.git
+
+%global mh_release %{?alphatag:0.}%{specversion}%{?alphatag:.%{alphatag}}%{?dist}
+
+Name:		matahari
+Version:	0.4.0
+Release:	%{mh_release}
+Summary:	Matahari QMF Agents for Linux guests
+
+Group:		Applications/System
+License:	GPLv2
+URL:		http://matahari.fedorahosted.org
+
+# wget --no-check-certificate -O matahari-matahari-{upstream_version}.tgz https://github.com/matahari/matahari/tarball/{upstream_version}
+Source0:	matahari-matahari-%{upstream_version}.tgz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Requires:	dbus
+Requires:	hal
+Requires:	qmf > 0.7
+Requires:	pcre
+
+BuildRequires:	cmake
+BuildRequires:	libudev-devel
+BuildRequires:	gcc-c++
+BuildRequires:	dbus-devel
+BuildRequires:	hal-devel
+BuildRequires:	qpid-cpp-server-devel > 0.7
+BuildRequires:	qmf-devel > 0.7
+BuildRequires:	pcre-devel
+BuildRequires:	glib2-devel
+BuildRequires:	sigar-devel
 
 %description
 
-Matahari provides a QMF Agent that can be used to control and manage
-various pieces of functionality for an ovirt node, using the AMQP protocol.
+Matahari provides QMF Agents that can be used to control and manage
+various pieces of functionality, using the AMQP protocol.
 
 The Advanced Message Queuing Protocol (AMQP) is an open standard application
 layer protocol providing reliable transport of messages.
@@ -36,31 +47,88 @@ QMF provides a modeling framework layer on top of qpid (which implements
 AMQP).  This interface allows you to manage a host and its various components
 as a set of objects with properties and methods.
 
+%package broker
+License:	GPLv2+
+Summary:	Optional AMQP Broker for Matahari
+Group:		Applications/System
+Requires:	%{name} = %{version}-%{release}
+Requires:	qpid-cpp-server > 0.7
+Requires:	qmf > 0.7
+
+%description broker
+Optional AMQP Broker for Matahari
+
+%package devel
+License:	GPLv2+
+Summary:	Matahari development package
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	qpid-cpp-server-devel > 0.7
+Requires:	qmf-devel > 0.7
+Requires:	glib2-devel
+
+%description devel
+Headers and shared libraries for developing Matahari agents.
+
 %prep
-%setup -q
-%patch0 -p1 -b .gcc
+%setup -q -n matahari-matahari-%{upstream_version}
 
 %build
-%configure
+%{cmake} -DCMAKE_BUILD_TYPE=RelWithDebInfo .
 make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
+%{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
+%{__install} matahari.init   $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-net
+%{__install} matahari.init   $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-host
+%{__install} matahari.init   $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-service
+%{__install} matahari-broker $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/matahari-broker
+
+%{__install} -d $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
+%{__install} matahari.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/matahari
+%{__install} matahari-broker.sysconf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/matahari-broker
+%{__ln_s} qpidd $RPM_BUILD_ROOT/%{_sbindir}/matahari-brokerd
+
+%{__install} -d -m0755 %{buildroot}%{_localstatedir}/lib/%{name}
+%{__install} -d -m0755 %{buildroot}%{_localstatedir}/run/%{name}
+
 %post
-/sbin/chkconfig --level 2345 matahari on
-/sbin/service matahari condrestart
+for svc in net host service ; do
+    /sbin/chkconfig --level 2345 matahari-$svc on
+    /sbin/service matahari-$svc condrestart
+done
+
+%post broker
+/sbin/chkconfig --level 2345 matahari-broker on
+/sbin/service matahari-broker condrestart
 
 %preun
 if [ $1 = 0 ]; then
-    /sbin/service matahari stop >/dev/null 2>&1 || :
-    chkconfig --del matahari
+    for svc in net host service ; do
+       /sbin/service matahari-$svc stop >/dev/null 2>&1 || :
+       chkconfig --del matahari-$svc
+    done
+fi
+
+%preun broker
+if [ $1 = 0 ]; then
+    /sbin/service matahari-broker stop >/dev/null 2>&1 || :
+    chkconfig --del matahari-broker
 fi
 
 %postun
 if [ "$1" -ge "1" ]; then
-    /sbin/service matahari condrestart >/dev/null 2>&1 || :
+    for svc in net host service ; do
+       /sbin/service matahari-$svc condrestart >/dev/null 2>&1 || :
+    done
+fi
+
+%postun broker
+if [ "$1" -ge "1" ]; then
+    /sbin/service matahari-broker condrestart >/dev/null 2>&1 || :
 fi
 
 %clean
@@ -69,15 +137,43 @@ test "x%{buildroot}" != "x" && rm -rf %{buildroot}
 %files
 %defattr(644, root, root, 755)
 %dir %{_datadir}/matahari/
-%{_datadir}/matahari/schema.xml
+%{_libdir}/libm*.so.*
 
-%attr(755, root, root) %{_sbindir}/matahari
-%attr(755, root, root) %{_sysconfdir}/rc.d/init.d/matahari
 %config(noreplace) %{_sysconfdir}/sysconfig/matahari
 
+%attr(755, root, root) %{_initddir}/matahari-net
+%attr(755, root, root) %{_sbindir}/matahari-netd
+
+%attr(755, root, root) %{_initddir}/matahari-host
+%attr(755, root, root) %{_sbindir}/matahari-hostd
+
+%attr(755, root, root) %{_initddir}/matahari-service
+%attr(755, root, root) %{_sbindir}/matahari-serviced
+
 %doc AUTHORS COPYING
 
+%files broker
+%defattr(644, root, root, 755)
+%attr(755, root, root) %{_initddir}/matahari-broker
+%config(noreplace) %{_sysconfdir}/sysconfig/matahari-broker
+%config(noreplace) %{_sysconfdir}/matahari-broker.conf
+%{_sbindir}/matahari-brokerd
+
+%attr(755, qpidd, qpidd) %{_localstatedir}/lib/%{name}
+%attr(755, qpidd, qpidd) %{_localstatedir}/run/%{name}
+
+%files devel
+%defattr(644, root, root, 755)
+%{_datadir}/matahari/schema.xml
+%{_includedir}/matahari.h
+%{_libdir}/libm*.so
+
 %changelog
+* Mon Jan 31 2011 Andrew Beekhof <andrew at beekhof.net> - 0.4.0-0.1.8003b6c.git
+- Improved modular agent design
+- Cross-platform (see mingw32-matahari)
+- Added Networking and Services (supporting LSB and OCF scripts) agents
+
 * Wed Sep 29 2010 jkeating - 0.0.5-4
 - Rebuilt for gcc bug 634757
 
diff --git a/sources b/sources
index 3d069ab..6c71fd5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e80dedf3c2e5a9473f13e9a76a2c4762  matahari-0.0.5.tar.gz
+aad4c9e28c3dd3346d85ebca646702f8  matahari-matahari-8003b6c.tgz


More information about the scm-commits mailing list