فهرست منبع

#960 [RPM Packaging] Adjust line endings in READ and LICENSE files
#962 [RPM Packaging] Added the use of logrotate for cron.log and error.log

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3274 a333f486-631f-4898-b8df-5754b55c2be0

dflaven 11 سال پیش
والد
کامیت
62f8e142f6
3فایلهای تغییر یافته به همراه17 افزوده شده و 4 حذف شده
  1. 7 3
      setup/install/install.sh
  2. 5 0
      setup/install/logrotate.tpl
  3. 5 1
      setup/packaging/rpm/itop-itsm.spec

+ 7 - 3
setup/install/install.sh

@@ -75,6 +75,9 @@ install -m 755 -d $_ITOP_DATADIR_ $_ITOP_LOGDIR_ "$_ITOP_VARLIBDIR_/data"
 echo "Copying files ..."
 cp -a ./web/* $_ITOP_DATADIR_
 
+echo "Fixing line endings in LICENSE and README files"
+sed -i -e "s/\r$//g" ./LICENSE ./README
+
 echo "Creating symlinks..."
 (cd $_ITOP_DATADIR_ ; \
 ln -s $subconf conf ;\
@@ -87,13 +90,14 @@ ln -s $subvar/lib/$_ITOP_NAME_/data data ;\
 
 
 if [ _"$HEAD" != _"" ]; then
-	echo Creating $webconf/conf.d and $conf/../cron.d directories
-	install -m 755 -d $webconf/conf.d $conf/../cron.d
+	echo Creating $webconf/conf.d, $conf/../cron.d and $conf/../logrotate.d directories
+	install -m 755 -d $webconf/conf.d $conf/../cron.d $conf/../logrotate.d
 fi
 
 # Substitute variables for templates
 sed -e "s~_ITOP_NAME_~$_ITOP_NAME_~g" -e "s~_ITOP_SYSCONFDIR_~$subconf~g" -e "s~_ITOP_DATADIR_~$sublocal/share~g" -e "s~_ITOP_LOGDIR_~$subvar/log~g" ./web/setup/install/apache.conf.tpl > $webconf/conf.d/$_ITOP_NAME_.conf
 sed -e "s~_ITOP_NAME_~$_ITOP_NAME_~g" -e "s~_ITOP_SYSCONFDIR_~$subconf~g" -e "s~_ITOP_DATADIR_~$sublocal/share~g" -e "s~_ITOP_LOGDIR_~$subvar/log~g" ./web/setup/install/cron.tpl > $conf/../cron.d/$_ITOP_NAME_
-chmod 644 $webconf/conf.d/$_ITOP_NAME_.conf $conf/../cron.d/$_ITOP_NAME_
+sed -e "s~_ITOP_NAME_~$_ITOP_NAME_~g" -e "s~_ITOP_SYSCONFDIR_~$subconf~g" -e "s~_ITOP_DATADIR_~$sublocal/share~g" -e "s~_ITOP_LOGDIR_~$subvar/log~g" ./web/setup/install/logrotate.tpl > $conf/../logrotate.d/$_ITOP_NAME_
+chmod 644 $webconf/conf.d/$_ITOP_NAME_.conf $conf/../cron.d/$_ITOP_NAME_ $conf/../logrotate.d/$_ITOP_NAME_
 
 exit 0

+ 5 - 0
setup/install/logrotate.tpl

@@ -0,0 +1,5 @@
+_ITOP_LOGDIR_/_ITOP_NAME_/cron.log _ITOP_LOGDIR_/_ITOP_NAME_/error.log {
+    copytruncate
+    notifempty
+    missingok
+}

+ 5 - 1
setup/packaging/rpm/itop-itsm.spec

@@ -11,7 +11,7 @@ Group: Applications/Databases
 License: AGPLv3+
 URL: http://www.combodo.com/itop
 #TODO Adjust the line below to the actual name of the "upstream" zip package
-Source0: iTop-2.0.3-1920.zip
+Source0: iTop-2.0.3-1916.zip
 #Source4: install.sh
 BuildArch: noarch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -54,6 +54,7 @@ rm -rf %{buildroot}
 %{_datadir}/*
 %{webconfdir}/conf.d/%{name}.conf
 %{_sysconfdir}/cron.d/%{name}
+%{_sysconfdir}/logrotate.d/%{name}
 %{_var}/lib/%{name}/approot.inc.php
 
 # TODO: Use a variable below
@@ -71,6 +72,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Tue Jul 15 2014 Denis Flaven <denis.flaven@combodo.com>
+- Added use of logrotate for cron.log and error.log, thanks to Igor Gnatenko
+- Fixed the line endings on README and LICENSE
 * Mon Jul 14 2014 Denis Flaven <denis.flaven@combodo.com>
 - Support of Apache 2.4
 - Packaging of iTop 2.0.3