diff --git a/main/opensmtpd/APKBUILD b/main/opensmtpd/APKBUILD index 2ba261cd49a..61596332dd3 100644 --- a/main/opensmtpd/APKBUILD +++ b/main/opensmtpd/APKBUILD @@ -3,8 +3,8 @@ # Contributor: Shiz # Maintainer: Jonathan Curran pkgname=opensmtpd -pkgver=6.0.2p1 -pkgrel=8 +pkgver=6.0.3p1 +pkgrel=0 pkgdesc="secure, reliable, lean, and easy-to configure SMTP server" url="http://www.opensmtpd.org" arch="all" @@ -18,10 +18,8 @@ source="https://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz smtpd.initd aliases autoconf-decl-checks.patch - missing-decls.patch - libressl-compat.patch" + " options="suid !check" -builddir="$srcdir"/$pkgname-$pkgver build() { cd "$builddir" @@ -59,9 +57,7 @@ package() { rmdir "$pkgdir"/usr/bin } -sha512sums="1e4275795dd2c43174ffa268398a0d9864ce4cb7d370330f7b8c55a9b40e757616bbd280919a409ebde403769e3dea62047857dc2ff98d7ecce660b459c7ff1c opensmtpd-6.0.2p1.tar.gz +sha512sums="e579818a0ddbe637deb5a4e40f43eaf797783903ceac18fd89a57581b135b9e407d424e1a70ff7b4b06a0ee50bafb6e8ab2451371917887904b06ff1b55d320f opensmtpd-6.0.3p1.tar.gz 8d3b27c760df84804baadc90c23b34f3e99980fae97c685f98ab096c3e84ab293316cd7c49317fa3cffac7ab5e63217ada6a2c5b245f352bafe880b087e7705e smtpd.initd 51d47b34eb3d728daa45f29d6434cc75db28dfa69b6fb3ecd873121df85b296a2d2c81016d765a07778aa26a496e4b29c09a30b82678cf42596a536734b5deca aliases -e61b7b0ab98acca9c092469d3ed756161225af5126e2fc0611b2676b8e1df05db7037549febe85b860fa48e47536a01fa3bfa37976f42e47666065ba4198e903 autoconf-decl-checks.patch -217e7212345f4202bf7e136b2d5b347a9967ea10d15ef50a216bfcd8e4a522076e4ee2044d18a606baf670c0fe6a339951b6381cdb9047730e06987ab7796790 missing-decls.patch -67b5bb221f10e014749592d24f7681bea6872785fa4a70e4e4b978f94859b527c4999aabb489586f7c19fac182acca450bdfa01af3ebc52c009f723830212058 libressl-compat.patch" +37104cc605569f142ceffa902f200e8a7e9e1114ebe5394ed1eac0ed6ce25454e1610270921c45246de8396eee04b7c8ab5a112a231036a6ef14e7e229b264e3 autoconf-decl-checks.patch" diff --git a/main/opensmtpd/autoconf-decl-checks.patch b/main/opensmtpd/autoconf-decl-checks.patch index 83b2509d257..c7823879e18 100644 --- a/main/opensmtpd/autoconf-decl-checks.patch +++ b/main/opensmtpd/autoconf-decl-checks.patch @@ -1,32 +1,5 @@ ---- opensmtpd-6.0.2p1/openbsd-compat/defines.h -+++ opensmtpd-6.0.2p1-patched/openbsd-compat/defines.h -@@ -85,7 +85,7 @@ - # define STDERR_FILENO 2 - #endif - --#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0 -+#if !HAVE_DECL_O_NONBLOCK - # define O_NONBLOCK 00004 /* Non Blocking Open */ - #endif - ---- opensmtpd-6.0.2p1/openbsd-compat/openbsd-compat.h -+++ opensmtpd-6.0.2p1-patched/openbsd-compat/openbsd-compat.h -@@ -212,11 +212,11 @@ - #define pledge(promises, paths) 0 - #endif - --#ifndef HAVE_DECL_AF_LOCAL -+#if !HAVE_DECL_AF_LOCAL - #define AF_LOCAL AF_UNIX - #endif - --#ifndef HAVE_DECL_WAIT_MYPGRP -+#if !HAVE_DECL_WAIT_MYPGRP - #define WAIT_MYPGRP 0 - #endif - ---- opensmtpd-6.0.2p1/smtpd/to.c -+++ opensmtpd-6.0.2p1-patched/smtpd/to.c +--- a/smtpd/to.c ++++ b/smtpd/to.c @@ -210,7 +210,7 @@ #if HAVE_STRUCT_TM_TM_GMTOFF offset = lt->tm_gmtoff; diff --git a/main/opensmtpd/libressl-compat.patch b/main/opensmtpd/libressl-compat.patch deleted file mode 100644 index e1656b94040..00000000000 --- a/main/opensmtpd/libressl-compat.patch +++ /dev/null @@ -1,101 +0,0 @@ -From f948b923873a93472dea9b786cf60a3472b0ddc8 Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Wed, 11 Jan 2017 17:35:29 -0600 -Subject: [PATCH] fix compatibility with libressl - -These functions are exported by libcrypto from libressl, due to its -similar OpenBSD compatibility layer, but they are not present in any -header files. Thus, while we can use the existing compiled function, -and do not need to provide our own, we do need to provide the prototype -for it. - -This avoids implicit function declarations and the resulting crashes due -to pointer truncation. - -The patch is based on an equivalent patch for OpenSSH from -https://bugzilla.mindrot.org/show_bug.cgi?id=2465 -Also see -https://github.com/libressl-portable/portable/issues/109 - -Fixes #691 ---- - openbsd-compat/defines.h | 9 --------- - openbsd-compat/openbsd-compat.h | 25 +++++++++++++++---------- - 2 files changed, 15 insertions(+), 19 deletions(-) - -diff --git a/openbsd-compat/defines.h b/openbsd-compat/defines.h -index 2cbfbca..3ffcc81 100644 ---- a/openbsd-compat/defines.h -+++ b/openbsd-compat/defines.h -@@ -422,15 +422,6 @@ typedef uint16_t in_port_t; - #define INET6_ADDRSTRLEN 46 - #endif - --/* -- * Platforms that have arc4random_uniform() and not arc4random_stir() -- * shouldn't need the latter. -- */ --#if defined(HAVE_ARC4RANDOM) && defined(HAVE_ARC4RANDOM_UNIFORM) && \ -- !defined(HAVE_ARC4RANDOM_STIR) --# define arc4random_stir() --#endif -- - #ifndef HAVE_VA_COPY - # ifdef HAVE___VA_COPY - # define va_copy(dest, src) __va_copy(dest, src) -diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h -index a51385b..51f33bb 100644 ---- a/openbsd-compat/openbsd-compat.h -+++ b/openbsd-compat/openbsd-compat.h -@@ -119,20 +119,25 @@ int BSDoptind; /* index into parent argv vector */ - int getpeereid(int , uid_t *, gid_t *); - #endif - --#ifdef HAVE_ARC4RANDOM --# ifndef HAVE_ARC4RANDOM_STIR --# define arc4random_stir() --# endif --#else -+#if !defined(HAVE_ARC4RANDOM) || defined(LIBRESSL_VERSION_NUMBER) - unsigned int arc4random(void); -+#endif -+ -+#if defined(HAVE_ARC4RANDOM_STIR) - void arc4random_stir(void); --#endif /* !HAVE_ARC4RANDOM */ -+#elif defined(HAVE_ARC4RANDOM) || defined(LIBRESSL_VERSION_NUMBER) -+/* Recent system/libressl implementation; no need for explicit stir */ -+# define arc4random_stir() -+#else -+/* openbsd-compat/arc4random.c provides arc4random_stir() */ -+void arc4random_stir(void); -+#endif - --#ifndef HAVE_ARC4RANDOM_BUF -+#if !defined(HAVE_ARC4RANDOM_BUF) || defined(LIBRESSL_VERSION_NUMBER) - void arc4random_buf(void *, size_t); - #endif - --#ifndef HAVE_ARC4RANDOM_UNIFORM -+#if !defined(HAVE_ARC4RANDOM_UNIFORM) || defined(LIBRESSL_VERSION_NUMBER) - uint32_t arc4random_uniform(uint32_t); - #endif - -@@ -174,7 +179,7 @@ int vasprintf(char **, const char *, va_list); - int vsnprintf(char *, size_t, const char *, va_list); - #endif - --#ifndef HAVE_EXPLICIT_BZERO -+#if !defined(HAVE_EXPLICIT_BZERO) || defined(LIBRESSL_VERSION_NUMBER) - void explicit_bzero(void *p, size_t n); - #endif - -@@ -200,7 +205,7 @@ int pidfile(const char *basename); - struct passwd *pw_dup(const struct passwd *); - #endif - --#ifndef HAVE_REALLOCARRAY -+#if !defined(HAVE_REALLOCARRAY) || defined(LIBRESSL_VERSION_NUMBER) - void *reallocarray(void *, size_t, size_t); - #endif - diff --git a/main/opensmtpd/missing-decls.patch b/main/opensmtpd/missing-decls.patch deleted file mode 100644 index 065fbcdbe1a..00000000000 --- a/main/opensmtpd/missing-decls.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 2ab442623e689532910b34ff0dbbc2167da02330 Mon Sep 17 00:00:00 2001 -From: Samuel Holland -Date: Wed, 11 Jan 2017 17:39:07 -0600 -Subject: [PATCH] fix musl compatibility (missing function prototypes) - -inet_net_pton is already compiled, but no prototype is provided. -res_hnok is provided by the compatibility layer in libasr. - -These fixes avoid warnings about implicit function declaration. - -Fixes #758 ---- - configure.ac | 1 + - openbsd-compat/openbsd-compat.h | 8 ++++++++ - 2 files changed, 9 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 42e092f..e27c514 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -594,6 +594,7 @@ AC_CHECK_FUNCS([ \ - pledge \ - pw_dup \ - reallocarray \ -+ res_hnok \ - setenv \ - setlinebuf \ - setproctitle \ -diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h -index a51385b..5d2e2c2 100644 ---- a/openbsd-compat/openbsd-compat.h -+++ b/openbsd-compat/openbsd-compat.h -@@ -208,10 +208,18 @@ void *reallocarray(void *, size_t, size_t); - void errc(int, int, const char *, ...); - #endif - -+#ifndef HAVE_INET_NET_PTON -+int inet_net_pton(int, const char *, void *, size_t); -+#endif -+ - #ifndef HAVE_PLEDGE - #define pledge(promises, paths) 0 - #endif - -+#ifndef HAVE_RES_HNOK -+int res_hnok(const char *); -+#endif -+ - #if !HAVE_DECL_AF_LOCAL - #define AF_LOCAL AF_UNIX - #endif