summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmish2020-08-06 16:51:02 +0530
committerAmish2020-08-06 16:51:02 +0530
commit4bdfb946d95254609727519553a0156bb77e2873 (patch)
tree81fa224137f0644ebc27bbdad168607e01f38436
parentddec6ba14d3b1907342a2c90d0a479ec9635f045 (diff)
downloadaur-4bdfb946d95254609727519553a0156bb77e2873.tar.gz
Update to 4.6.3
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD15
-rw-r--r--milter-greylist-4.5.11-warning.patch4
-rw-r--r--milter-greylist-4.6.3-geoip2.patch38
-rw-r--r--milter-greylist.service2
5 files changed, 59 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ed7f303fd83..586072c30e3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = milter-greylist
pkgdesc = A stand-alone milter written in C that implements the greylist filtering method.
- pkgver = 4.6.2
- pkgrel = 2
+ pkgver = 4.6.3
+ pkgrel = 1
url = http://hcpnet.free.fr/milter-greylist/
arch = x86_64
arch = i686
@@ -10,12 +10,14 @@ pkgbase = milter-greylist
depends = libspf2
depends = opendkim
backup = etc/mail/greylist.conf
- source = http://ftp.espci.fr/pub/milter-greylist/milter-greylist-4.6.2.tgz
+ source = http://ftp.espci.fr/pub/milter-greylist/milter-greylist-4.6.3.tgz
source = milter-greylist-4.5.11-warning.patch
+ source = milter-greylist-4.6.3-geoip2.patch
source = milter-greylist.service
- md5sums = 8872008db2fc6b93dd9ab8576383fec2
- md5sums = 6965cbd37d0af10d4d2e74ce8cf25095
- md5sums = f63fdee8f12aa6cc4e0badeb874cf565
+ md5sums = 7fdd068c456001454a82e0b9c7171927
+ md5sums = 0901deb488277f8fed50158cffb726a2
+ md5sums = 186b62e3cf1d27a693aebf2c4af0b148
+ md5sums = 51665e97390bf7df11bb509bfb57544b
pkgname = milter-greylist
diff --git a/PKGBUILD b/PKGBUILD
index 36e11d93929..9de9022b437 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Amish <contact at via dot aur>
# Contributor: Steven Hiscocks <steven[at]hiscocks[dot]me[dot]uk>
pkgname=milter-greylist
-pkgver=4.6.2
-pkgrel=2
+pkgver=4.6.3
+pkgrel=1
pkgdesc="A stand-alone milter written in C that implements the greylist filtering method."
url="http://hcpnet.free.fr/milter-greylist/"
arch=('x86_64' 'i686')
@@ -11,15 +11,18 @@ depends=('libspf2' 'opendkim')
makedepends=('libmilter')
backup=('etc/mail/greylist.conf')
source=("http://ftp.espci.fr/pub/${pkgname}/${pkgname}-${pkgver}.tgz"
- "milter-greylist-4.5.11-warning.patch"
+ 'milter-greylist-4.5.11-warning.patch'
+ 'milter-greylist-4.6.3-geoip2.patch'
"${pkgname}.service")
-md5sums=('8872008db2fc6b93dd9ab8576383fec2'
- '6965cbd37d0af10d4d2e74ce8cf25095'
- 'f63fdee8f12aa6cc4e0badeb874cf565')
+md5sums=('7fdd068c456001454a82e0b9c7171927'
+ '0901deb488277f8fed50158cffb726a2'
+ '186b62e3cf1d27a693aebf2c4af0b148'
+ '51665e97390bf7df11bb509bfb57544b')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p0 < ../milter-greylist-4.5.11-warning.patch
+ patch -p0 < ../milter-greylist-4.6.3-geoip2.patch
}
build() {
diff --git a/milter-greylist-4.5.11-warning.patch b/milter-greylist-4.5.11-warning.patch
index 385fc4e2843..2c525bfa250 100644
--- a/milter-greylist-4.5.11-warning.patch
+++ b/milter-greylist-4.5.11-warning.patch
@@ -3,7 +3,7 @@ breaks build with -Werror -Wall
--- configure.ac
+++ configure.ac
-@@ -1217,9 +1217,12 @@
+@@ -1228,9 +1228,12 @@
CFLAGS=$CFLAGS$efl
AC_MSG_CHECKING([if DNS resolver is re-entrant])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
@@ -18,7 +18,7 @@ breaks build with -Werror -Wall
#include <arpa/nameser.h>
--- configure
+++ configure
-@@ -8282,9 +8282,12 @@
+@@ -8298,9 +8298,12 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --git a/milter-greylist-4.6.3-geoip2.patch b/milter-greylist-4.6.3-geoip2.patch
new file mode 100644
index 00000000000..9fd1c6d2255
--- /dev/null
+++ b/milter-greylist-4.6.3-geoip2.patch
@@ -0,0 +1,38 @@
+--- geoip2.c
++++ geoip2.c
+@@ -59,7 +59,7 @@ __RCSID("$Id");
+ #include <maxminddb.h>
+
+ static MMDB_s mmdb;
+-static MMDB_s *geoip2_handle = &mmdb;
++static MMDB_s *geoip2_handle = NULL;
+ static char geoip2_database[MAXPATHLEN + 1];
+ static pthread_rwlock_t geoip2_lock;
+
+@@ -88,11 +88,13 @@ geoip2_set_db(name)
+ strncpy(geoip2_database, name, MAXPATHLEN);
+ geoip2_database[MAXPATHLEN] = '\0';
+
++ geoip2_handle = &mmdb;
+ int status = MMDB_open(geoip2_database, MMDB_MODE_MMAP, geoip2_handle);
+ if (status != MMDB_SUCCESS) {
+ mg_log(LOG_WARNING,
+ "Geoip2 database \"%s\" cannot be used",
+ geoip2_database);
++ geoip2_handle = NULL;
+ return;
+ }
+ }
+@@ -123,6 +125,12 @@ geoip2_set_ccode(priv)
+ int gai_error, mmdb_error;
+ MMDB_lookup_result_s result;
+
++ if (geoip2_handle == NULL) {
++ mg_log(LOG_DEBUG, "GeoIP2 is not available");
++ priv->priv_ccode = NULL;
++ return;
++ }
++
+ if (iptostring(SA(&priv->priv_addr),
+ priv->priv_addrlen, ipstr, sizeof(ipstr)) == NULL) {
+ mg_log(LOG_DEBUG, "Geoip2 iptostring failed");
diff --git a/milter-greylist.service b/milter-greylist.service
index 61addb3bf5b..8fae52b2343 100644
--- a/milter-greylist.service
+++ b/milter-greylist.service
@@ -1,11 +1,13 @@
[Unit]
Description=Greylist milter
+Before=sendmail.service
Before=postfix.service
After=network.target
[Service]
UMask=0007
ExecStart=/usr/bin/milter-greylist -D
+Restart=on-failure
[Install]
WantedBy=multi-user.target