Hiya,
I've written up some notes of my experience building matahari from source on F14/15.
I also describe one way to work around the missing patch in the distribution-provided qpid
packages.
- antoine
--
# Matahari development environment notes
## Install Dependencies
You'll need the following for the `make linux.build` target:
yum install cmake sigar-devel pcre-devel dbus-devel \
dbus-glib-devel polkit-devel libxslt
You'll need these for the `make windows.build` target:
yum install mingw32-gcc-c++ mingw32-boost mingw32-libxslt \
mingw32-gnutls mingw32-filesystem mingw32-glib2 \
mingw32-pcre mingw32-sigar
If you want to use mock to build matahari RPM's you'll also want:
yum install mock
## Build Patched RPM's for qpid-cpp
The version of `qpid` shipping with Fedora 14 & 15 is missing a patch
that adds v2.0 API support to the `qmf-gen` tool. To build matahari
you will first need to install a newer version of the qpid-cpp-*
packages.
This short guide will walk you through the process of building updated
packages and creating a local repo that can also be used by the `make
PROFILE=... mock` build target.
Download source RPM from:
http://kojipkgs.fedoraproject.org/packages/qpid-cpp/0.8/8.fc16/src/
Build RPM's:
rpmbuild --rebuild qpid-cpp-0.8-8.fc16.src.rpm
Create local repo:
createrepo ~/rpmbuild/RPMS
Add repo to yum, edit: `/etc/yum.repos.d/matahari-qpid.repo`
[matahari-qpid]
name=matahari-qpid
baseurl=file:///home/<user>/rpmbuild/RPMS
enabled=1
gpgcheck=0
Disable distribution-provided matahari & qpid, edit: `/etc/yum.repos.d/fedora.repo`
[fedora]
name=Fedora $releasever - $basearch
.
.
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
exclude=qmf-* python-qmf* mingw32-matahari* matahari* ruby-qmf* mingw32-qpid-* qpid-*
python-qpid*
You can now install the patched qpid using yum:
yum install qpid-qmf qpid-cpp-client-devel qpid-qmf-devel \
qpid-cpp-server qpid-cpp-server-ssl qpid-cpp-client \
qpid-cpp-client-ssl qpid-tools python-qpid-qmf
## Compile sources
Compile for Linux:
make linux.build
Cross-compile for Windows:
make windows.build
## Build packages with mock
Create a new mock profile:
cp /etc/mock/`rpm --eval fedora-%{fedora}-%{_arch}`.cfg /etc/mock/`rpm --eval
fedora-%{fedora}-%{_arch}`-matahari.cfg
Add matahari-qpid repo to new mock profile, edit:
.
.
[matahari-qpid]
name=matahari-qpid
baseurl=file:///home/<user>/rpmbuild/RPMS
enabled=1
gpgcheck=0
You'll also need to make a few changes to matahari.spec to accommodate
qpid package name changes:
diff --git a/matahari.spec b/matahari.spec
index 9801099..c14b2c7 100644
--- a/matahari.spec
+++ b/matahari.spec
@@ -23,7 +23,7 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# NOTE: The host API uses dbus for the machine uuid
Requires: dbus
-Requires: qmf > 0.7
+Requires: qpid-qmf > 0.7
Requires: pcre
BuildRequires: cmake
@@ -35,7 +35,7 @@ BuildRequires: sigar-devel
%if %{with qmf}
BuildRequires: qpid-cpp-client-devel > 0.7
-BuildRequires: qmf-devel > 0.7
+BuildRequires: qpid-qmf-devel > 0.7
%endif
%if %{with dbus}
@@ -63,7 +63,7 @@ Group: Applications/System
Requires: %{name} = %{version}-%{release}
Requires: qpid-cpp-server > 0.7
Requires: qpid-cpp-server-ssl > 0.7
-Requires: qmf > 0.7
+Requires: qpid-qmf > 0.7
%description broker
Optional AMQP Broker for Matahari
@@ -146,7 +146,7 @@ Requires: %{name} = %{version}-%{release}
Requires: %{name}-lib = %{version}-%{release}
Requires: %{name}-agent-lib = %{version}-%{release}
Requires: qpid-cpp-client-devel > 0.7
-Requires: qmf-devel > 0.7
+Requires: qpid-qmf-devel > 0.7
Requires: glib2-devel
You can now build matahari packages with your new mock profile:
make PROFILE=`rpm --eval fedora-%{fedora}-%{_arch}`-matahari mock
## Test build
Start matahari broker:
service matahari-broker start
Start the matahari host agent:
cd src/host
./matahari-qmf-hostd -b localhost -p 49000
Query agent with `qmf-tool`:
qmf-tool localhost:49000
list agents
set default <# of matahari agent>
query Host org.matahariproject
show <# of message>