[arch-commits] Commit in opendkim/trunk (PKGBUILD openssl_1.1.0_compat.patch)

Jelle van der Waa jelle at archlinux.org
Fri Mar 10 14:39:12 UTC 2017


    Date: Friday, March 10, 2017 @ 14:39:11
  Author: jelle
Revision: 215591

upgpkg: opendkim 2.10.3-4

openssl 1.1.0 rebuild

Added:
  opendkim/trunk/openssl_1.1.0_compat.patch
Modified:
  opendkim/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   14 +++++-
 openssl_1.1.0_compat.patch |   90 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-03-10 13:27:26 UTC (rev 215590)
+++ PKGBUILD	2017-03-10 14:39:11 UTC (rev 215591)
@@ -4,7 +4,7 @@
 
 pkgname=opendkim
 pkgver=2.10.3
-pkgrel=3
+pkgrel=4
 pkgdesc="An open source implementation of the DKIM sender authentication system. Based on a fork of dkim-milter."
 arch=(i686 x86_64)
 url="http://www.opendkim.org/"
@@ -17,12 +17,20 @@
 validpgpkeys=('5CDD574C22FF4D2480ACABDF5254B96BC608B511')
 source=(https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.gz{,.asc}
 	opendkim.conf
-	opendkim.service)
+	opendkim.service
+        openssl_1.1.0_compat.patch)
 sha256sums=('43a0ba57bf942095fe159d0748d8933c6b1dd1117caf0273fa9a0003215e681b'
             'SKIP'
             'a3b5ecf4f4fe4a79392a75f7c4b6cc93a51ef8503215bb0f64d795f8754d4b68'
-            '3e1cb3a3ddb794253d5a1c59673c40687bbc2b1bf878e70ccd03356f6d1e6735')
+            '3e1cb3a3ddb794253d5a1c59673c40687bbc2b1bf878e70ccd03356f6d1e6735'
+            '5095a7516493af08396060852851231c9b1cba5ee00493f810f0dfc9a69f8dfe')
 
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+  patch -Np1 -i $srcdir/openssl_1.1.0_compat.patch
+  autoreconf -i
+}
+
 build() {
   cd "$srcdir/$pkgname-$pkgver"
   ./configure --prefix=/usr --sbindir=/usr/bin --with-db \

Added: openssl_1.1.0_compat.patch
===================================================================
--- openssl_1.1.0_compat.patch	                        (rev 0)
+++ openssl_1.1.0_compat.patch	2017-03-10 14:39:11 UTC (rev 215591)
@@ -0,0 +1,90 @@
+Description: Build and work with either openssl 1.0.2 or 1.1.0
+   * Add patch to build with either openssl 1.0.2 or 1.1.0 (Closes: #828466)
+     - Thanks to Sebastian Andrzej Siewior for the patch
+Author: Sebastian Andrzej Siewior
+Bug-Debian: http://bugs.debian.org/828466
+Origin: vendor
+Forwarded: no
+Reviewed-By: Scott Kitterman <scott at kitterman.com>
+Last-Update: <YYYY-MM-DD>
+
+--- opendkim-2.11.0~alpha.orig/configure.ac
++++ opendkim-2.11.0~alpha/configure.ac
+@@ -864,26 +864,28 @@ then
+ 	AC_SEARCH_LIBS([ERR_peek_error], [crypto], ,
+ 	               AC_MSG_ERROR([libcrypto not found]))
+ 
+-	AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
+-		[
+-			if test x"$enable_shared" = x"yes"
+-			then
+-				AC_MSG_ERROR([Cannot build shared opendkim
+-				              against static openssl libraries.
+-				              Configure with --disable-shared
+-				              to get this working or obtain a
+-				              shared libssl library for
+-				              opendkim to use.])
+-			fi
+ 
+-			# avoid caching issue - last result of SSL_library_init
+-			# shouldn't be cached for this next check
+-			unset ac_cv_search_SSL_library_init
+-			LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl"
+-			AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
+-			               AC_MSG_ERROR([libssl not found]), [-ldl])
+-		]
+-	)
++	AC_LINK_IFELSE(
++		       [AC_LANG_PROGRAM([[#include <openssl/ssl.h>]],
++					[[SSL_library_init();]])],
++					[od_have_ossl="yes";],
++					[od_have_ossl="no";])
++	if test x"$od_have_ossl" = x"no"
++	then
++		if test x"$enable_shared" = x"yes"
++		then
++			AC_MSG_ERROR([Cannot build shared opendkim
++			              against static openssl libraries.
++			              Configure with --disable-shared
++			              to get this working or obtain a
++			              shared libssl library for
++			              opendkim to use.])
++		fi
++
++		LIBCRYPTO_LIBS="$LIBCRYPTO_LIBS -ldl"
++		AC_SEARCH_LIBS([SSL_library_init], [ssl], ,
++		               AC_MSG_ERROR([libssl not found]), [-ldl])
++	fi
+ 
+ 	AC_CHECK_DECL([SHA256_DIGEST_LENGTH],
+                       AC_DEFINE([HAVE_SHA256], 1,
+--- opendkim-2.11.0~alpha.orig/opendkim/opendkim-crypto.c
++++ opendkim-2.11.0~alpha/opendkim/opendkim-crypto.c
+@@ -222,7 +222,11 @@ dkimf_crypto_free_id(void *ptr)
+ 	{
+ 		assert(pthread_setspecific(id_key, ptr) == 0);
+ 
++#if OPENSSL_VERSION_NUMBER >= 0x10100000
++		OPENSSL_thread_stop();
++#else
+ 		ERR_remove_state(0);
++#endif
+ 
+ 		free(ptr);
+ 
+@@ -392,11 +396,15 @@ dkimf_crypto_free(void)
+ {
+ 	if (crypto_init_done)
+ 	{
++#if OPENSSL_VERSION_NUMBER >= 0x10100000
++		OPENSSL_thread_stop();
++#else
+ 		CRYPTO_cleanup_all_ex_data();
+ 		CONF_modules_free();
+ 		EVP_cleanup();
+ 		ERR_free_strings();
+ 		ERR_remove_state(0);
++#endif
+ 
+ 		if (nmutexes > 0)
+ 		{



More information about the arch-commits mailing list