Skip to content

Commit 4c0e176

Browse files
committed
#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 SVN:trunk[3274]
1 parent f0f519e commit 4c0e176

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

setup/install/install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ install -m 755 -d $_ITOP_DATADIR_ $_ITOP_LOGDIR_ "$_ITOP_VARLIBDIR_/data"
7575
echo "Copying files ..."
7676
cp -a ./web/* $_ITOP_DATADIR_
7777

78+
echo "Fixing line endings in LICENSE and README files"
79+
sed -i -e "s/\r$//g" ./LICENSE ./README
80+
7881
echo "Creating symlinks..."
7982
(cd $_ITOP_DATADIR_ ; \
8083
ln -s $subconf conf ;\
@@ -87,13 +90,14 @@ ln -s $subvar/lib/$_ITOP_NAME_/data data ;\
8790

8891

8992
if [ _"$HEAD" != _"" ]; then
90-
echo Creating $webconf/conf.d and $conf/../cron.d directories
91-
install -m 755 -d $webconf/conf.d $conf/../cron.d
93+
echo Creating $webconf/conf.d, $conf/../cron.d and $conf/../logrotate.d directories
94+
install -m 755 -d $webconf/conf.d $conf/../cron.d $conf/../logrotate.d
9295
fi
9396

9497
# Substitute variables for templates
9598
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
9699
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_
97-
chmod 644 $webconf/conf.d/$_ITOP_NAME_.conf $conf/../cron.d/$_ITOP_NAME_
100+
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_
101+
chmod 644 $webconf/conf.d/$_ITOP_NAME_.conf $conf/../cron.d/$_ITOP_NAME_ $conf/../logrotate.d/$_ITOP_NAME_
98102

99103
exit 0

setup/install/logrotate.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_ITOP_LOGDIR_/_ITOP_NAME_/cron.log _ITOP_LOGDIR_/_ITOP_NAME_/error.log {
2+
copytruncate
3+
notifempty
4+
missingok
5+
}

setup/packaging/rpm/itop-itsm.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Group: Applications/Databases
1111
License: AGPLv3+
1212
URL: http://www.combodo.com/itop
1313
#TODO Adjust the line below to the actual name of the "upstream" zip package
14-
Source0: iTop-2.0.3-1920.zip
14+
Source0: iTop-2.0.3-1916.zip
1515
#Source4: install.sh
1616
BuildArch: noarch
1717
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -54,6 +54,7 @@ rm -rf %{buildroot}
5454
%{_datadir}/*
5555
%{webconfdir}/conf.d/%{name}.conf
5656
%{_sysconfdir}/cron.d/%{name}
57+
%{_sysconfdir}/logrotate.d/%{name}
5758
%{_var}/lib/%{name}/approot.inc.php
5859

5960
# TODO: Use a variable below
@@ -71,6 +72,9 @@ rm -rf %{buildroot}
7172

7273

7374
%changelog
75+
* Tue Jul 15 2014 Denis Flaven <denis.flaven@combodo.com>
76+
- Added use of logrotate for cron.log and error.log, thanks to Igor Gnatenko
77+
- Fixed the line endings on README and LICENSE
7478
* Mon Jul 14 2014 Denis Flaven <denis.flaven@combodo.com>
7579
- Support of Apache 2.4
7680
- Packaging of iTop 2.0.3

0 commit comments

Comments
 (0)