From 50e6c9be878a1ce53ee85585f8c8ba23f5431f7009506350eae4fe03034ca7d5 Mon Sep 17 00:00:00 2001 From: Johannes Weberhofer Date: Wed, 29 May 2013 07:26:03 +0000 Subject: [PATCH] Accepting request 176913 from home:weberho:branches:security Included logrotate configuration for fail2ban OBS-URL: https://build.opensuse.org/request/show/176913 OBS-URL: https://build.opensuse.org/package/show/security/fail2ban?expand=0&rev=31 --- fail2ban.changes | 5 +++++ fail2ban.logrotate | 13 +++++++++++++ fail2ban.spec | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 fail2ban.logrotate diff --git a/fail2ban.changes b/fail2ban.changes index 27b1c8c..10d41c8 100644 --- a/fail2ban.changes +++ b/fail2ban.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 28 06:46:54 UTC 2013 - jweberhofer@weberhofer.at + +- Included logrotate configuration for fail2ban + ------------------------------------------------------------------- Tue May 14 10:06:35 UTC 2013 - jweberhofer@weberhofer.at diff --git a/fail2ban.logrotate b/fail2ban.logrotate new file mode 100644 index 0000000..056d894 --- /dev/null +++ b/fail2ban.logrotate @@ -0,0 +1,13 @@ +/var/log/fail2ban.log { + compress + dateext + maxage 365 + rotate 99 + size=+4096k + notifempty + missingok + create 644 root root + postrotate + fail2ban-client set logtarget /var/log/fail2ban.log 1>/dev/null || true + endscript +} diff --git a/fail2ban.spec b/fail2ban.spec index a13ef2a..7f6a649 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -28,6 +28,7 @@ Requires: python-pyinotify %if 0%{?suse_version} >= 1220 Requires: python-gamin %endif +BuildRequires: logrotate BuildRequires: python-devel PreReq: %fillup_prereq Version: 0.8.9 @@ -42,6 +43,7 @@ Group: Productivity/Networking/Security Source0: %{name}-%{version}.tar.gz Source1: %{name}.init Source2: %{name}.sysconfig +Source3: %{name}.logrotate %description Fail2ban scans log files like /var/log/messages and bans IP addresses @@ -75,6 +77,9 @@ ln -sf %{_initrddir}/%{name} ${RPM_BUILD_ROOT}%{_sbindir}/rc%{name} install -d -m755 $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name} +install -d -m755 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d +install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/fail2ban + %post %{fillup_only} @@ -93,6 +98,7 @@ install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{n %config(noreplace) %{_sysconfdir}/%{name}/*.conf %config(noreplace) %{_sysconfdir}/%{name}/action.d/*.conf %config(noreplace) %{_sysconfdir}/%{name}/filter.d/*.conf +%config %{_sysconfdir}/logrotate.d/fail2ban %{_initrddir}/%{name} %{_bindir}/%{name}* %{_sbindir}/rc%{name}