X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=omf-resctl.spec;h=f36725a60b3e4045992a3260685e4d74b95d177b;hb=14c76fd7be356fddfefae36ab11f98ac62be4a63;hp=35c9907aa5a28c99aba1f82a0c512be381db0995;hpb=e463256d11740a4e0fae3b35d5263841398d232b;p=omf.git diff --git a/omf-resctl.spec b/omf-resctl.spec index 35c9907..f36725a 100644 --- a/omf-resctl.spec +++ b/omf-resctl.spec @@ -1,36 +1,30 @@ -# -# $Id: madwifi.spec 16422 2010-01-04 11:33:08Z thierry $ -# -%define url $URL: svn+ssh://thierry@svn.planet-lab.org/svn/madwifi/trunk/madwifi.spec $ - -# Marc E. Fiuczynski -# 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 release 1ubuntu2-2 -%define taglevel 1 +%define taglevel 9 -%define actual_name %{name}-%{version}-%{release} +%define plc_name %{name}-%{version}-%{taglevel} +%define resctl_actual_name omf-resctl-5.3-1ubuntu11-2 Summary: OMF Resource Controller - for slivers Name: %{name} Version: %{version} -Release: %{release} +Release: %{taglevel} License: GPL -Group: System Environment/Kernel -Source0: %{actual_name}.noarch.rpm -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Group: System Environment/Base +Source0: %{plc_name}.tar.bz2 +BuildRoot: %{_tmppath}/%{plc_name}-buildroot Vendor: NICTA -Packager: PlanetLab -Distribution: PlanetLab %{plrelease} -URL: %(echo %{url} | cut -d ' ' -f 2) +Packager: PlanetLab +Distribution: %{pldistro} %{plrelease} +URL: %{SCMURL} + +BuildArch: noarch -Requires: imagezip -Requires: liblog4r-ruby1.8 -Requires: libxmpp4r-ruby1.8 Requires: pciutils Requires: ruby Requires: wget @@ -38,31 +32,91 @@ Requires: wireless-tools Requires: rpmlib(CompressedFileNames) <= 3.0.4-1 Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 -Requires: omf-common-5.3 +Requires: omf-common +Requires: liblog4r +Requires: libxmpp4r +#Requires: imagezip -%description The OMF Resource Controller (RC) is the experiment-side -of the Experiment Eontroller (EC) that lets experimenter control their +%description +The OMF Resource Controller (RC) is the experiment-side of the +Experiment Eontroller (EC) that lets experimenter control their resources. It relies on an XMPP server for exchanging with its EC. +#################### +%define common_actual_name omf-common-5.3-1ubuntu10-2 + +%package -n omf-common +Summary: OMF common utilities +Group: System Environment/Base +%description -n omf-common +Provides utilities common to various OMF components + +#################### +%define liblog4r_actual_name liblog4r-ruby1.8-1.2-1 + +%package -n liblog4r +Summary: A logging library for Ruby +Group: System Environment/Base +%description -n liblog4r +A logging library for Ruby, needed by OMF software + +#################### +%define libxmpp4r_actual_name libxmpp4r-ruby1.8-1.0-1 + +%package -n libxmpp4r +Summary: XMPP/Jabber library for Ruby +Group: System Environment/Base +%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 -%setup -n %{actual_name} +%setup -n %{plc_name} %build rm -rf $RPM_BUILD_ROOT -make sources mkdir unwrap -cd unwrap -rpm2cpio ../omf-resctl*.rmp | cpio -diu + +make omf-resctl +(cd unwrap; rpm2cpio ../%{resctl_actual_name}.noarch.rpm | cpio -diu) +make omf-common +(cd unwrap ; rpm2cpio ../%{common_actual_name}.noarch.rpm | cpio -diu) +make liblog4r +(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) + +# 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 -av unwrap/ $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 +#################### %files %defattr(-,root,root) /etc @@ -70,8 +124,77 @@ rm -rf $RPM_BUILD_ROOT /usr/share/omf-resctl-%{version} /usr/share/doc +# %post -# tweak config in /etc/omf-resctl-5.3/ -mkdir /etc/omf-resctl-5.3/ +if [ -x /sbin/chkconfig ] ; then + /sbin/chkconfig --add omf-resctl-%{version} + /sbin/chkconfig omf-resctl-%{version} on + service omf-resctl-%{version} restart +fi + +%preun +# 0 = erase, 1 = upgrade +if [ $1 -eq 0 ] ; then + service omf-resctl-%{version} stop + /sbin/chkconfig omf-resctl-%{version} off + /sbin/chkconfig --del omf-resctl-%{version} +fi + +#################### +%files -n omf-common +%defattr(-,root,root) +/usr/share/omf-common-%{version} +/usr/share/doc/omf-common-%{version} + +# +%post -n omf-common +ln -s /usr/bin/ruby /usr/bin/ruby1.8 + +#################### +%files -n liblog4r +%defattr(-,root,root) +/usr/lib/ruby/1.8/log4r.rb +/usr/lib/ruby/1.8/log4r +/usr/share/doc/liblog4r-ruby1.8 +#################### +%files -n libxmpp4r +%defattr(-,root,root) +/usr/lib/ruby/1.8/xmpp4r.rb +/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 +* Mon Jan 24 2011 Thierry Parmentelat - omf-5.3-9 +- no semantic change - just fixed specfile for git URL + +* Mon Aug 30 2010 Baris Metin - omf-5.3-8 +- new packages from NICTA + +* Tue Jul 13 2010 Baris Metin - omf-5.3-7 +- fix omf-expctl build + +* Thu Jul 08 2010 Baris Metin - omf-5.3-6 +- updated omf packages + +* Tue Jun 22 2010 Thierry Parmentelat - omf-5.3-5 +- cleaned up specfile for smoother upgrades + +* Tue May 25 2010 Thierry Parmentelat - omf-5.3-4 +- fix stupid typo in tag 5.3-3 + +* Tue May 25 2010 Thierry Parmentelat - 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 - omf-5.3-2 +- package the exp. controller as well for user convenience +