aboutsummaryrefslogtreecommitdiffstats
path: root/mail/up-imapproxy
diff options
context:
space:
mode:
authorbrnrd <brnrd@FreeBSD.org>2018-10-19 17:03:38 +0800
committerbrnrd <brnrd@FreeBSD.org>2018-10-19 17:03:38 +0800
commit14204222bea5bc851e6d8399f18914965fb22029 (patch)
tree89c55acd505d348611f990d65cda4ab6155ca2f0 /mail/up-imapproxy
parentaab6ed4bc63eb30545bc79e0fad0468de9922ed6 (diff)
downloadfreebsd-ports-gnome-14204222bea5bc851e6d8399f18914965fb22029.tar.gz
freebsd-ports-gnome-14204222bea5bc851e6d8399f18914965fb22029.tar.zst
freebsd-ports-gnome-14204222bea5bc851e6d8399f18914965fb22029.zip
mail/up-imapproxy: Add OpenSSL 1.1 support
- Switch to Debian snapshot 1.2.8pre - Add OpenSSL 1.1 patch from Debian - Supports TLSv1.1 and TLSv1.2 too Obtained from: http://packages.debian.org/source/up-imapproxy
Diffstat (limited to 'mail/up-imapproxy')
-rw-r--r--mail/up-imapproxy/Makefile13
-rw-r--r--mail/up-imapproxy/distinfo5
-rw-r--r--mail/up-imapproxy/files/patch-Makefile.in11
-rw-r--r--mail/up-imapproxy/files/patch-OpenSSL-1.154
-rw-r--r--mail/up-imapproxy/files/patch-configure.in18
-rw-r--r--mail/up-imapproxy/files/patch-src_main.c12
-rw-r--r--mail/up-imapproxy/files/patch-ssl35
7 files changed, 66 insertions, 82 deletions
diff --git a/mail/up-imapproxy/Makefile b/mail/up-imapproxy/Makefile
index 2280a7442674..c7c35a0eee51 100644
--- a/mail/up-imapproxy/Makefile
+++ b/mail/up-imapproxy/Makefile
@@ -2,12 +2,9 @@
# $FreeBSD$
PORTNAME= imapproxy
-PORTVERSION= 1.2.7
-PORTREVISION= 5
+DISTVERSION= 1.2.8-pre20171105
CATEGORIES= mail
-MASTER_SITES= SF/squirrelmail/imap_proxy/${PORTVERSION}
PKGNAMEPREFIX= up-
-DISTNAME= squirrelmail-imap_proxy-${PORTVERSION}
MAINTAINER= brnrd@FreeBSD.org
COMMENT= Caching IMAP proxy server
@@ -17,6 +14,11 @@ LICENSE_FILE= ${WRKSRC}/COPYING
USES= autoreconf tar:bzip2 ncurses pathfix ssl
+USE_GITHUB= yes
+GH_ACCOUNT= rlaager
+GH_PROJECT= ${PORTNAME}-pkg
+GH_TAGNAME= upstream/1.2.8_svn20171105
+
OPTIONS_DEFINE= DOVECOT DOCS
DOVECOT_DESC= Use with dovecot2
@@ -32,6 +34,9 @@ SUB_FILES= pkg-message
DOCS= ChangeLog README README.debian README.known_issues README.ssl
SBIN= in.imapproxyd pimpstat
+post-patch:
+ ${MKDIR} ${WRKSRC}/bin
+
do-install:
.for i in ${SBIN}
(cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} ${i} ${STAGEDIR}${PREFIX}/sbin)
diff --git a/mail/up-imapproxy/distinfo b/mail/up-imapproxy/distinfo
index beab3faa1a08..adfbe270ced6 100644
--- a/mail/up-imapproxy/distinfo
+++ b/mail/up-imapproxy/distinfo
@@ -1,2 +1,3 @@
-SHA256 (squirrelmail-imap_proxy-1.2.7.tar.bz2) = dd8ad40e3e457bd76fc9f19ef1c0d89911e3e3cc722415d1183f765dcac1ae48
-SIZE (squirrelmail-imap_proxy-1.2.7.tar.bz2) = 111651
+TIMESTAMP = 1539772291
+SHA256 (rlaager-imapproxy-pkg-1.2.8-pre20171105-upstream-1.2.8_svn20171105_GH0.tar.gz) = b4c9cbb7a370d1371dfc36f4670e0dfda8fea6dc8b19d4c7af74fa81a8000751
+SIZE (rlaager-imapproxy-pkg-1.2.8-pre20171105-upstream-1.2.8_svn20171105_GH0.tar.gz) = 146395
diff --git a/mail/up-imapproxy/files/patch-Makefile.in b/mail/up-imapproxy/files/patch-Makefile.in
deleted file mode 100644
index 70c96bd173a8..000000000000
--- a/mail/up-imapproxy/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig 2016-02-05 10:05:31 UTC
-+++ Makefile.in
-@@ -70,7 +70,7 @@ $(XYD_BIN): $(XYD_OBJ)
- $(CC) -o $@ $(XYD_OBJ) $(LDFLAGS) $(XYD_LIB)
-
- $(TAT_BIN): $(TAT_OBJ)
-- $(CC) -o $@ $(TAT_OBJ) $(TAT_LIB)
-+ $(CC) -o $@ $(TAT_OBJ) $(LDFLAGS) $(TAT_LIB)
-
- clean:
- rm -f ./src/core $(XYD_OBJ) $(TAT_OBJ) $(XYD_BIN) $(TAT_BIN)
diff --git a/mail/up-imapproxy/files/patch-OpenSSL-1.1 b/mail/up-imapproxy/files/patch-OpenSSL-1.1
new file mode 100644
index 000000000000..5bd80f31a9dd
--- /dev/null
+++ b/mail/up-imapproxy/files/patch-OpenSSL-1.1
@@ -0,0 +1,54 @@
+--- src/imapcommon.c.orig 2017-11-05 07:29:47 UTC
++++ src/imapcommon.c
+@@ -554,16 +554,24 @@ extern ICD_Struct *Get_Server_conn( char
+ unsigned int Expiration;
+ struct addrinfo *useai;
+
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx;
+ int md_len;
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
++ EVP_MD_CTX mdctx_;
++#define EVP_MD_CTX_new(x) &mdctx_
++#define EVP_MD_CTX_free(x)
++#endif
++
+ Expiration = PC_Struct.cache_expiration_time;
+ memset( &Server, 0, sizeof Server );
+
+ /* need to md5 the passwd regardless, so do that now */
+- EVP_DigestInit(&mdctx, EVP_md5());
+- EVP_DigestUpdate(&mdctx, Password, strlen(Password));
+- EVP_DigestFinal(&mdctx, md5pw, &md_len);
++ mdctx = EVP_MD_CTX_new();
++ EVP_DigestInit(mdctx, EVP_md5());
++ EVP_DigestUpdate(mdctx, Password, strlen(Password));
++ EVP_DigestFinal(mdctx, md5pw, &md_len);
++ EVP_MD_CTX_free(mdctx);
+
+ /* see if we have a reusable connection available */
+ ICC_Active = NULL;
+--- src/main.c.orig 2017-11-05 07:29:47 UTC
++++ src/main.c
+@@ -460,7 +460,7 @@ int main( int argc, char *argv[] )
+ /* Set up OpenSSL thread protection */
+ ssl_thread_setup(fn);
+
+-#ifndef HAVE_RAND_EGD
++#ifndef OPENSSL_NO_EGD
+ if ( RAND_egd( ( RAND_file_name( f_randfile, sizeof( f_randfile ) ) == f_randfile ) ? f_randfile : "/.rnd" ) )
+ #endif
+ {
+@@ -1574,9 +1574,9 @@ static int verify_callback(int ok, X509_
+ verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
+ }
+ }
+- switch (ctx->error) {
++ switch (err) {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+- X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, sizeof(buf));
++ X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, sizeof(buf));
+ syslog(LOG_NOTICE, "issuer= %s", buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
diff --git a/mail/up-imapproxy/files/patch-configure.in b/mail/up-imapproxy/files/patch-configure.in
deleted file mode 100644
index 7b04b589be61..000000000000
--- a/mail/up-imapproxy/files/patch-configure.in
+++ /dev/null
@@ -1,18 +0,0 @@
---- configure.in.orig 2008-01-28 13:15:08.000000000 +0000
-+++ configure.in 2010-06-14 10:07:34.000000000 +0000
-@@ -16,8 +16,3 @@
- dnl Check for BSD sockets
--AC_CHECK_FUNC(connect, ,
-- AC_CHECK_LIB(nsl, gethostbyname, ,)
-- AC_CHECK_LIB(socket, connect, ,
-- AC_ERROR([Can't compile without BSD sockets!!!])
-- )
--)
-+AC_CHECK_FUNC([socket], , [AC_CHECK_LIB(socket, socket, , exit)])
-
-@@ -131,3 +126,4 @@
-
--
-+eval expanded_sysconfdir="\"$sysconfdir\""
-+AC_DEFINE_UNQUOTED(DEFAULT_CONFIG_FILE, "$expanded_sysconfdir/imapproxyd.conf", [default location of config file])
- AC_CONFIG_HEADER(config.h)
diff --git a/mail/up-imapproxy/files/patch-src_main.c b/mail/up-imapproxy/files/patch-src_main.c
deleted file mode 100644
index e78a949c8169..000000000000
--- a/mail/up-imapproxy/files/patch-src_main.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/main.c.orig 2016-01-29 18:11:40 UTC
-+++ src/main.c
-@@ -473,7 +473,9 @@ int main( int argc, char *argv[] )
- ssl_thread_setup(fn);
-
- /* Need to seed PRNG, too! */
-+#ifndef OPENSSL_NO_EGD
- if ( RAND_egd( ( RAND_file_name( f_randfile, sizeof( f_randfile ) ) == f_randfile ) ? f_randfile : "/.rnd" ) )
-+#endif
- {
- /* Not an EGD, so read and write it. */
- if ( RAND_load_file( f_randfile, -1 ) )
diff --git a/mail/up-imapproxy/files/patch-ssl b/mail/up-imapproxy/files/patch-ssl
deleted file mode 100644
index dafbb0f2aaa3..000000000000
--- a/mail/up-imapproxy/files/patch-ssl
+++ /dev/null
@@ -1,35 +0,0 @@
---- include/imapproxy.h Tue Apr 20 23:55:23 2004
-+++ include/imapproxy.h Sun Dec 10 11:28:42 2006
-@@ -107,6 +107,7 @@
-
- #if HAVE_LIBSSL
- #include <openssl/ssl.h>
-+#include <openssl/md5.h>
- #include <openssl/rand.h>
- #include <limits.h>
- #endif
---- config.h.in Tue Apr 20 10:26:46 2004
-+++ config.h.in Sun Dec 10 11:27:13 2006
-@@ -27,7 +27,7 @@
- #undef HAVE_LIBSOCKET
-
- /* Define to 1 if you have the `ssl' library (-lssl). */
--#undef HAVE_LIBSSL
-+#define HAVE_LIBSSL 1
-
- /* Define to 1 if you have the <memory.h> header file. */
- #undef HAVE_MEMORY_H
---- src/threads.c 2008-01-28 14:15:08.000000000 +0100
-+++ src/threads.c 2008-02-25 13:50:40.000000000 +0100
-@@ -51,7 +51,10 @@
-
- #define OPENSSL_THREAD_DEFINES
- #include <openssl/opensslconf.h>
--#if defined(OPENSSL_THREADS)
-+#if defined(THREADS)
-+#define OPENSSL_THREADS
-+#endif
-+#if defined(OPENSSL_THREADS)
-
-
- #include <stdio.h>