X-Git-Url: http://git.onelab.eu/?p=plcrt.git;a=blobdiff_plain;f=plcrt.spec;h=a182f9081d66584d555662a2404c8d26b1843cac;hp=9c6f09cb281e4dcb24a70d26f17caf2a9d522cd8;hb=98f75cf5f1846cb14af601ce32b8b6f5fa31a181;hpb=296a63e10fd80ea26778a7d0dbea81db73b9350b diff --git a/plcrt.spec b/plcrt.spec index 9c6f09c..a182f90 100644 --- a/plcrt.spec +++ b/plcrt.spec @@ -6,7 +6,7 @@ %define name plcrt %define version 1.0 -%define taglevel 4 +%define taglevel 9 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} @@ -41,17 +41,43 @@ or PlanetLab in particular. %install +function install_file() +{ + mod=$1 + dest=$2 + file=$3 + if [ -z "$file" ] ; then + file=$( basename $dest ) + fi + if [ -f $file ] ; then + install -D -m $mod $file $dest + fi +} +function chmod_pattern() +{ + mod=$1 + pattern=$2 + for file in $pattern ; do + if [ -f $file ] ; then + chmod $mod $file + fi + done +} + install -d $RPM_BUILD_ROOT/%{_datadir}/%{name} -install -D -m 755 plcrt.init $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/plcrt +install_file 755 $RPM_BUILD_ROOT/%{_sysconfdir}/plc.d/plcrt plcrt.init echo " * Installing core scripts" rsync -a ./ $RPM_BUILD_ROOT/%{_datadir}/%{name}/ +install_file 644 $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/rt.cron +install_file 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/getpersons.py +install_file 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/adduserstort.pl + echo " * Installing cron scripts" -install -D -m 644 rt.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/rt.cron +chmod_pattern 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/cron.d/*.py +chmod_pattern 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/cron.d/*.sh -chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/adduserstort.pl -chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}/cron.d/*.sh %clean rm -rf $RPM_BUILD_ROOT @@ -69,25 +95,28 @@ if grep 'pam_loginuid.so' /etc/pam.d/crond ; then fi if ! grep '' /etc/planetlab/default_config.xml ; then - sed -i 's|| \n RT Configuration\n RT\n \n \n Enabled\n false\n Enable on this machine.\n \n \n Hostname\n localhost.localdomain\n The fully qualified hostname.\n \n \n IP Address\n \n The IP address of the RT server.\n \n \n username\n root\n The user name for RT access.\n \n \n password\n password\n password to the rt user.\n \n -\n Database Password\n \n Password to use when accessing the RT database.\n \n \n \n |' /etc/planetlab/default_config.xml + sed -i 's|| \n RT Configuration\n RT\n \n \n Enabled\n false\n Enable on this machine.\n \n \n Hostname\n localhost.localdomain\n The fully qualified hostname.\n \n \n IP Address\n \n The IP address of the RT server.\n \n \n username\n root\n The user name for RT access.\n \n \n password\n password\n password to the rt user.\n \n \n email list\n root+list@localhost.localdomain\n \n \n \n Database Password\n \n Password to use when accessing the RT database.\n \n \n \n |' /etc/planetlab/default_config.xml fi mkdir -p /etc/planetlab/configs +plc-config --category plc_rt --variable cc_address \ + --value 'root+list@localhost.localdomain'\ + --save /etc/planetlab/default_config.xml /etc/planetlab/default_config.xml + plc-config --category plc_rt --variable enabled --value true \ --save /etc/planetlab/configs/site.xml /etc/planetlab/default_config.xml # NOTE: setup default values until myplc includes them by default. plc-config --category plc_rt --variable host --value localhost.localdomain \ - --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml + --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml plc-config --category plc_rt --variable ip --value "" \ - --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml + --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml plc-config --category plc_rt --variable web_user --value root \ - --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml + --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml plc-config --category plc_rt --variable web_password --value password \ - --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml + --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml plc-config --category plc_rt --variable dbpassword --value "" \ - --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml + --save /etc/planetlab/configs/site.xml /etc/planetlab/configs/site.xml # NOTE: not sure why these aren't setup by the rt package... mkdir -p /var/log/rt3 @@ -97,6 +126,26 @@ chown apache.apache /var/log/rt3/rt.log cp /usr/share/rt3/html/NoAuth/images/bplogo.gif /var/www/html/misc/logo.gif %changelog +* Mon Sep 21 2009 Stephen Soltesz - PLCRT-1.0-9 +- be more selective about which files to chmod + +* Mon Sep 21 2009 Stephen Soltesz - PLCRT-1.0-8 +- shorter polling period for faster sync +- remove attempt to install removed file + +* Sun Sep 20 2009 Stephen Soltesz - PLCRT-1.0-7 +- replace callplcsh with simpler scripts for syncing users + +* Sat Sep 19 2009 Stephen Soltesz - PLCRT-1.0-6 +- some plcs don't return site_ids so getpersons should not depend on this field +- make scripts exec on install +- use RT_HOST name rather than localhost for RT mailgate configuration + +* Wed Jul 08 2009 Stephen Soltesz - PLCRT-1.0-5 +- add mailing list watchers to default queues +- add script to addwatchers to default queues +- improved templates in plcrt.init + * Mon Jul 06 2009 Stephen Soltesz - PLCRT-1.0-4 - rt db password - template conf.d/* files rather than one-shot re-write