diff options
author | Vladimír Čunát <v@cunat.cz> | 2019-08-24 08:19:05 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2019-08-24 08:55:37 +0200 |
commit | 2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1 (patch) | |
tree | 36de0660dc2c9f3731bd8b60ec852ca0c452efce /pkgs/development/libraries/opendkim | |
parent | 84a91208a948be5eca97ea182c4256d9d6ecf171 (diff) | |
parent | 8943fb5f24b9e1aa1d577be4e214d166643269fd (diff) | |
download | nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.gz nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.bz2 nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.lz nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.xz nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.tar.zst nixpkgs-2e6bf42a2207d5ecfe6e67de2def6e004a0eb1f1.zip |
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to name -> pname+version. Fortunately, almost everything was auto-resolved by kdiff3, and for now I just fixed up a couple evaluation problems, as verified by the tarball job. There might be some fallback to these conflicts, but I believe it should be minimal. Hydra nixpkgs: ?compare=1538299
Diffstat (limited to 'pkgs/development/libraries/opendkim')
-rw-r--r-- | pkgs/development/libraries/opendkim/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/opendkim/openssl-1.1.patch | 81 |
2 files changed, 85 insertions, 2 deletions
diff --git a/pkgs/development/libraries/opendkim/default.nix b/pkgs/development/libraries/opendkim/default.nix index fd8dadb5398..66496af12f9 100644 --- a/pkgs/development/libraries/opendkim/default.nix +++ b/pkgs/development/libraries/opendkim/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, libbsd, openssl, libmilter -, perl, makeWrapper }: +, autoreconfHook, perl, makeWrapper }: stdenv.mkDerivation rec { pname = "opendkim"; @@ -16,10 +16,12 @@ stdenv.mkDerivation rec { "ac_cv_func_realloc_0_nonnull=yes" ]; - nativeBuildInputs = [ pkgconfig makeWrapper ]; + nativeBuildInputs = [ autoreconfHook pkgconfig makeWrapper ]; buildInputs = [ libbsd openssl libmilter perl ]; + patches = [ ./openssl-1.1.patch ]; + postInstall = '' wrapProgram $out/sbin/opendkim-genkey \ --prefix PATH : ${openssl.bin}/bin diff --git a/pkgs/development/libraries/opendkim/openssl-1.1.patch b/pkgs/development/libraries/opendkim/openssl-1.1.patch new file mode 100644 index 00000000000..c36559cf16c --- /dev/null +++ b/pkgs/development/libraries/opendkim/openssl-1.1.patch @@ -0,0 +1,81 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -864,26 +864,28 @@ + 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, +--- a/opendkim/opendkim-crypto.c ++++ b/opendkim/opendkim-crypto.c +@@ -222,7 +222,11 @@ + { + 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 @@ + { + 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) + { |