/[smecontribs]/rpms/smeserver-geoip/contribs10/smeserver-geoip.spec
ViewVC logotype

Contents of /rpms/smeserver-geoip/contribs10/smeserver-geoip.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download)
Sun Mar 14 19:44:03 2021 UTC (3 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-geoip-1_2-17_el7_sme
Changes since 1.7: +0 -4 lines
* Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.2-17.sme
- merge legacy with main as we have few packages still using legacy [SME: 11023]
  those are php*-pecl-geoip proftpd bind-libs* bind-utils.

1 %define name smeserver-geoip
2 %define version 1.2
3 %define release 17
4
5 Summary: SME Server geoip plugin
6 Name: %{name}
7 Version: %{version}
8 Release: %{release}%{?dist}
9 License: GPL
10 Group: Email
11 Source: %{name}-%{version}.tar.gz
12 Packager: Doug Kruhm <dakruhm@daknetworks.net>
13 BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
14 BuildArchitectures: noarch
15 Requires: perl-GeoIP2
16 Requires: libmaxminddb >= 1.1.1
17 Requires: libmaxminddb-devel >= 1.1.1
18 Requires: geoipupdate
19 Requires: geolite2-country
20 Requires: geolite2-city
21 # 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
28 Patch0: smeserver-geoip-conf-typo.patch
29 Patch1: smeserver-geoip-fix-city-createlinks.patch
30 Patch2: smeserver-geoip-1.2-check_badcountries.patch
31 Patch3: smeserver-geoip-1.2-check_badcountries-mailstats.patch
32 Patch4: smeserver-geoip-1.2-bz10820-geoipv1-blockvountries-qpsmtpd.patch
33 Patch5: smeserver-geoip-1.2-bz10815-display-country.patch
34 Patch6: smeserver-geoip-1.2-bz10859-bz10740.patch
35 Patch7: smeserver-geoip-1.2-fix-product-id.patch
36 Patch8: smeserver-geoip-1.2-sme10-update.patch
37
38 %description
39 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.
40
41 CHANGE THE CONFIG DB: config setprop qpsmtpd BadCountries <countrycode> (i.e. config setprop qpsmtpd BadCountries BR)
42 SIGNAL EVENT: signal-event email-update
43
44 #----------------------------------------------------
45 #%package -n smeserver-geoip-legacy
46 #Summary: SME Server geoip plugin v1
47 #Group: Email
48 #Requires: perl-Geo-IP
49 #Requires: GeoIP >= 1.6.5
50 #Requires: smeserver-geoip = %{version}-%{release}
51 #BuildRequires: e-smith-devtools >= 1.13.1-03
52 #%description -n smeserver-geoip-legacy
53 #Package to use the legacy plugin. DB are not updated since 2018
54 #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.
55 #----------------------------------------------------
56
57 %changelog
58 * Sun Mar 14 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.2-17.sme
59 - merge legacy with main as we have few packages still using legacy [SME: 11023]
60 those are php*-pecl-geoip proftpd bind-libs* bind-utils.
61
62 * Sat Mar 13 2021 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-16.sme
63 - rebuild for SME10 [SME: 11023]
64 make geoip2 default
65 create geoip-legacy package with old geoip1 stuffs
66 smeserver-geoip(-legacy)-update events
67
68 * Tue Oct 06 2020 Brian Read <brianr@bjsystems.co.uk> 1.2-15.sme
69 - Import to SME10 tree [SME: 11023]
70
71 * Wed Jan 22 2020 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-14.sme
72 - Change template from EditionID to ProductID
73 - fix 20databasestore has a trailing tilde
74
75 * Tue Jan 21 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-13.sme
76 - add support for mmdblookup [SME: 10740]
77 - add support for download with AccountID and LicenseKey [SME: 10859]
78
79 * Sun Oct 20 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-10.sme
80 - fix country not logged if no badcountries defined [SME: 10815]
81
82 * Fri Oct 18 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-9.sme
83 - revert blocking country for geoipv1 qpsmtpd plugin [SME: 10820]
84
85 * Thu Jan 24 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-8.sme
86 - make smeserver-geoip2 requires smeserver-geoip [SME: 10691]
87 this will avoid having both packages sharing few files.
88
89 * Tue Jan 15 2019 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-7.sme
90 - Update check_badcountries to work with mailstats
91
92 * Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-6.sme
93 - remove crontab fragment for v1 [SME: 10691]
94
95 * Sat Jan 05 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-5.sme
96 - fix wrong loglevel LOGINFO instead of LOGNOTICE needed [SME: 10679]
97 - try first db v2 and back on v1 if not available [SME: 10691]
98 - workaround FATAL PLUGIN ERROR when method name_by_addr not existing priori geo-ip 1.39 [SME: 10691]
99
100 * Fri Jan 04 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.2-4.sme
101 - split smeserver-geoip into smeserver-geoip and smeserver-geoip2 for compatibility [SME: 10691]
102 - TODO: workaround to find for plugin compatibility
103
104 * Mon Oct 29 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-3.sme
105 - Fix Use of uninitialized value $city in string eq
106 - Fix createlinks geoip-update action
107
108 * Sat Jun 23 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-2.sme
109 - Fix typo in createlinks
110
111 * Tue Jun 12 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 1.2-1.sme
112 - Update to latest v2 DBs [SME: 9033]
113 - add geocity.pl and geocountry.pl test files
114
115 * Wed Feb 15 2017 Jean-Philipe Pialasse <tests@pialasse.com> 1.1.2-7.sme
116 - update requirement for GeoIP 1.6.5 [SME: 9714]
117
118 * Thu Dec 22 2016 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-6
119 - Use newer versions of GeoIP databases [SME: 9714]
120
121 * Wed Sep 23 2015 John Crisp <jcrisp@safeandsoundit.co.uk> 1.1.2-5
122 - Add ability to whitelist an IP [SME:8981]
123
124 * Tue Sep 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-4
125 - the event geoip-update download the geoip database
126 - added smeserver-geoip-1.1.2.geoip-update-event.patch
127
128 * Sun Jun 14 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1.2-2
129 - added createlinks
130 - added actions and crontab to download geoip database
131
132 * Mon Sep 03 2012 Doug Kruhm <dakruhm@daknetworks.net> 1.0.5
133 - defining $country to reduce noise if not found [SME: 5011]
134 - fixed misspelling in response if country is blocked [SME: 7058]
135 - cleaning up versioning to MAJOR-MINOR-PATCH
136
137 * Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-04
138 - added response to connecting server if blocked [SME: 5011]
139
140 * Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-03
141 - added line to reduce log noise [SME: 5011]
142
143 * Fri May 01 2009 Doug Kruhm <dakruhm@daknetworks.net> 1.0.0-02
144 - db defaults migrated from SPEC file to rpm files [SME: 5193]
145 - removed %post and %postun macros [SME: 5194]
146 - added Requires perl-Geo-IP [SME: 1866]
147 - added e-smith-devtools as a requirement [SME: 1866]
148
149 * Thu Jun 16 2007 Doug Kruhm <dakruhm@daknetworks.net>
150 - 1.0.0-01
151 - Original version
152
153
154 %prep
155 %setup
156 %patch0 -p1
157 %patch1 -p1
158 %patch2 -p1
159 %patch3 -p1
160 %patch4 -p1
161 %patch5 -p1
162 %patch6 -p1
163 %patch7 -p1
164 rm -rf root/var/
165 %patch8 -p1
166 # commented for legacy
167 #mkdir -p root/etc/e-smith/events/smeserver-geoip-legacy
168
169 %build
170 perl createlinks
171
172 %install
173 rm -rf $RPM_BUILD_ROOT
174 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
175 rm -f %{name}-%{version}-filelist
176 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
177 --file /usr/bin/geoiplook 'attr(0755,root,root)' \
178 > %{name}-%{version}-filelist
179
180 cat %{name}-%{version}-filelist \
181 |grep -v 'etc/e-smith/events/smeserver-geoip-legacy' \
182 > %{name}-%{version}-filelist-base
183 #cat %{name}-%{version}-filelist \
184 #|grep 'etc/e-smith/events/smeserver-geoip-legacy' \
185 #> %{name}-%{version}-filelist-legacy
186
187
188 %clean
189 rm -rf $RPM_BUILD_ROOT
190
191 %post
192
193 %postun
194
195 %files -f %{name}-%{version}-filelist-base
196 %defattr(-,root,root)
197
198
199
200 #%files -n smeserver-geoip-legacy -f %{name}-%{version}-filelist-legacy
201 #%defattr(-,root,root,-)
202
203
204

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed