From: Josh Durgin Date: Wed, 19 Mar 2014 10:32:07 +0000 (-0700) Subject: packaging: add logrotate config X-Git-Tag: v1.2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d2c30c4aa187cfc21a7ecfa29b1c9893d305400;p=radosgw-agent.git packaging: add logrotate config There's no need to signal running agents since they use a WatchedFileHandler that detects rotation itself. Signed-off-by: Josh Durgin --- diff --git a/debian/rules b/debian/rules index 7d2e9dd..c9449ea 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,10 @@ export DH_VERBOSE=1 %: dh $@ --buildsystem python_distutils --with python2 +override_dh_installlogrotate: + cp logrotate.conf debian/radosgw-agent.logrotate + dh_installlogrotate + override_dh_installinit: install -d -m0755 debian/radosgw-agent/etc/init install -m0644 init-radosgw-agent debian/radosgw-agent/etc/init diff --git a/logrotate.conf b/logrotate.conf new file mode 100644 index 0000000..7be94e4 --- /dev/null +++ b/logrotate.conf @@ -0,0 +1,6 @@ +/var/log/ceph/radosgw-agent/*.log { + rotate 7 + daily + compress + missingok +} diff --git a/radosgw-agent.spec b/radosgw-agent.spec index 3113611..8485525 100644 --- a/radosgw-agent.spec +++ b/radosgw-agent.spec @@ -34,6 +34,7 @@ install -D init-radosgw-agent $RPM_BUILD_ROOT%{_initrddir}/radosgw-agent %install python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +install -m 0644 -D logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/radosgw-agent %clean rm -rf $RPM_BUILD_ROOT @@ -43,3 +44,4 @@ rm -rf $RPM_BUILD_ROOT %dir %{_sysconfdir}/ceph/radosgw-agent/ %dir %{_localstatedir}/log/ceph/radosgw-agent/ %dir %{_localstatedir}/run/ceph/radosgw-agent/ +%config(noreplace) %{_sysconfdir}/logrotate.d/radosgw-agent