summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilhelm Schuster2016-04-26 21:57:23 +0200
committerWilhelm Schuster2016-04-26 21:57:23 +0200
commit9ed295875ba58668f1157fb69ddbe875fee6771a (patch)
treea229ffac5d3890170d7ca5302ec7222eef82ae40
parentdf98590a9a4e2036c9a5d7aad30a309f13918fdf (diff)
downloadaur-9ed295875ba58668f1157fb69ddbe875fee6771a.tar.gz
Fix getaddrinfo() glibc quirkiness
Thanks to @BertVoegele for providing the patch!
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD11
-rw-r--r--fix-for-glibc-getaddrinfo-quirks.patch16
3 files changed, 28 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7352aa057c91..c1390572ffa2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Jan 9 01:54:57 UTC 2016
+# Tue Apr 26 19:56:49 UTC 2016
pkgbase = opensmtpd-extras
pkgdesc = Additional filters, tables, queues, etc. for OpenSMTPd
pkgver = 5.7.1
- pkgrel = 2
+ pkgrel = 3
url = https://opensmtpd.org
arch = i686
arch = x86_64
@@ -29,7 +29,9 @@ pkgbase = opensmtpd-extras
optdepends = sqlite: sqlite support for tables
backup = etc/smptd/filter-regex.conf
source = https://www.opensmtpd.org/archives/opensmtpd-extras-5.7.1.tar.gz
+ source = fix-for-glibc-getaddrinfo-quirks.patch
sha256sums = b56dc24427afe7d6156c85232427fe33a260aca8873eb118d0229dff3a248dce
+ sha256sums = 73b6f3d80e2b273c80e31620de7b9e5d4f44ed4cd34bc00431121974e7ff9c81
pkgname = opensmtpd-extras
diff --git a/PKGBUILD b/PKGBUILD
index c773420e873a..11f5bdcfef27 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Wilhelm Schuster <wilhelm [aT] wilhelm [.] re>
pkgname=opensmtpd-extras
pkgver=5.7.1
-pkgrel=2
+pkgrel=3
pkgdesc="Additional filters, tables, queues, etc. for OpenSMTPd"
arch=('i686' 'x86_64')
url="https://opensmtpd.org"
@@ -18,8 +18,10 @@ optdepends=('python2: python support for filters, tables, scheduler, and queues'
'hiredis: redis support for tables'
'sqlite: sqlite support for tables')
backup=('etc/smptd/filter-regex.conf')
-source=("https://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz")
-sha256sums=('b56dc24427afe7d6156c85232427fe33a260aca8873eb118d0229dff3a248dce')
+source=("https://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz"
+ "fix-for-glibc-getaddrinfo-quirks.patch")
+sha256sums=('b56dc24427afe7d6156c85232427fe33a260aca8873eb118d0229dff3a248dce'
+ '73b6f3d80e2b273c80e31620de7b9e5d4f44ed4cd34bc00431121974e7ff9c81')
prepare() {
cd "$pkgname-$pkgver"
@@ -29,6 +31,9 @@ prepare() {
# Fix config file locations
sed -i 's;/etc/mail/filter-regex.conf;/etc/smtpd/filter-regex.conf;g' "extras/wip/filters/filter-regex/filter_regex.c"
+
+ # Apply patches
+ patch -Np1 <../fix-for-glibc-getaddrinfo-quirks.patch
}
build() {
diff --git a/fix-for-glibc-getaddrinfo-quirks.patch b/fix-for-glibc-getaddrinfo-quirks.patch
new file mode 100644
index 000000000000..79219a91843e
--- /dev/null
+++ b/fix-for-glibc-getaddrinfo-quirks.patch
@@ -0,0 +1,16 @@
+diff -aur opensmtpd-extras-5.7.1.pristine/extras/wip/filters/filter-dnsbl/filter_dnsbl.c opensmtpd-extras-5.7.1.new/extras/wip/filters/filter-dnsbl/filter_dnsbl.c
+--- opensmtpd-extras-5.7.1.pristine/extras/wip/filters/filter-dnsbl/filter_dnsbl.c 2016-04-26 21:46:19.862094043 +0200
++++ opensmtpd-extras-5.7.1.new/extras/wip/filters/filter-dnsbl/filter_dnsbl.c 2016-04-26 21:50:52.375447401 +0200
+@@ -40,7 +40,11 @@
+ if (ar->ar_addrinfo)
+ freeaddrinfo(ar->ar_addrinfo);
+
+- if (ar->ar_gai_errno != EAI_NODATA)
++ /*
++ * There seems to be a dispute about defining EAI_NONAME and EAI_NODATA properly in glibc and relatives.
++ * Thus, the constants were replaced by their values.
++ */
++ if (ar->ar_gai_errno != -5 && ar->ar_gai_errno != -2)
+ filter_api_reject(*q, FILTER_CLOSE);
+ else
+ filter_api_accept(*q);