1 |
%define name smeserver-geoip |
%define name smeserver-geoip |
2 |
%define version 1.2 |
%define version 1.2 |
3 |
%define release 16 |
%define release 18 |
4 |
|
|
5 |
Summary: SME Server geoip plugin |
Summary: SME Server geoip plugin |
6 |
Name: %{name} |
Name: %{name} |
18 |
Requires: geoipupdate |
Requires: geoipupdate |
19 |
Requires: geolite2-country |
Requires: geolite2-country |
20 |
Requires: geolite2-city |
Requires: geolite2-city |
21 |
Provides: smeserver-geoip2 >= 1.2-16 |
# for legacy |
22 |
|
Requires: perl-Geo-IP |
23 |
|
Requires: GeoIP >= 1.6.5 |
24 |
|
# |
25 |
|
Provides: smeserver-geoip2 = %{version}-%{release} |
26 |
|
PRovides: smeserver-geoip-legacy = %{version}-%{release} |
27 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
28 |
Patch0: smeserver-geoip-conf-typo.patch |
Patch0: smeserver-geoip-conf-typo.patch |
29 |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
Patch1: smeserver-geoip-fix-city-createlinks.patch |
34 |
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch |
35 |
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
Patch7: smeserver-geoip-1.2-fix-product-id.patch |
36 |
Patch8: smeserver-geoip-1.2-sme10-update.patch |
Patch8: smeserver-geoip-1.2-sme10-update.patch |
37 |
|
Patch9: smeserver-geoip-1.2-Add-expand-template-for-the-qpsmtpd-peers.patch |
38 |
|
|
39 |
%description |
%description |
40 |
The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers. |
The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers. |
43 |
SIGNAL EVENT: signal-event email-update |
SIGNAL EVENT: signal-event email-update |
44 |
|
|
45 |
#---------------------------------------------------- |
#---------------------------------------------------- |
46 |
|
#%package -n smeserver-geoip-legacy |
47 |
%package -n smeserver-geoip-legacy |
#Summary: SME Server geoip plugin v1 |
48 |
Summary: SME Server geoip plugin v1 |
#Group: Email |
49 |
Group: Email |
#Requires: perl-Geo-IP |
50 |
Requires: perl-Geo-IP |
#Requires: GeoIP >= 1.6.5 |
51 |
Requires: GeoIP >= 1.6.5 |
#Requires: smeserver-geoip = %{version}-%{release} |
52 |
Requires: GeoIP-GeoLite-data |
#BuildRequires: e-smith-devtools >= 1.13.1-03 |
53 |
Requires: GeoIP-GeoLite-data-extra |
#%description -n smeserver-geoip-legacy |
54 |
Requires: smeserver-geoip >= 1.2-16 |
#Package to use the legacy plugin. DB are not updated since 2018 |
55 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
#The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers. |
|
|
|
|
%description -n smeserver-geoip-legacy |
|
|
Package to use the legacy plugin. DB are not updated since 2018 |
|
|
The GEOIP plugin lets us know which country our mail server is receiving mail from. If we're receiving too much spam from a particular country, this will help track it down and then use that info to reject connections from that country. This ends up taking the load off our servers. |
|
56 |
#---------------------------------------------------- |
#---------------------------------------------------- |
57 |
|
|
58 |
%changelog |
%changelog |
59 |
|
* Thu Mar 18 2021 Brian Read <brianr@bjsystems.co.uk> 1.2-18.sme |
60 |
|
- Add expand template for the qpsmtpd peers [SME: 11023] |
61 |
|
|
62 |
|
* Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.2-17.sme |
63 |
|
- merge legacy with main as we have few packages still using legacy [SME: 11023] |
64 |
|
those are php*-pecl-geoip proftpd bind-libs* bind-utils. |
65 |
|
|
66 |
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme |
* Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme |
67 |
- rebuild for SME10 [SME: 11023] |
- rebuild for SME10 [SME: 11023] |
68 |
make geoip2 default |
make geoip2 default |
167 |
%patch7 -p1 |
%patch7 -p1 |
168 |
rm -rf root/var/ |
rm -rf root/var/ |
169 |
%patch8 -p1 |
%patch8 -p1 |
170 |
mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy |
%patch9 -p1 |
171 |
|
# commented for legacy |
172 |
|
#mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy |
173 |
|
|
174 |
%build |
%build |
175 |
perl createlinks |
perl createlinks |
178 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
179 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
180 |
rm -f %{name}-%{version}-filelist |
rm -f %{name}-%{version}-filelist |
181 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
182 |
|
--file /usr/bin/geoiplook 'attr(0755,root,root)' \ |
183 |
|
> %{name}-%{version}-filelist |
184 |
|
|
185 |
cat %{name}-%{version}-filelist \ |
cat %{name}-%{version}-filelist \ |
186 |
|grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \ |
|grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \ |
187 |
> %{name}-%{version}-filelist-base |
> %{name}-%{version}-filelist-base |
188 |
cat %{name}-%{version}-filelist \ |
#cat %{name}-%{version}-filelist \ |
189 |
|grep 'etc/e-smith/events/smeserver-geoip-legacy' \ |
#|grep 'etc/e-smith/events/smeserver-geoip-legacy' \ |
190 |
> %{name}-%{version}-filelist-legacy |
#> %{name}-%{version}-filelist-legacy |
191 |
|
|
|
#diff -u %{name}-%{version}-filelist %{name}-%{version}-filelist-v1 | grep -E "^\-"| sed -E 's/^\-//'|grep -v filelist > %{name}-%{version}-filelist-v2 |
|
192 |
|
|
193 |
%clean |
%clean |
194 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
202 |
|
|
203 |
|
|
204 |
|
|
205 |
%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy |
#%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy |
206 |
%defattr(-,root,root,-) |
#%defattr(-,root,root,-) |
207 |
|
|
208 |
|
|
209 |
|
|