X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=monitor-server.spec;h=d3b326c2123ed81e26631b588b2947c41f4796da;hb=29c312880142debcc8c36117401b8877a7944dee;hp=a953e861623ac7fbc2a0e992f6f45dc41ac1c2fe;hpb=c37d926831daac873d8868aa471debcc9f918753;p=monitor.git diff --git a/monitor-server.spec b/monitor-server.spec index a953e86..d3b326c 100644 --- a/monitor-server.spec +++ b/monitor-server.spec @@ -6,9 +6,11 @@ %define name monitor-server %define version 1.0 -%define taglevel 5 +%define taglevel 8 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} +%global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" ) + Summary: Monitor backend scripts for server Name: %{name} @@ -27,8 +29,13 @@ URL: %(echo %{url} | cut -d ' ' -f 2) Requires: curl Requires: coreutils Requires: openssh-clients +Requires: perl-libwww-perl +Requires: MySQL-python +Requires: rt3 == 3.4.1 +Requires: nmap + Requires: PLCWWW >= 4.2 -Requires: BootCD >= 4.2 +Requires: bootcd-planetlab-i386 >= 4.2 %description Scripts for polling PLC, the node, and PCU status. Also a collection of @@ -39,13 +46,17 @@ command-line utilities for querying the status database. %build # TODO: note that we should build the cmdamt/ with g++ -echo "There is no build stage. Simply copy files." +cd cmdamt +export TMPDIR=$PWD/tmp +make +cd .. %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/share/%{name} mkdir -p $RPM_BUILD_ROOT/var/lib/%{name} +mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/archive-pdb mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/ echo " * Installing core scripts" @@ -55,10 +66,23 @@ rsync -a --exclude www --exclude archive-pdb --exclude .svn --exclude CVS \ echo " * Installing web pages" rsync -a www/ $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/ -echo " * TODO: Installing cron job for automated polling" -install -D -m 755 %{name}.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name} +echo " * Installing cron job for automated polling" +install -D -m 755 %{name}.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}.cron echo " * TODO: Setting up Monitor account in local MyPLC" +# TODO: + +mkdir -p $RPM_BUILD_ROOT/%{python_sitearch}/monitor +install -d -D -m 755 monitor $RPM_BUILD_ROOT/%{python_sitearch}/monitor +# TODO: need a much better way to do this. +for file in __init__.py database.py config.py ; do + install -D -m 644 monitor/$file $RPM_BUILD_ROOT/%{python_sitearch}/monitor/$file +done +install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py + +touch $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php +chmod 777 $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php +install -D -m 755 monitor-default.conf $RPM_BUILD_ROOT/etc/monitor.conf cp $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig-default.py $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig.py %clean @@ -67,10 +91,15 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %config /usr/share/%{name}/monitorconfig.py +%config /etc/monitor.conf /usr/share/%{name} /var/lib/%{name} /var/www/cgi-bin/monitor -%{_sysconfdir}/cron.d/%{name} +%{_sysconfdir}/cron.d/%{name}.cron +%{python_sitearch}/threadpool.py +%{python_sitearch}/threadpool.pyc +%{python_sitearch}/threadpool.pyo +%{python_sitearch}/monitor %post echo "Post processing" @@ -80,10 +109,22 @@ echo "Post processing" # TODO: create monitorconfig.php using phpconfig.py # TODO: create symlink in /var/lib/monitor-server for chroot environments # TODO: update the content of automate_pl03.sh +# TODO: Use the installed version of bootcd to create custom boot images. ( or, use the api now). #chkconfig --add monitor-server #chkconfig monitor-server on %changelog +* Wed Sep 24 2008 Stephen Soltesz - Monitor-1.0-8 +- These are all changes in the latest Monitor code. I will branch this version +- next, before making additional large changes. + +* Mon Sep 01 2008 Thierry Parmentelat - Monitor-1.0-7 +- Checkpointing current version for 4.2-rc21 - many many changes + +* Mon Aug 11 2008 Stephen Soltesz - Monitor-1.0-6 +- This is a major tag of every thing. probably needs a very different release +- number. + * Wed Jul 30 2008 Stephen Soltesz - Monitor-server-1.0-5 - initial creation of server-side package