]> git.pld-linux.org Git - packages/otrs.git/commitdiff
- moved cron files to proper place
authorSławomir Paszkiewicz <paszczus@pld-linux.org>
Thu, 31 Jan 2013 08:31:54 +0000 (09:31 +0100)
committerSławomir Paszkiewicz <paszczus@pld-linux.org>
Thu, 31 Jan 2013 08:31:54 +0000 (09:31 +0100)
otrs-paths.patch
otrs.spec

index c98469db992e6008fdb31aced8e0a3b5c3a414a0..4477e53110dc8f32eb0881214eb9e32fb2cae8e1 100644 (file)
@@ -1,14 +1,3 @@
---- otrs-3.2.1/bin/Cron.sh     2012-11-22 12:43:09.000000000 +0100
-+++ otrs-3.2.1.new/bin/Cron.sh 2013-01-29 12:39:20.521608435 +0100
-@@ -45,7 +45,7 @@
- OTRS_HOME="`pwd`"
- cd -
--#OTRS_ROOT=/opt/OpenTRS
-+#OTRS_ROOT=/usr/share/otrs
- if test -e $OTRS_HOME/var/cron; then
-     OTRS_ROOT=$OTRS_HOME
- else
 --- otrs-3.2.1/bin/otrs.SetPermissions.pl      2013-01-24 11:21:14.000000000 +0100
 +++ otrs-3.2.1.new/bin/otrs.SetPermissions.pl  2013-01-29 12:39:39.175799680 +0100
 @@ -82,7 +82,7 @@
  
  # if one of this is false, it will not be checked at the startup!
  # Note: (may be the database isn't on the same host! --> DB_RUNNING=0) 
+--- otrs-3.2.1.new/bin/Cron.sh 2013-01-31 09:29:55.308734799 +0100
++++ otrs-3.2.1/bin/Cron.sh     2012-11-22 12:43:09.000000000 +0100
+@@ -45,16 +45,16 @@
+ OTRS_HOME="`pwd`"
+ cd -
+-#OTRS_ROOT=/usr/share/otrs
+-if test -e /etc/cron.d; then
++#OTRS_ROOT=/opt/OpenTRS
++if test -e $OTRS_HOME/var/cron; then
+     OTRS_ROOT=$OTRS_HOME
+ else
+-    echo "No cronjobs in /etc/cron.d found!";
++    echo "No cronjobs in $OTRS_HOME/var/cron found!";
+     echo " * Check the \$HOME (/etc/passwd) of the OTRS user. It must be the root dir of your OTRS system (e. g. /opt/otrs). ";
+     exit 5;
+ fi
+-CRON_DIR=/etc/cron.d
++CRON_DIR=$OTRS_ROOT/var/cron
+ CRON_TMP_FILE=$OTRS_ROOT/var/tmp/otrs-cron-tmp.$$
+ echo "Cron.sh - start/stop OTRS cronjobs - <\$Revision: 1.22 $> "
index 96d0bcfe6ee4b4fff8f828d095138341e0576bc8..b804e8d69f5dc27348fbf22cbe09a77d1e7009d0 100644 (file)
--- a/otrs.spec
+++ b/otrs.spec
@@ -1,7 +1,6 @@
 # TODO:
 # - separate 3 subpackages: common files, administration and client frontend
 # - all otrs-var into /var/lib/otrs
-# - put cron in proper place
 # - write not so brain-damage init-script...
 #   VERIFY .... rpm -qp .../foo.rpm --provides
 %include    /usr/lib/rpm/macros.perl
@@ -121,8 +120,6 @@ Różne skrypty dla OTRS.
 # copy config file
 cp Kernel/Config/GenericAgent.pm.dist Kernel/Config/GenericAgent.pm
 cd Kernel/Config/ && for foo in *.dist; do cp $foo `basename $foo .dist`; done && cd ../../
-# copy all crontab dist files
-for foo in var/cron/*.dist; do mv $foo var/cron/`basename $foo .dist`; done
 
 # Remove regular CPAN libs - only HTML/Safe.pm has to stay, I can't find it...
 rm -Rf Kernel/cpan-lib/{Authen,Date,Email,IO,MIME,Mail,XML,auto}
@@ -132,7 +129,7 @@ rm -Rf doc/manual/de/
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,%{name}/Config,logrotate.d} \
+install -d $RPM_BUILD_ROOT/etc/{cron.d,logrotate.d,rc.d/init.d,sysconfig,%{name}/Config,logrotate.d} \
        $RPM_BUILD_ROOT{/var/log/{,archive/}%{name},%{_bindir},%{otrsdir}} \
        $RPM_BUILD_ROOT/var/lib/%{name}/{article,pics/stats} \
        $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
@@ -140,6 +137,9 @@ install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,%{name}/Config
 # copy files
 cp -R . $RPM_BUILD_ROOT%{otrsdir}
 
+# copy all crontab dist files
+for foo in var/cron/*.dist; do mv $foo $RPM_BUILD_ROOT/etc/cron.d/otrs.`basename $foo` ; done
+
 # install init-Script & apache2 config
 install scripts/redhat-rcotrs $RPM_BUILD_ROOT/etc/rc.d/init.d/otrs
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/otrs
@@ -237,7 +237,7 @@ fi
 %attr(640,otrs,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/GenericAgent.pm
 %attr(660,otrs,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/ZZZAAuto.pm
 %attr(640,otrs,http) %{_sysconfdir}/%{name}/*.dist
-%attr(644,otrs,http) %config(noreplace) %verify(not md5 mtime size) %{otrsdir}/var/cron/*
+%attr(644,otrs,http) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/*
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
 %attr(755,otrs,http) %dir %{otrsdir}
@@ -402,7 +402,7 @@ fi
 # This entries should be changed into links and proper trigger to move data:
 %attr(751,otrs,http) %dir %{otrsdir}/var/
 %{otrsdir}/var/*.png
-%attr(755,otrs,http) %dir %{otrsdir}/var/cron
+%attr(755,otrs,http) %dir /etc/cron.d
 %attr(2775,otrs,http) %{otrsdir}/var/article
 %attr(755,otrs,http) %{otrsdir}/var/fonts
 %attr(755,otrs,http) %{otrsdir}/var/httpd
This page took 0.180816 seconds and 4 git commands to generate.