X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=monitor-server.spec;h=e6b5fac943a26ed1bfc55c5bbe3329681f777572;hb=944d143a6528c4157b71f51ed480aec806cbaa06;hp=ff755476568ddc3fdee3fd2973987d5b7fbd0251;hpb=269b879964d4fde30d530daf3f9ee8a79c5fac53;p=monitor.git diff --git a/monitor-server.spec b/monitor-server.spec index ff75547..e6b5fac 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 6 %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} @@ -26,7 +28,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: PLCWWW >= 4.2 +Requires: BootCD >= 4.2 %description Scripts for polling PLC, the node, and PCU status. Also a collection of @@ -36,12 +44,18 @@ command-line utilities for querying the status database. %setup -q %build -echo "There is no build stage. Simply copy files." +# TODO: note that we should build the cmdamt/ with g++ +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" @@ -51,27 +65,48 @@ 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}/%{name} +install -D -m 755 monitor $RPM_BUILD_ROOT/%{python_sitearch}/%{name} +install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py + +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 rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -# define a %config entry for /var/share/%{name}/xyz? +%config /usr/share/%{name}/monitorconfig.py /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}/%{name} %post echo "Post processing" # TODO: this will be nice when we have a web-based service running., such as # an API server or so on. +# TODO: create real monitorconfig.py from monitorconfig-default.py +# 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 +* 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