[packages/otrs] - moved cron files to proper place
paszczus
paszczus at pld-linux.org
Thu Jan 31 09:31:58 CET 2013
commit 14be7800fffe3dc08a56c9501774967fb9d5ca73
Author: Sławomir Paszkiewicz <paszczus at pld-linux.org>
Date: Thu Jan 31 09:31:54 2013 +0100
- moved cron files to proper place
otrs-paths.patch | 34 +++++++++++++++++++++++-----------
otrs.spec | 12 ++++++------
2 files changed, 29 insertions(+), 17 deletions(-)
---
diff --git a/otrs.spec b/otrs.spec
index 96d0bcf..b804e8d 100644
--- 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
diff --git a/otrs-paths.patch b/otrs-paths.patch
index c98469d..4477e53 100644
--- a/otrs-paths.patch
+++ b/otrs-paths.patch
@@ -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 @@
@@ -169,3 +158,26 @@
# 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 $> "
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/otrs.git/commitdiff/14be7800fffe3dc08a56c9501774967fb9d5ca73
More information about the pld-cvs-commit
mailing list