1 |
%define version 0.1.18 |
2 |
%define release 20 |
3 |
%define name smeserver-fail2ban |
4 |
|
5 |
Summary: fail2ban integration on SME Server |
6 |
Name: %{name} |
7 |
Version: %{version} |
8 |
Release: %{release}%{?dist} |
9 |
Epoch: 9 |
10 |
License: GPL |
11 |
Group: Networking/Daemons |
12 |
Source: %{name}-%{version}.tar.gz |
13 |
Patch0: smeserver-fail2ban-0.1.18.bz10767-adminpanel.patch |
14 |
Patch1: smeserver-fail2ban-0.1.18.bz9709-wordpress.patch |
15 |
Patch2: smeserver-fail2ban-0.1.18.bz10775-sfail2ban.patch |
16 |
Patch3: smeserver-fail2ban-0.1.18-locale-2019-05-15.patch |
17 |
Patch4: smeserver-fail2ban-0.1.18-bz10776-wordpress.patch |
18 |
Patch5: smeserver-fail2ban-0.1.18-bz9669-sogo.patch |
19 |
Patch6: smeserver-fail2ban-0.1.18-bz10814-denylist-display.patch |
20 |
Patch7: smeserver-fail2ban-0.1.18-bz10817-configure.patch |
21 |
Patch8: smeserver-fail2ban-0.1.18.bz10839.patch |
22 |
Patch9: smeserver-fail2ban-0.1.18.bz10370.patch |
23 |
Patch10: smeserver-fail2ban-0.1.18-Add-update-to-createlinks.patch |
24 |
Patch11: smeserver-fail2ban-0.1.18-bz11586-serverfailstostart.patch |
25 |
Patch12: smeserver-fail2ban-0.1.18-bz11636-smanager.patch |
26 |
Patch13: smeserver-fail2ban-0.1.18-locale-2021-08-22.patch |
27 |
Patch14: smeserver-fail2ban-0.1.18-locale-2021-09-08.patch |
28 |
Patch15: smeserver-fail2ban-0.1.18-bz11586-redofailtostart.patch |
29 |
Patch16: smeserver-fail2ban-0.1.18-bz11650.patch |
30 |
|
31 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
32 |
BuildArchitectures: noarch |
33 |
BuildRequires: e-smith-devtools |
34 |
|
35 |
Requires: e-smith-base >= 5.2.0 |
36 |
Requires: fail2ban-server, fail2ban-sendmail |
37 |
Requires: perl-Data-Validate-IP |
38 |
Obsoletes: fail2ban-firewalld, firewalld |
39 |
AutoReqProv: no |
40 |
|
41 |
%description |
42 |
Configure fail2ban on SME Server |
43 |
|
44 |
%changelog |
45 |
* Wed Dec 08 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.18-20.sme |
46 |
- allow baning subnet [SME: 11650] |
47 |
|
48 |
* Wed Oct 27 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1.18-19.sme |
49 |
- Fix my versioning |
50 |
|
51 |
* Wed Oct 27 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1.18-18.sme |
52 |
- Add Requires for perl-Data-Validate-IP [SME: 11720] |
53 |
|
54 |
* Sun Sep 12 2021 Terry Fage <terry.fage@gmail.com> 0.1.18-17.sme |
55 |
- redo fix for typo qpsmtpd status [SME: 11636] |
56 |
|
57 |
* Wed Sep 08 2021 Terry Fage <terry.fage@gmail.com> 0.1.18-16.sme |
58 |
- Update locale 2021-09-08 patch |
59 |
|
60 |
* Sun Aug 22 2021 Terry Fage <terry.fage@gmail.com> 0.1.18-15.sme |
61 |
- Update locale 2021-08-21 patch |
62 |
|
63 |
* Thu Jul 08 2021 Michel Begue <mab974@gmail.com> 0.1.18-14.sme |
64 |
- Add fail2ban panel in smeserver-manager [SME: 11636] |
65 |
- add smanager jail and filter |
66 |
- fix typo for qsmtpd status change |
67 |
- add AutoReqProv so smeserver-manager is not required |
68 |
|
69 |
* Mon May 31 2021 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.18-13.sme |
70 |
- fix requirements and avoid firewalld [SME: 10949] |
71 |
|
72 |
* Tue May 25 2021 Terry Fage <tfage@yahoo.com.au> 0.1.18-12.sme |
73 |
- Server Fails to Start SME10 [SME: 11586] |
74 |
|
75 |
* Mon Apr 19 2021 Brian Read <brianr@bjsystems.co.uk> 0.1.18-11.sme |
76 |
- Initial import to SME10 [SME: 10949] |
77 |
- Add -update event to createlinks. |
78 |
|
79 |
* Wed Nov 27 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-10.sme |
80 |
- fix wordpress template error [SME: 10839] |
81 |
- rewrite rule for [SME: 9719] |
82 |
- add configurable values for recidive jail [SME: 10370] |
83 |
|
84 |
* Wed Oct 16 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-9.sme |
85 |
- propagate configuration changes to fail2ban after submiting changes [SME: 10817] |
86 |
|
87 |
* Wed Oct 16 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-8.sme |
88 |
- fix blocked hosts list not displaying unless smeserver-denyhosts also installed [SME: 10814] |
89 |
|
90 |
* Fri Jul 19 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-7.sme |
91 |
- prevent fail2ban failure if sogo not installed while a backup restored db entries [SME: 9669] |
92 |
|
93 |
* Mon Jun 03 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-6.sme |
94 |
- fix incorrect permissions on sfail2ban [SME: 10775] |
95 |
|
96 |
* Mon Jun 03 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-5.sme |
97 |
- fix wordpress fragment error preventing jail.conf to be updated [SME: 10776] |
98 |
|
99 |
* Tue May 14 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-4.sme |
100 |
- fix missing sfail2ban exec [SME: 10775] |
101 |
- Apply locals |
102 |
|
103 |
* Tue Apr 09 2019 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.18-3.sme |
104 |
- add admin panel [SME: 10767] |
105 |
- add wordpress jails and filters [SME: 9709] |
106 |
|
107 |
* Fri Oct 27 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.1.18-1.sme |
108 |
- Ignore greylisting, from Michael McCarn [SME: 10447] |
109 |
|
110 |
* Thu Nov 17 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.1.17-1.sme |
111 |
- Makes sur log files exist before resuming monitoring after a logrotate |
112 |
[SME: 9875] |
113 |
|
114 |
* Tue Aug 2 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.1.16-1.sme |
115 |
- Add a new prop (FilterValidRemoteHosts) to allow blacklisting of hosts allowed |
116 |
to access the server-manager |
117 |
- Ignore 0.0.0.0/0.0.0.0 by default [SME: 9719] |
118 |
|
119 |
* Tue Jul 5 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.1.15-1.sme |
120 |
- Fix compat with older qpsmtpd |
121 |
|
122 |
* Thu Jun 9 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.1.14-1.sme |
123 |
- Update regex for qpsmtpd 0.96 |
124 |
|
125 |
* Mon Feb 29 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.1.13-1.sme |
126 |
- Ignore failure to get proxy.pac |
127 |
|
128 |
* Fri Jul 24 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.1.12-1.sme |
129 |
- Updates for fail2ban 0.9.2 |
130 |
- Add more httpd jails |
131 |
- Switch to upstream Ejabberd filter |
132 |
|
133 |
* Wed Apr 15 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.1.11-1.sme |
134 |
- Start fail2ban a bit later [SME: 8708] |
135 |
|
136 |
* Tue Jan 27 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.1.10-1.sme |
137 |
- Suspend log monitoring during logrotate [SME: 8708] |
138 |
|
139 |
* Thu Jan 15 2015 Daniel Berteaud <daniel@firewall-services.com> - 0.1.9-1.sme |
140 |
- Fix LL::NG jail name |
141 |
|
142 |
* Wed Sep 17 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.8-1.sme |
143 |
- Restart fail2ban during logrotate event so it re-open apache log file [SME: 8557] |
144 |
|
145 |
* Wed Jun 25 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.7-1.sme |
146 |
- Correctly handle single IP in IgnoreIP prop |
147 |
|
148 |
* Tue Jun 24 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.6-1.sme |
149 |
- Relax proxy regex so requests for proxy.pac aren't matched |
150 |
|
151 |
* Mon Jun 23 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.5-1.sme |
152 |
- Pre-create the logfile so fail2ban can start the first time |
153 |
- Remove most warnings on startup |
154 |
|
155 |
* Wed Apr 23 2014 Daniel Berteaud <daniel@firewall-services.com> - 0.1.4-1.sme |
156 |
- New branch for SME9 |
157 |
- Remove sogo-auth.conf which is included in EL6 build of fail2ban |
158 |
|
159 |
* Wed Dec 18 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.3-1.sme |
160 |
- Fix port, which was incorrectly set to proto |
161 |
|
162 |
* Tue Nov 19 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.2-1.sme |
163 |
- Create the DB entries in one transaction to reduce the amount of log |
164 |
for each ban |
165 |
|
166 |
* Thu Jul 4 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.1-1.sme |
167 |
- Fix service name for LemonLDAP::NG |
168 |
|
169 |
* Tue May 14 2013 Daniel Berteaud <daniel@firewall-services.com> - 0.1.0-1.sme |
170 |
- initial release |
171 |
|
172 |
%prep |
173 |
%setup -q -n %{name}-%{version} |
174 |
%patch0 -p1 |
175 |
%patch1 -p1 |
176 |
%patch2 -p1 |
177 |
%patch3 -p1 |
178 |
%patch4 -p1 |
179 |
%patch5 -p1 |
180 |
%patch6 -p1 |
181 |
%patch7 -p1 |
182 |
%patch8 -p1 |
183 |
%patch9 -p1 |
184 |
%patch10 -p1 |
185 |
%patch11 -p1 |
186 |
%patch12 -p1 |
187 |
%patch13 -p1 |
188 |
%patch14 -p1 |
189 |
%patch15 -p1 |
190 |
%patch16 -p1 |
191 |
|
192 |
%build |
193 |
%{__mkdir_p} root/var/log/fail2ban |
194 |
perl createlinks |
195 |
|
196 |
%install |
197 |
/bin/rm -rf $RPM_BUILD_ROOT |
198 |
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
199 |
/bin/rm -f %{name}-%{version}-filelist |
200 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
201 |
--dir /var/log/fail2ban 'attr(0750,root,root)' \ |
202 |
--file /var/log/fail2ban/daemon.log 'config(noreplace) %attr(0600,root,root)' \ |
203 |
--file /etc/cron.daily/cleanup_fail2ban 'attr(0755,root,root)' \ |
204 |
--file /etc/fail2ban/filter.d/apache-auth.local 'config(noreplace) %attr(0644,root,root)' \ |
205 |
--file /usr/bin/sfail2ban 'attr(0755,root,root)' \ |
206 |
> %{name}-%{version}-filelist |
207 |
|
208 |
%files -f %{name}-%{version}-filelist |
209 |
%defattr(-,root,root) |
210 |
|
211 |
%clean |
212 |
rm -rf $RPM_BUILD_ROOT |
213 |
|
214 |
%post |
215 |
|
216 |
%preun |