guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: dovecot: Fix build.


From: guix-commits
Subject: branch master updated: gnu: dovecot: Fix build.
Date: Thu, 27 Apr 2023 21:37:13 -0400

This is an automated email from the git hooks/post-receive script.

iyzsong pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new aecc6e7058 gnu: dovecot: Fix build.
aecc6e7058 is described below

commit aecc6e70587f8412cbbb9b2c13141de4f534518e
Author: 宋文武 <iyzsong@member.fsf.org>
AuthorDate: Fri Apr 28 09:33:03 2023 +0800

    gnu: dovecot: Fix build.
    
    * gnu/packages/mail.scm (dovecot)[source]: Add patch for OpenSSL v3.
    * gnu/packages/patches/dovecot-opensslv3.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
---
 gnu/local.mk                                 |  1 +
 gnu/packages/mail.scm                        |  4 +++-
 gnu/packages/patches/dovecot-opensslv3.patch | 34 ++++++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index c0a5c721fc..dfab2aafc3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1051,6 +1051,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/docbook-xsl-support-old-url.patch       \
   %D%/packages/patches/doc++-include-directives.patch          \
   %D%/packages/patches/doc++-segfault-fix.patch                        \
+  %D%/packages/patches/dovecot-opensslv3.patch                 \
   %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
   %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch     \
   %D%/packages/patches/dstat-skip-devices-without-io.patch     \
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ef4bfd4172..a452c5296b 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2007,7 +2007,9 @@ facilities for checking incoming mail.")
                            (version-major+minor version) "/"
                            "dovecot-" version ".tar.gz"))
        (sha256
-        (base32 "0ll546dldhxqk8yr2jnfq0rag7vp9d9hz7gf6pgsnj41jvmk5a6a"))))
+        (base32 "0ll546dldhxqk8yr2jnfq0rag7vp9d9hz7gf6pgsnj41jvmk5a6a"))
+       (patches
+        (search-patches "dovecot-opensslv3.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      (list pkg-config))
diff --git a/gnu/packages/patches/dovecot-opensslv3.patch 
b/gnu/packages/patches/dovecot-opensslv3.patch
new file mode 100644
index 0000000000..fa6c44f672
--- /dev/null
+++ b/gnu/packages/patches/dovecot-opensslv3.patch
@@ -0,0 +1,34 @@
+diff -up dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c.opensslv3 
dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c
+--- dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c.opensslv3   2021-06-03 
18:56:52.573174433 +0200
++++ dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c     2021-06-03 
18:56:52.585174274 +0200
+@@ -73,10 +73,30 @@
+   2<tab>key algo oid<tab>1<tab>symmetric algo name<tab>salt<tab>hash 
algo<tab>rounds<tab>E(RSA = i2d_PrivateKey, EC=Private Point)<tab>key id
+ **/
+ 
++#if OPENSSL_VERSION_MAJOR == 3
++static EC_KEY *EVP_PKEY_get0_EC_KEYv3(EVP_PKEY *key)
++{
++  EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key);
++  EVP_PKEY_set1_EC_KEY(key, eck);
++  EC_KEY_free(eck);
++  return eck;
++}
++
++static EC_KEY *EVP_PKEY_get1_EC_KEYv3(EVP_PKEY *key)
++{
++  EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key);
++  EVP_PKEY_set1_EC_KEY(key, eck);
++  return eck;
++}
++
++#define EVP_PKEY_get0_EC_KEY EVP_PKEY_get0_EC_KEYv3 
++#define EVP_PKEY_get1_EC_KEY EVP_PKEY_get1_EC_KEYv3
++#else
+ #ifndef HAVE_EVP_PKEY_get0
+ #define EVP_PKEY_get0_EC_KEY(x) x->pkey.ec
+ #define EVP_PKEY_get0_RSA(x) x->pkey.rsa
+ #endif
++#endif
+ 
+ #ifndef HAVE_OBJ_LENGTH
+ #define OBJ_length(o) ((o)->length)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]