summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-05 08:42:57 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-05 08:42:57 +0200
commitd797654c7720efc552b1151862ecdaa1171065be (patch)
treed9d891e95dad897b32f87edc6e34d6c2fd749e1d
parent5b64ff8f30058852f613b7a4eb795edabc350baa (diff)
glpi: fix logrotate
-rw-r--r--glpi-logrotate1
-rw-r--r--glpi.spec9
2 files changed, 9 insertions, 1 deletions
diff --git a/glpi-logrotate b/glpi-logrotate
index e25627f..e92b6cf 100644
--- a/glpi-logrotate
+++ b/glpi-logrotate
@@ -1,6 +1,7 @@
# Rotate GLPI logs daily, only if not empty
# Save 14 days old logs under compressed mode
/var/log/glpi/*.log {
+ su apache apache
daily
rotate 14
compress
diff --git a/glpi.spec b/glpi.spec
index f18a271..a119d0b 100644
--- a/glpi.spec
+++ b/glpi.spec
@@ -28,7 +28,7 @@
Name: glpi
Version: 0.90.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Free IT asset management software
Summary(fr): Gestion Libre de Parc Informatique
@@ -220,6 +220,10 @@ mkdir -p %{buildroot}%{_localstatedir}/log
mv %{buildroot}/%{_localstatedir}/lib/%{name}/files/_log %{buildroot}%{_localstatedir}/log/%{name}
install -Dpm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+%if 0%{?rhel} == 5 || 0%{?rhel} == 6
+: Remove "su" option from logrotate configuration file - requires logrotate 3.8+
+sed -e '/su /d' -i %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+%endif
# ====== Cron =====
install -Dpm 0644 cron %{buildroot}%{_sysconfdir}/cron.d/%{name}
@@ -323,6 +327,9 @@ fi
%changelog
+* Tue Apr 5 2016 Remi Collet <remi@fedoraproject.org> - 0.90.2-2
+- fix logrotate configuration for recent version
+
* Fri Apr 1 2016 Remi Collet <remi@fedoraproject.org> - 0.90.2-1
- update to 0.90.2