commit: 8146a1f86e72210919cd8a0020aaf19838da0637
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 2 16:37:51 2016 +0000
Commit: Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Wed Mar 2 16:38:16 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8146a1f8
mail-mta/opensmtpd: do not crash with libressl
...d-5.7.3p2-libressl-arc4random-circularity.patch | 35 ++++++++++++++++++++++
...3_p2-r1.ebuild => opensmtpd-5.7.3_p2-r2.ebuild} | 3 +-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git
a/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch
b/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch
new file mode 100644
index 0000000..7c35862
--- /dev/null
+++
b/mail-mta/opensmtpd/files/opensmtpd-5.7.3p2-libressl-arc4random-circularity.patch
@@ -0,0 +1,35 @@
+diff -ru opensmtpd-5.7.3p2/openbsd-compat/arc4random.c
opensmtpd-5.7.3p2-fixed/openbsd-compat/arc4random.c
+--- opensmtpd-5.7.3p2/openbsd-compat/arc4random.c 2016-02-02
08:40:06.000000000 +0100
++++ opensmtpd-5.7.3p2-fixed/openbsd-compat/arc4random.c 2016-03-02
17:34:24.535030362 +0100
+@@ -188,6 +188,7 @@
+ _ARC4_UNLOCK();
+ }
+
++#if 0
+ u_int32_t
+ arc4random(void)
+ {
+@@ -198,12 +199,13 @@
+ _ARC4_UNLOCK();
+ return val;
+ }
++#endif
+
+ /*
+ * If we are providing arc4random, then we can provide a more efficient
+ * arc4random_buf().
+ */
+-# ifndef HAVE_ARC4RANDOM_BUF
++#if 0
+ void
+ arc4random_buf(void *buf, size_t n)
+ {
+@@ -215,7 +217,7 @@
+ #endif /* !HAVE_ARC4RANDOM */
+
+ /* arc4random_buf() that uses platform arc4random() */
+-#if !defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_ARC4RANDOM)
++#if 0
+ void
+ arc4random_buf(void *_buf, size_t n)
+ {
diff --git a/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r1.ebuild
b/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r2.ebuild
similarity index 94%
rename from mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r1.ebuild
rename to mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r2.ebuild
index ef9a286..dc90b46 100644
--- a/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r1.ebuild
+++ b/mail-mta/opensmtpd/opensmtpd-5.7.3_p2-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -47,6 +47,7 @@ S=${WORKDIR}/${MY_P/_}
src_prepare() {
# Use /run instead of /var/run
sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":'
openbsd-compat/pidfile.c || die
+ use libressl && epatch
"${FILESDIR}/${PN}-5.7.3p2-libressl-arc4random-circularity.patch"
epatch_user
eautoreconf