pkgsrc-Changes archive

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

CVS commit: pkgsrc/mail



Module Name:    pkgsrc
Committed By:   tm
Date:           Fri Apr 17 11:28:02 UTC 2020

Modified Files:
        pkgsrc/mail: Makefile
Added Files:
        pkgsrc/mail/up-imappproxy: DESCR Makefile PLIST distinfo
        pkgsrc/mail/up-imappproxy/files/smf: manifest.xml
        pkgsrc/mail/up-imappproxy/patches: patch-check-dup-return-value
            patch-configure patch-default-location-conf patch-fix-egd-ifdef
            patch-fix-missing-definitions patch-fix-size_t-formatters-hash.c
            patch-fix-size_t-formatters-imapcommon.c
            patch-fix-socklen_t-types-main.c
            patch-fix-socklen_t-types-request.c patch-fix-ssl-types
            patch-openssl-1.1-imapcommon.c patch-openssl-1.1-main.c
            patch-remove-install-chown patch-remove-unused-variables

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.547 -r1.548 pkgsrc/mail/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/up-imappproxy/DESCR \
    pkgsrc/mail/up-imappproxy/Makefile pkgsrc/mail/up-imappproxy/PLIST \
    pkgsrc/mail/up-imappproxy/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/up-imappproxy/files/smf/manifest.xml
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/mail/up-imappproxy/patches/patch-check-dup-return-value \
    pkgsrc/mail/up-imappproxy/patches/patch-configure \
    pkgsrc/mail/up-imappproxy/patches/patch-default-location-conf \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-egd-ifdef \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-missing-definitions \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-imapcommon.c \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-main.c \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-request.c \
    pkgsrc/mail/up-imappproxy/patches/patch-fix-ssl-types \
    pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-imapcommon.c \
    pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-main.c \
    pkgsrc/mail/up-imappproxy/patches/patch-remove-install-chown \
    pkgsrc/mail/up-imappproxy/patches/patch-remove-unused-variables

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/Makefile
diff -u pkgsrc/mail/Makefile:1.547 pkgsrc/mail/Makefile:1.548
--- pkgsrc/mail/Makefile:1.547  Tue Mar 31 20:37:47 2020
+++ pkgsrc/mail/Makefile        Fri Apr 17 11:28:02 2020
@@ -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+=    tnef
 SUBDIR+=       tnef2txt
 SUBDIR+=       trojita
 SUBDIR+=       turba
+SUBDIR+=       up-imapproxy
 SUBDIR+=       vm
 SUBDIR+=       wl
 SUBDIR+=       wl-snapshot

Added files:

Index: pkgsrc/mail/up-imappproxy/DESCR
diff -u /dev/null pkgsrc/mail/up-imappproxy/DESCR:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/DESCR     Fri Apr 17 11:28:02 2020
@@ -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.
Index: pkgsrc/mail/up-imappproxy/Makefile
diff -u /dev/null pkgsrc/mail/up-imappproxy/Makefile:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/Makefile  Fri Apr 17 11:28:02 2020
@@ -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"
Index: pkgsrc/mail/up-imappproxy/PLIST
diff -u /dev/null pkgsrc/mail/up-imappproxy/PLIST:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/PLIST     Fri Apr 17 11:28:02 2020
@@ -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
Index: pkgsrc/mail/up-imappproxy/distinfo
diff -u /dev/null pkgsrc/mail/up-imappproxy/distinfo:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/distinfo  Fri Apr 17 11:28:02 2020
@@ -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

Index: pkgsrc/mail/up-imappproxy/files/smf/manifest.xml
diff -u /dev/null pkgsrc/mail/up-imappproxy/files/smf/manifest.xml:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/files/smf/manifest.xml    Fri Apr 17 11:28:02 2020
@@ -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>

Index: pkgsrc/mail/up-imappproxy/patches/patch-check-dup-return-value
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-check-dup-return-value:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-check-dup-return-value      Fri Apr 17 11:28:02 2020
@@ -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
Index: pkgsrc/mail/up-imappproxy/patches/patch-configure
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-configure:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-configure   Fri Apr 17 11:28:02 2020
@@ -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
Index: pkgsrc/mail/up-imappproxy/patches/patch-default-location-conf
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-default-location-conf:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-default-location-conf       Fri Apr 17 11:28:02 2020
@@ -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 );
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-egd-ifdef
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-egd-ifdef:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-egd-ifdef       Fri Apr 17 11:28:02 2020
@@ -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
+     {
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-missing-definitions
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-missing-definitions:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-missing-definitions     Fri Apr 17 11:28:02 2020
@@ -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>
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-hash.c        Fri Apr 17 11:28:02 2020
@@ -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 );
+     exit(1);
+   }
+ 
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-imapcommon.c
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-imapcommon.c:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-size_t-formatters-imapcommon.c  Fri Apr 17 11:28:02 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-fix-size_t-formatters-imapcommon.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/imapcommon.c.orig
++++ src/imapcommon.c
+@@ -1004,7 +1004,7 @@
+      */
+     else if ( LiteralPasswd )
+     {
+-      snprintf( SendBuf, BufLen, "A0001 LOGIN %s {%d}\r\n", 
++      snprintf( SendBuf, BufLen, "A0001 LOGIN %s {%zd}\r\n",
+                 Username, strlen( Password ) );
+       if ( IMAP_Write( Server.conn, SendBuf, strlen(SendBuf) ) == -1 )
+       {
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-main.c
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-main.c:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-main.c  Fri Apr 17 11:28:02 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-fix-socklen_t-types-main.c,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix socklen_t types
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/main.c.orig
++++ src/main.c
+@@ -285,7 +285,7 @@
+     char f_randfile[ PATH_MAX ];
+     int listensd;                      /* socket descriptor we'll bind to */
+     long clientsd;                     /* incoming socket descriptor */
+-    int sockaddrlen;                       
++    socklen_t sockaddrlen;
+     struct sockaddr_storage srvaddr;
+     struct sockaddr_storage cliaddr;
+     pthread_t ThreadId;                /* thread id of each incoming conn */
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-request.c
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-request.c:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-socklen_t-types-request.c       Fri Apr 17 11:28:02 2020
@@ -0,0 +1,27 @@
+$NetBSD: patch-fix-socklen_t-types-request.c,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix socklen_t types
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/request.c.orig
++++ src/request.c
+@@ -702,7 +702,7 @@
+     char fullServerResponse[BUFSIZE] = "\0\0\0";
+     int BytesRead;
+     struct sockaddr_storage cli_addr;
+-    int sockaddrlen;
++    socklen_t sockaddrlen;
+     char hostaddr[INET6_ADDRSTRLEN], portstr[NI_MAXSERV];
+     
+     unsigned int BufLen = BUFSIZE - 1;
+@@ -979,7 +979,7 @@
+     ICD_Struct *conn;
+     char fullServerResponse[BUFSIZE] = "\0\0\0";
+     struct sockaddr_storage cli_addr;
+-    int sockaddrlen;
++    socklen_t sockaddrlen;
+     char hostaddr[INET6_ADDRSTRLEN], portstr[NI_MAXSERV];
+ 
+     memset( &Server, 0, sizeof Server );
Index: pkgsrc/mail/up-imappproxy/patches/patch-fix-ssl-types
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-fix-ssl-types:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-fix-ssl-types       Fri Apr 17 11:28:02 2020
@@ -0,0 +1,27 @@
+$NetBSD: patch-fix-ssl-types,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix SSL types
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/imapcommon.c.orig
++++ src/imapcommon.c
+@@ -543,7 +543,7 @@
+     char AuthBufIndex;
+ 
+     unsigned int BufLen = BUFSIZE - 1;
+-    char md5pw[MD5_DIGEST_LENGTH];
++    unsigned char md5pw[MD5_DIGEST_LENGTH];
+     char *tokenptr;
+     char *endptr;
+     char *last;
+@@ -555,7 +555,7 @@
+     struct addrinfo *useai;
+ 
+     EVP_MD_CTX mdctx;
+-    int md_len;
++    unsigned int md_len;
+ 
+     Expiration = PC_Struct.cache_expiration_time;
+     memset( &Server, 0, sizeof Server );
Index: pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-imapcommon.c
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-imapcommon.c:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-imapcommon.c    Fri Apr 17 11:28:02 2020
@@ -0,0 +1,21 @@
+$NetBSD: patch-openssl-1.1-imapcommon.c,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix compilation with OpenSSL 1.1
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/main.c.orig
++++ src/main.c
+@@ -1582,9 +1582,9 @@
+           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:
Index: pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-main.c
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-main.c:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-openssl-1.1-main.c  Fri Apr 17 11:28:02 2020
@@ -0,0 +1,38 @@
+$NetBSD: patch-openssl-1.1-main.c,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Fix compilation with OpenSSL 1.1
+
+Richard Laager <rlaager%wiktel.com@localhost>
+https://sourceforge.net/p/squirrelmail/mailman/message/35526927/
+
+--- src/imapcommon.c.orig
++++ src/imapcommon.c
+@@ -554,16 +554,24 @@
+     unsigned int Expiration;
+     struct addrinfo *useai;
+ 
+-    EVP_MD_CTX mdctx;
++    EVP_MD_CTX *mdctx;
+     unsigned 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;
Index: pkgsrc/mail/up-imappproxy/patches/patch-remove-install-chown
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-remove-install-chown:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-remove-install-chown        Fri Apr 17 11:28:02 2020
@@ -0,0 +1,41 @@
+$NetBSD: patch-remove-install-chown,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Remove install chown
+This eliminates the chown/chgrp from the install commands, which allows the
+package to be built without root privileges.
+
+Author: Richard Laager <rlaager%wiktel.com@localhost>
+
+--- Makefile.in.orig
++++ Makefile.in
+@@ -80,23 +80,23 @@
+ 
+ install: $(XYD_BIN) $(TAT_BIN)
+       mkdir -p $(DESTDIR)$(EBIN)
+-      $(INSTALL) -o bin -g bin -m 0755 $(XYD_BIN) $(DESTDIR)$(EBIN)
+-      $(INSTALL) -o bin -g bin -m 0755 $(TAT_BIN) $(DESTDIR)$(EBIN)
++      $(INSTALL) -m 0755 $(XYD_BIN) $(DESTDIR)$(EBIN)
++      $(INSTALL) -m 0755 $(TAT_BIN) $(DESTDIR)$(EBIN)
+ 
+ install-init-linux:
+-      $(INSTALL) -o root -g sys -m 0755 ./scripts/imapproxy-linux.init $(DESTDIR)$(ETC)/init.d/imapproxy
++      $(INSTALL) -m 0755 ./scripts/imapproxy-linux.init $(DESTDIR)$(ETC)/init.d/imapproxy
+       ln -s ../init.d/imapproxy $(DESTDIR)/etc/rc2.d/S99imapproxy
+       ln -s ../init.d/imapproxy $(DESTDIR)/etc/rc0.d/K10imapproxy
+ 
+ install-init-systemd:
+-      $(INSTALL) -o root -g root -m 0644 ./scripts/imap_proxy.service $(DESTDIR)/lib/systemd/system
++      $(INSTALL) -m 0644 ./scripts/imap_proxy.service $(DESTDIR)/lib/systemd/system
+ 
+ install-conf:
+-      $(INSTALL) -o root -g bin -m 0644 ./scripts/imapproxy.conf $(DESTDIR)$(ETC)
++      $(INSTALL) -m 0644 ./scripts/imapproxy.conf $(DESTDIR)$(ETC)
+ 
+ rpm-install: install
+-      $(INSTALL) -o root -g sys -m 0644 ./scripts/imapproxy.conf $(DESTDIR)/etc
+-      $(INSTALL) -o root -g sys -m 0755 ./scripts/imapproxy-linux.init $(DESTDIR)/etc/init.d/imapproxy
++      $(INSTALL) -m 0644 ./scripts/imapproxy.conf $(DESTDIR)/etc
++      $(INSTALL) -m 0755 ./scripts/imapproxy-linux.init $(DESTDIR)/etc/init.d/imapproxy
+ 
+ pkg:
+       pkgmk -o -r .
Index: pkgsrc/mail/up-imappproxy/patches/patch-remove-unused-variables
diff -u /dev/null pkgsrc/mail/up-imappproxy/patches/patch-remove-unused-variables:1.1
--- /dev/null   Fri Apr 17 11:28:02 2020
+++ pkgsrc/mail/up-imappproxy/patches/patch-remove-unused-variables     Fri Apr 17 11:28:02 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-remove-unused-variables,v 1.1 2020/04/17 11:28:02 tm Exp $
+
+Remove unused variables
+
+--- src/main.c.orig    Thu Apr 16 22:21:03 2020
++++ src/main.c Thu Apr 16 22:30:27 2020
+@@ -186,11 +186,6 @@
+ **
+ */
+ 
+-
+-static char *sourceRevision = "$Revision: 1.1 $";
+-static char *sourceVersion = "$Id: patch-remove-unused-variables,v 1.1 2020/04/17 11:28:02 tm Exp $";
+-static char *sourceAuthor = "$Author: tm $";
+-
+ #define _REENTRANT
+ 
+ #include <config.h>



Home | Main Index | Thread Index | Old Index