#
%define url $URL$
-# Marc E. Fiuczynski <mef@cs.princeton.edu>
-# Copyright (C) 2006 The Trustees of Princeton University
+# Thierry Parmentelat - INRIA
+# Copyright (C) 2010 INRIA
# License is GPL.
%define name omf-resctl
%define version 5.3
-%define taglevel 1
+%define taglevel 4
%define plc_name %{name}-%{version}-%{taglevel}
%define actual_name omf-resctl-5.3-1ubuntu2-2
Packager: PlanetLab <devel@planet-lab.org>
Distribution: %{pldistro} %{plrelease}
URL: %(echo %{url} | cut -d ' ' -f 2)
-BuildArch: noarch
+# BuildArch: noarch
-Requires: imagezip
Requires: pciutils
Requires: ruby
Requires: wget
Requires: omf-common
Requires: liblog4r
Requires: libxmpp4r
+Requires: imagezip
%description
The OMF Resource Controller (RC) is the experiment-side of the
%description -n libxmpp4r
An XMPP/Jabber library for Ruby, needed by OMF software
+####################
+%define imagezip_actual_name imagezip-1.0.0-3
+
+%package -n imagezip
+Summary: filesystem image compression tool from EMULAB
+Group: System Environment/Base
+%description -n imagezip
+filesystem image compression tool from EMULAB
+
####################
%prep
(cd unwrap; rpm2cpio ../%{liblog4r_actual_name}.noarch.rpm | cpio -diu)
make libxmpp4r
(cd unwrap; rpm2cpio ../%{libxmpp4r_actual_name}.noarch.rpm | cpio -diu)
+make imagezip
+(cd unwrap; rpm2cpio ../%{imagezip_actual_name}.i386.rpm | cpio -diu)
-# cleanup svn sequels
+# remove any default config if any
+rm -f unwrap/etc/omf-resctl-%{version}/omf-resctl.yaml
+
+# cleanup any svn sequels
find unwrap -type d -name .svn -print0 | xargs -0 rm -rf
+
%install
rm -fr $RPM_BUILD_ROOT
rsync -a unwrap/ $RPM_BUILD_ROOT
+install -D -m 600 omf-resctl.yaml.in $RPM_BUILD_ROOT/etc/omf-resctl-%{version}/omf-resctl.yaml.in
+
%clean
rm -rf $RPM_BUILD_ROOT
#
%post
-mkdir /etc/omf-resctl-5.3/
-# xxx tweak config in /etc/omf-resctl-5.3/
-/sbin/chkconfig --add omf-resctl-5.3
-service omf-resctl-5.3 restart
+/sbin/chkconfig --add omf-resctl-%{version}
+/sbin/chkconfig omf-resctl-%{version} on
+service omf-resctl-%{version} restart
+
+%preun
+service omf-resctl-%{version} stop
+/sbin/chkconfig omf-resctl-%{version} off
+/sbin/chkconfig --del omf-resctl-%{version}
####################
%files -n omf-common
/usr/lib/ruby/1.8/xmpp4r
/usr/share/doc/libxmpp4r-ruby1.8
+####################
+%files -n imagezip
+%defattr(-,root,root)
+/usr/bin/imagedump
+/usr/bin/imageunzip
+/usr/bin/imagezip
+/usr/share/doc/imagezip
+
####################
%changelog
+* Tue May 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-4
+- fix stupid typo in tag 5.3-3
+
+* Tue May 25 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-3
+- fetch from the tagged omf-5.3-federation-v1.1 - and turn SHA1SUM checking back on again
+
+* Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - omf-5.3-2
+- package the exp. controller as well for user convenience
+