pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail up-imapproxy: re-add version 1.2.8 with OpenSSL 1...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/477311e245c8
branches:  trunk
changeset: 427493:477311e245c8
user:      tm <tm%pkgsrc.org@localhost>
date:      Fri Apr 17 11:28:02 2020 +0000

description:
up-imapproxy: re-add version 1.2.8 with OpenSSL 1.1 patches

Include patchset from the community and Debian package maintainers to
support OpenSSL version 1.1. This is the more feature rich version of
imapproxy.

Last official changelog entries:

2016-09-12  Paul Lesniewski <paul%squirrelmail.org@localhost>
        * Added support for systemd startup
        * Added support for accepting pre-auth ID commands (RFC 2971)
        * Added support for DNS RR to cycle through multiple IMAP
          server backends (thanks to Wolfgang Breyha)
        * Added ability to restrict DNS lookups to IPv4 or IPv6
          only (thanks to Wolfgang Breyha)
        * Make EGD support conditional, provide compatibility with
          LibreSSL, other small fixes provided by the BSD team
        * Fixed anomalous crashes recycling used connections (thanks
          to Emmanuel Dreyfus)
        * Retain compatibility with older OpenSSL versions (thanks to
          Wolfgang Breyha)
        * Make use of the no_new_privs flag (Linux only) when becoming
          non-root (thanks to Shawn Landden)

2014-01-20  Paul Lesniewski <paul%squirrelmail.org@localhost>
        * Added support for up to TLS v1.2 (thanks to Emmanuel Dreyfus)
        * Added support for ECDHE ciphers (thanks to Emmanuel Dreyfus)
        * Added ability to manually specify TLS ciphers (thanks to Emmanuel Dreyfus)
        * Added server certificate validation (thanks to Emmanuel Dreyfus)

2012-01-01  Paul Lesniewski <paul%squirrelmail.org@localhost>
        * Fixed problem where default TLS CA data would never
          be loaded (thanks to Orion Poplawski)
        * Fixed bug in SSL context initialization

diffstat:

 mail/Makefile                                                       |   3 +-
 mail/up-imappproxy/DESCR                                            |   4 +
 mail/up-imappproxy/Makefile                                         |  43 ++++++++++
 mail/up-imappproxy/PLIST                                            |   9 ++
 mail/up-imappproxy/distinfo                                         |  20 ++++
 mail/up-imappproxy/files/smf/manifest.xml                           |  29 ++++++
 mail/up-imappproxy/patches/patch-check-dup-return-value             |  37 ++++++++
 mail/up-imappproxy/patches/patch-configure                          |  15 +++
 mail/up-imappproxy/patches/patch-default-location-conf              |  32 +++++++
 mail/up-imappproxy/patches/patch-fix-egd-ifdef                      |  18 ++++
 mail/up-imappproxy/patches/patch-fix-missing-definitions            |  17 +++
 mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c       |  18 ++++
 mail/up-imappproxy/patches/patch-fix-size_t-formatters-imapcommon.c |  18 ++++
 mail/up-imappproxy/patches/patch-fix-socklen_t-types-main.c         |  18 ++++
 mail/up-imappproxy/patches/patch-fix-socklen_t-types-request.c      |  27 ++++++
 mail/up-imappproxy/patches/patch-fix-ssl-types                      |  27 ++++++
 mail/up-imappproxy/patches/patch-openssl-1.1-imapcommon.c           |  21 ++++
 mail/up-imappproxy/patches/patch-openssl-1.1-main.c                 |  38 ++++++++
 mail/up-imappproxy/patches/patch-remove-install-chown               |  41 +++++++++
 mail/up-imappproxy/patches/patch-remove-unused-variables            |  18 ++++
 20 files changed, 452 insertions(+), 1 deletions(-)

diffs (truncated from 543 to 300 lines):

diff -r 1544df2864be -r 477311e245c8 mail/Makefile
--- a/mail/Makefile     Fri Apr 17 11:27:36 2020 +0000
+++ b/mail/Makefile     Fri Apr 17 11:28:02 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.547 2020/03/31 20:37:47 roy Exp $
+# $NetBSD: Makefile,v 1.548 2020/04/17 11:28:02 tm Exp $
 #
 
 COMMENT=       Electronic mail utilities
@@ -392,6 +392,7 @@
 SUBDIR+=       tnef2txt
 SUBDIR+=       trojita
 SUBDIR+=       turba
+SUBDIR+=       up-imapproxy
 SUBDIR+=       vm
 SUBDIR+=       wl
 SUBDIR+=       wl-snapshot
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/DESCR  Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,4 @@
+Proxies IMAP transactions between an IMAP client and an IMAP server. The
+general idea is that the client should never know that it's not talking to
+the real IMAP server. The only thing that makes this a slightly unique Imap
+Proxy server is that it caches server connections.
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/Makefile       Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,43 @@
+# $NetBSD: Makefile,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+VERSION=       1.2.8
+PKGNAME=       up-imapproxy-${VERSION}
+DISTNAME=      up-imapproxy_${VERSION}~svn20171105.orig
+CATEGORIES=    mail
+MASTER_SITES=  ${MASTER_SITE_DEBIAN:=pool/main/u/up-imapproxy/}
+EXTRACT_SUFX=  .tar.bz2
+CONFLICTS+=    imapproxy-[0-9]*
+
+MAINTAINER=    tm%NetBSD.org@localhost
+HOMEPAGE=      http://www.imapproxy.org/
+COMMENT=       Connection caching IMAP proxy server
+LICENSE=       gnu-gpl-v2
+
+GNU_CONFIGURE= YES
+
+WRKSRC=                ${WRKDIR}/squirrelmail.imap_proxy
+
+RCD_SCRIPTS=                   imapproxy
+RCD_SCRIPT_SRC.imapproxy=      ${WRKSRC}/scripts/imapproxy-bsd.init
+
+INSTALLATION_DIRS+=    sbin share/doc/imapproxy share/examples/imapproxy
+CONF_FILES=            ${PREFIX}/share/examples/imapproxy/imapproxy.conf \
+                               ${PKG_SYSCONFDIR}/imapproxy.conf
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     include/imapproxy.h
+SUBST_VARS.paths=      PKG_SYSCONFDIR VARBASE
+SUBST_MESSAGE.paths=   Fixing hard coded paths.
+
+post-install:
+.for doc in COPYING ChangeLog README README.known_issues README.ssl
+       ${INSTALL_DATA} ${WRKSRC}/${doc} ${DESTDIR}${PREFIX}/share/doc/imapproxy
+.endfor
+       ${INSTALL_DATA} ${WRKSRC}/scripts/imapproxy.conf \
+                ${DESTDIR}${PREFIX}/share/examples/imapproxy
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/PLIST  Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2020/04/17 11:28:02 tm Exp $
+sbin/in.imapproxyd
+sbin/pimpstat
+share/doc/imapproxy/COPYING
+share/doc/imapproxy/ChangeLog
+share/doc/imapproxy/README
+share/doc/imapproxy/README.known_issues
+share/doc/imapproxy/README.ssl
+share/examples/imapproxy/imapproxy.conf
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/distinfo       Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+SHA1 (up-imapproxy_1.2.8~svn20171105.orig.tar.bz2) = 85e76717b0d2f790e366b7516cc567fc551c9cc6
+RMD160 (up-imapproxy_1.2.8~svn20171105.orig.tar.bz2) = dac57dcea68c333f6b05942c99fb8d0bfd0b7808
+SHA512 (up-imapproxy_1.2.8~svn20171105.orig.tar.bz2) = 72b79266d3f277052657ecab47a431c9efd764e9fa9523177288cedeede47dd1a5a654a8c9a851a45b3175f43e18ad2290d87778b45889976f7ce0d17625962f
+Size (up-imapproxy_1.2.8~svn20171105.orig.tar.bz2) = 118836 bytes
+SHA1 (patch-check-dup-return-value) = ee1aee413dd3d0a1a01cb9c360c71f4cecfe5c7a
+SHA1 (patch-configure) = 514e1b7c7470aef719364470987166418f6f40ba
+SHA1 (patch-default-location-conf) = 5d43f7d142b3a25d940a58c8bed5def799119845
+SHA1 (patch-fix-egd-ifdef) = cd17fb681a9c7bcfe8f005235eeed36160e97721
+SHA1 (patch-fix-missing-definitions) = 026448da651b76b91bda4ccef453a1ab646d8524
+SHA1 (patch-fix-size_t-formatters-hash.c) = a5c2c26c9c4c1241099d78e6ef0adc9241c2e8e6
+SHA1 (patch-fix-size_t-formatters-imapcommon.c) = 23ea515f680105864dd5c8381acdcfd84c141be7
+SHA1 (patch-fix-socklen_t-types-main.c) = d9ec2c92ecfee08c54c6e28a6a15dfc6730eeffd
+SHA1 (patch-fix-socklen_t-types-request.c) = 99cd03e88f7885bebc766be9d2d14958ffd45be6
+SHA1 (patch-fix-ssl-types) = 2f32060a7ab8922dd038e07f20da6d4240c2bdb0
+SHA1 (patch-openssl-1.1-imapcommon.c) = 69fca63f349fc4c2c11169936136e4611d496901
+SHA1 (patch-openssl-1.1-main.c) = fe2d2eab38a872dd55f0f1cf965e50bd9e501022
+SHA1 (patch-remove-install-chown) = e3811e13fa3fe89dc7d58162a3dcde9a57527be2
+SHA1 (patch-remove-unused-variables) = 37e0a94667d390e11bb408a69e3758e40675c63c
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/files/smf/manifest.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/files/smf/manifest.xml Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+  <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="0">
+    <create_default_instance enabled="false" />
+    <single_instance />
+    <dependency name="net-physical" grouping="require_all" restart_on="none" type="service">
+      <service_fmri value="svc:/network/physical"/>
+    </dependency>
+    <dependency name="filesystem" grouping="require_all" restart_on="none" type="service">
+      <service_fmri value="svc:/system/filesystem/local"/>
+    </dependency>
+    <exec_method name="start" type="method" exec="@PREFIX@/sbin/in.imapproxyd -f %{config_file}" timeout_seconds="10"/>
+    <exec_method name="stop" type="method" exec=":kill" timeout_seconds="10"/>
+    <exec_method name="refresh" type="method" exec=":kill -HUP" timeout_seconds="60"/>
+    <property_group name="startd" type="framework">
+      <propval name="duration" type="astring" value="contract"/>
+      <propval name="ignore_error" type="astring" value="core,signal"/>
+    </property_group>
+    <property_group name="application" type="application">
+      <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/imapproxy.conf"/>
+    </property_group>
+    <template>
+      <common_name>
+        <loctext xml:lang="C">imapproxy - Simple connection caching IMAP proxy daemon</loctext>
+      </common_name>
+    </template>
+  </service>
+</service_bundle>
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/patches/patch-check-dup-return-value
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/patches/patch-check-dup-return-value   Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-check-dup-return-value,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Check dup() return value. Switched to dup2(), which combines the
+close() call.
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/main.c.orig
++++ src/main.c
+@@ -998,6 +998,7 @@
+  FILE* fp=NULL;
+  pid_t pid;                         /* used just for a fork call */
+  int i;
++ int j;
+ 
+     /* detach from our parent if necessary */
+     // NOTE: When started under systemd, the parent PID is already 1, so
+@@ -1059,9 +1060,15 @@
+               strerror(errno));
+               exit( 1 );
+       }
+-      close(2); dup(i);
+-      close(1); dup(i);
+-      close(0); dup(i);
++      for(j=0; j <= 2; j++)
++      {
++              if (dup2(i, j) < 0)
++              {
++                      syslog(LOG_ERR, "%s: dup2() failed: %s", fn,
++                              strerror(errno));
++                      exit( 1 );
++              }
++      }
+       close(i);
+     }
+     else
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/patches/patch-configure        Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-configure,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix test command in configure
+
+--- configure.orig     2010-07-25 08:19:30.000000000 +0000
++++ configure
+@@ -3419,7 +3419,7 @@ else
+    curses_found=no
+ fi
+ 
+-if test "$curses_found" == no; then
++if test "$curses_found" = no; then
+   echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5
+ echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6
+ if test "${ac_cv_lib_ncurses_initscr+set}" = set; then
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/patches/patch-default-location-conf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/patches/patch-default-location-conf    Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-default-location-conf,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix config and pid file path. And add missing definitions.
+
+--- include/imapproxy.h.orig   Fri Jan 27 20:53:57 2017
++++ include/imapproxy.h        Thu Apr 16 21:25:31 2020
+@@ -179,10 +179,10 @@
+ #define SELECT_STATUS_BUF_SIZE  256               /* size of select status   */
+ 
+ #ifndef DEFAULT_CONFIG_FILE
+-#define DEFAULT_CONFIG_FILE     "/etc/imapproxy.conf"
++#define DEFAULT_CONFIG_FILE     "@PKG_SYSCONFDIR@/etc/imapproxy.conf"
+ #endif
+ #ifndef DEFAULT_PID_FILE
+-#define DEFAULT_PID_FILE       "/var/run/imapproxy.pid"
++#define DEFAULT_PID_FILE       "@VARBASE@/run/imapproxy.pid"
+ #endif
+ 
+ #define LITERAL_PASSWORD        1
+@@ -373,8 +373,12 @@
+ extern void ICC_Logout( ICC_Struct * );
+ extern void ICC_Recycle( unsigned int );
+ extern void ICC_Recycle_Loop( void );
++extern void ICC_Invalidate( ICC_Struct * );
+ extern void LockMutex( pthread_mutex_t * );
+ extern void UnLockMutex( pthread_mutex_t * );
++#ifdef HAVE_LIBSSL
++extern int Attempt_STARTTLS( ITD_Struct * );
++#endif
+ extern void SetDefaultConfigValues(ProxyConfig_Struct *);
+ extern void SetConfigOptions( char * );
+ extern void SetLogOptions( void );
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/patches/patch-fix-egd-ifdef
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/patches/patch-fix-egd-ifdef    Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-fix-egd-ifdef,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix compilation without EGD
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/main.c.orig
++++ src/main.c
+@@ -460,7 +460,7 @@
+     /* Set up OpenSSL thread protection */
+     ssl_thread_setup(fn);
+ 
+-#ifndef HAVE_RAND_EGD
++#ifdef HAVE_RAND_EGD
+     if ( RAND_egd( ( RAND_file_name( f_randfile, sizeof( f_randfile ) ) == f_randfile ) ? f_randfile : "/.rnd" ) ) 
+ #endif
+     {
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/patches/patch-fix-missing-definitions
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/patches/patch-fix-missing-definitions  Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-fix-missing-definitions,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix missing definitions
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/becomenonroot.c.orig
++++ src/becomenonroot.c
+@@ -48,6 +48,7 @@
+ 
+ #include <sys/types.h>
+ #include <strings.h>
++#include <string.h>
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <stdio.h>
diff -r 1544df2864be -r 477311e245c8 mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c     Fri Apr 17 11:28:02 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-fix-size_t-formatters-hash.c,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix size_t formatters
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/hash.c.orig
++++ src/hash.c
+@@ -69,7 +69,7 @@
+ 
+   if ( Size > sizeof Hash_Buffer )
+   {
+-    syslog(LOG_ERR, "Hash(): Maximum of %d for '%s' exceeds architectural limit of %d", Size, Input_Key, sizeof Hash_Buffer );
++    syslog(LOG_ERR, "Hash(): Maximum of %d for '%s' exceeds architectural limit of %zd", Size, Input_Key, sizeof Hash_Buffer );



Home | Main Index | Thread Index | Old Index