On Thu, Jul 30, 2020 at 11:21:41PM +0200, Klemens Nanni wrote:
> On Fri, Jul 24, 2020 at 02:55:50PM +0200, Klemens Nanni wrote:
> > Tests on amd64 still pass:

> >       31 passed
> >       9 skipped

> > Feedback? OK?
> Any OKs for this diff which updates and brings in all the support?

It compiles fine on sparc64. Tests are the same (31 passed, 9 skipped).

ok kmos

--Kurt

> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/rsync/Makefile,v
> retrieving revision 1.85
> diff -u -p -r1.85 Makefile
> --- Makefile  27 Jan 2020 20:27:10 -0000      1.85
> +++ Makefile  24 Jul 2020 12:52:39 -0000
> @@ -2,7 +2,7 @@
>  
>  COMMENT =    mirroring/synchronization over low bandwidth links
>  
> -DISTNAME =   rsync-3.1.3
> +DISTNAME =   rsync-3.2.2
>  CATEGORIES = net
>  HOMEPAGE =   https://rsync.samba.org/
>  
> @@ -10,32 +10,36 @@ MAINTAINER =      Marc Espie <espie@openbsd.o
>  
>  FLAVORS =    iconv
>  FLAVOR ?=
> -REVISION =   0
>  
>  # GPLv3
>  PERMIT_PACKAGE =     Yes
>  
> -WANTLIB =    c
> +WANTLIB =    c crypto lz4 xxhash zstd
>  
>  MASTER_SITES =       https://rsync.samba.org/ftp/rsync/src/ \
>               http://ftp.funet.fi/pub/mirrors/samba.org/pub/rsync/src/
>  
> +SEPARATE_BUILD =Yes
>  CONFIGURE_STYLE =gnu
>  CONFIGURE_ARGS =--with-included-popt \
>               --with-included-zlib \
>               --with-rsyncd-conf="${SYSCONFDIR}/rsyncd.conf" \
>               --with-rsh=/usr/bin/ssh \
>               --with-nobody-group=_rsync
> +CONFIGURE_ENV =      CPPFLAGS='-I${LOCALBASE}/include' \
> +             LDFLAGS='-L${LOCALBASE}/lib'
>  
>  .if ${FLAVOR:Miconv}
> -CONFIGURE_ENV += CPPFLAGS='-I${LOCALBASE}/include' \
> -             LDFLAGS='-L${LOCALBASE}/lib'
>  LIB_DEPENDS +=       converters/libiconv
>  WANTLIB +=   iconv
>  .endif
>  
>  DOCDIR =     ${PREFIX}/share/doc/rsync
>  DEBUG_PACKAGES =     ${BUILD_PACKAGES}
> +
> +LIB_DEPENDS =        archivers/lz4 \
> +             archivers/zstd \
> +             sysutils/xxhash
>  
>  pre-configure:
>       ${SUBST_CMD} ${WRKSRC}/rsyncd.conf.5 \
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/net/rsync/distinfo,v
> retrieving revision 1.29
> diff -u -p -r1.29 distinfo
> --- distinfo  13 Feb 2018 19:20:06 -0000      1.29
> +++ distinfo  23 Jul 2020 14:20:14 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (rsync-3.1.3.tar.gz) = VcxVTv7F/arXDekhzVpe62wpqVUkxxXzu/hJI1sIAMA=
> -SIZE (rsync-3.1.3.tar.gz) = 905908
> +SHA256 (rsync-3.2.2.tar.gz) = ZEvThBd5UHZlIR/X24NZyKEGcMV+MFtKq2G05AA3r6g=
> +SIZE (rsync-3.2.2.tar.gz) = 1057001
> Index: patches/patch-authenticate_c
> ===================================================================
> RCS file: /cvs/ports/net/rsync/patches/patch-authenticate_c,v
> retrieving revision 1.6
> diff -u -p -r1.6 patch-authenticate_c
> --- patches/patch-authenticate_c      10 Jan 2016 21:36:22 -0000      1.6
> +++ patches/patch-authenticate_c      23 Jul 2020 14:20:26 -0000
> @@ -1,7 +1,8 @@
>  $OpenBSD: patch-authenticate_c,v 1.6 2016/01/10 21:36:22 naddy Exp $
> ---- authenticate.c.orig      Mon Aug 24 20:54:00 2015
> -+++ authenticate.c   Tue Dec 22 21:23:23 2015
> -@@ -350,7 +350,7 @@ void auth_client(int fd, const char *user, const char 
> +Index: authenticate.c
> +--- authenticate.c.orig
> ++++ authenticate.c
> +@@ -349,7 +349,7 @@ void auth_client(int fd, const char *user, const char 
>       char pass2[MAX_DIGEST_LEN*2];
>   
>       if (!user || !*user)
> Index: patches/patch-configure_sh
> ===================================================================
> RCS file: /cvs/ports/net/rsync/patches/patch-configure_sh,v
> retrieving revision 1.4
> diff -u -p -r1.4 patch-configure_sh
> --- patches/patch-configure_sh        10 Jan 2016 21:36:22 -0000      1.4
> +++ patches/patch-configure_sh        23 Jul 2020 14:20:26 -0000
> @@ -1,7 +1,8 @@
>  $OpenBSD: patch-configure_sh,v 1.4 2016/01/10 21:36:22 naddy Exp $
> ---- configure.sh.orig        Mon Dec 21 21:20:53 2015
> -+++ configure.sh     Tue Dec 22 21:23:23 2015
> -@@ -4453,7 +4453,7 @@ fi
> +Index: configure.sh
> +--- configure.sh.orig
> ++++ configure.sh
> +@@ -4901,7 +4901,7 @@ fi
>   
>   
>   cat >>confdefs.h <<_ACEOF
> Index: patches/patch-rsync_1
> ===================================================================
> RCS file: /cvs/ports/net/rsync/patches/patch-rsync_1,v
> retrieving revision 1.6
> diff -u -p -r1.6 patch-rsync_1
> --- patches/patch-rsync_1     13 Feb 2018 19:20:06 -0000      1.6
> +++ patches/patch-rsync_1     23 Jul 2020 14:20:26 -0000
> @@ -2,12 +2,12 @@ $OpenBSD: patch-rsync_1,v 1.6 2018/02/13
>  Index: rsync.1
>  --- rsync.1.orig
>  +++ rsync.1
> -@@ -3990,7 +3990,7 @@ consult the remote shell\(cq\&s documentation.
> +@@ -4109,7 +4109,7 @@ documentation.
>   .IP "\fBUSER\fP or \fBLOGNAME\fP"
> - The USER or LOGNAME environment variables
> - are used to determine the default username sent to an rsync daemon.
> --If neither is set, the username defaults to \(dq\&nobody\(dq\&.
> -+If neither is set, the username defaults to \(dq\&_rsync\(dq\&.
> + The USER or LOGNAME environment variables are used to determine the default
> + username sent to an rsync daemon.  If neither is set, the username defaults
> +-to "nobody".
> ++to "_rsync".
>   .IP "\fBHOME\fP"
> - The HOME environment variable is used to find the user\(cq\&s
> - default .cvsignore file.
> + The HOME environment variable is used to find the user's default .cvsignore
> + file.
> Index: patches/patch-rsyncd_conf_5
> ===================================================================
> RCS file: /cvs/ports/net/rsync/patches/patch-rsyncd_conf_5,v
> retrieving revision 1.7
> diff -u -p -r1.7 patch-rsyncd_conf_5
> --- patches/patch-rsyncd_conf_5       13 Feb 2018 19:20:06 -0000      1.7
> +++ patches/patch-rsyncd_conf_5       23 Jul 2020 14:20:26 -0000
> @@ -2,52 +2,52 @@ $OpenBSD: patch-rsyncd_conf_5,v 1.7 2018
>  Index: rsyncd.conf.5
>  --- rsyncd.conf.5.orig
>  +++ rsyncd.conf.5
> -@@ -68,12 +68,11 @@ When run via inetd you should add a line like this to 
> - and a single line something like this to /etc/inetd.conf:
> - .PP 
> - .nf 
> --  rsync   stream  tcp     nowait  root   /usr/bin/rsync rsyncd \-\-daemon
> -+  rsync   stream  tcp     nowait  root   ${PREFIX}/bin/rsync rsyncd 
> \-\-daemon
> - .fi 
> - 
> - .PP 
> --Replace \(dq\&/usr/bin/rsync\(dq\& with the path to where you have rsync 
> installed on
> +@@ -68,12 +68,11 @@ and a single line something like this to /etc/inetd.co
> + .RS 4
> + .P
> + .nf
> +-rsync   stream  tcp     nowait  root   /usr/bin/rsync rsyncd --daemon
> ++rsync   stream  tcp     nowait  root   ${PREFIX}/rsync rsyncd --daemon
> + .fi
> + .RE
> + .P
> +-Replace "/usr/bin/rsync" with the path to where you have rsync installed on
>  -your system.  You will then need to send inetd a HUP signal to tell it to
>  +You will then need to send inetd a HUP signal to tell it to
>   reread its config file.
> - .PP 
> - Note that you should \fBnot\fP send the rsync daemon a HUP signal to force
> -@@ -433,7 +432,7 @@ This parameter specifies the user name or user ID that
> - file transfers to and from that module should take place as when the daemon
> - was run as root. In combination with the \(dq\&gid\(dq\& parameter this 
> determines what
> - file permissions are available. The default when run by a super\-user is to
> --switch to the system\(cq\&s \(dq\&nobody\(dq\& user.  The default for a 
> non\-super\-user is to
> -+switch to the system\(cq\&s \(dq\&_rsync\(dq\& user.  The default for a 
> non\-super\-user is to
> - not try to change the user.  See also the \(dq\&gid\(dq\& parameter.
> - .IP 
> - The RSYNC_USER_NAME environment variable may be used to request that rsync 
> run
> -@@ -452,7 +451,7 @@ used when accessing the module.  The first one will be
> - any extra ones be set as supplemental groups.  You may also specify a 
> \(dq\&*\(dq\& as
> - the first gid in the list, which will be replaced by all the normal groups 
> for
> - the transfer\(cq\&s user (see \(dq\&uid\(dq\&).  The default when run by a 
> super\-user is to
> --switch to your OS\(cq\&s \(dq\&nobody\(dq\& (or perhaps 
> \(dq\&nogroup\(dq\&) group with no other
> -+switch to the \(dq\&_rsync\(dq\& group with no other
> - supplementary groups.  The default for a non\-super\-user is to not change 
> any
> - group attributes (and indeed, your OS may not allow a non\-super\-user to 
> try to
> - change their group settings).
> -@@ -632,7 +631,7 @@ require that you specify a group password if you do no
> + .P
> + Note that you should \fBnot\fP send the rsync daemon a HUP signal to force 
> it to
> +@@ -425,7 +424,7 @@ This parameter specifies the user name or user ID that
> + and from that module should take place as when the daemon was run as root.
> + In combination with the "gid" parameter this determines what file
> + permissions are available. The default when run by a super-user is to
> +-switch to the system's "nobody" user.  The default for a non-super-user is
> ++switch to the system's "_rsync" user.  The default for a non-super-user is
> + to not try to change the user.  See also the "gid" parameter.
> + .IP
> + The RSYNC_USER_NAME environment variable may be used to request that rsync
> +@@ -445,7 +444,7 @@ accessing the module.  The first one will be the defau
> + extra ones be set as supplemental groups.  You may also specify a "\fB*\fP" 
> as
> + the first gid in the list, which will be replaced by all the normal groups
> + for the transfer's user (see "uid").  The default when run by a super-user
> +-is to switch to your OS's "nobody" (or perhaps "nogroup") group with no
> ++is to switch to the "_rsync" group with no
> + other supplementary groups.  The default for a non-super-user is to not
> + change any group attributes (and indeed, your OS may not allow a
> + non-super-user to try to change their group settings).
> +@@ -619,7 +618,7 @@ require that you specify a group password if you do no
>   passwords.
> - .IP 
> - There is no default for the \(dq\&secrets file\(dq\& parameter, you must 
> choose a name
> --(such as \f(CW/etc/rsyncd.secrets\fP).  The file must normally not be 
> readable
> -+(such as \f(CW${SYSCONFDIR}/rsyncd.secrets\fP).  The file must normally not 
> be readable
> - by \(dq\&other\(dq\&; see \(dq\&strict modes\(dq\&.  If the file is not 
> found or is rejected, no
> - logins for a \(dq\&user auth\(dq\& module will be possible.
> - .IP 
> -@@ -1033,8 +1032,8 @@ A more sophisticated example would be:
> - .PP 
> - .nf 
> - 
> + .IP
> + There is no default for the "secrets file" parameter, you must choose a
> +-name (such as \fB/etc/rsyncd.secrets\fP).  The file must normally not be
> ++name (such as \fB${SYSCONFDIR}/rsyncd.secrets\fP).  The file must normally 
> not be
> + readable by "other"; see "strict modes".  If the file is not found or is
> + rejected, no logins for a "user auth" module will be possible.
> + .IP "\fBstrict\ modes\fP"
> +@@ -1176,8 +1175,8 @@ A more sophisticated example would be:
> + .RS 4
> + .P
> + .nf
>  -uid = nobody
>  -gid = nobody
>  +uid = _rsync
> @@ -55,27 +55,21 @@ Index: rsyncd.conf.5
>   use chroot = yes
>   max connections = 4
>   syslog facility = local5
> -@@ -1060,12 +1059,12 @@ pid file = /var/run/rsyncd.pid
> +@@ -1203,7 +1202,7 @@ pid file = /var/run/rsyncd.pid
>           path = /data/cvs
>           comment = CVS repository (requires authentication)
>           auth users = tridge, susan
>  -        secrets file = /etc/rsyncd.secrets
>  +        secrets file = ${SYSCONFDIR}/rsyncd.secrets
> - 
> - .fi 
> - 
> - .PP 
> --The /etc/rsyncd.secrets file would look something like this:
> -+The ${SYSCONFDIR}/rsyncd.secrets file would look something like this:
> - .PP 
> - .RS 
> - \f(CWtridge:mypass\fP
> -@@ -1078,7 +1077,7 @@ The /etc/rsyncd.secrets file would look something like
> + .fi
> + .RE
> + .P
> +@@ -1218,7 +1217,7 @@ susan:herpass
> + .P
>   .SH "FILES"
> - 
> - .PP 
> + .P
>  -/etc/rsyncd.conf or rsyncd.conf
>  +${SYSCONFDIR}/rsyncd.conf or rsyncd.conf
> - .PP 
> + .P
>   .SH "SEE ALSO"
> - 
> + .P
> Index: patches/patch-zlib_crc32_c
> ===================================================================
> RCS file: patches/patch-zlib_crc32_c
> diff -N patches/patch-zlib_crc32_c
> --- patches/patch-zlib_crc32_c        27 Jan 2020 20:27:10 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,27 +0,0 @@
> ---- zlib/crc32.c.orig
> -+++ zlib/crc32.c
> -@@ -278,7 +278,7 @@ local unsigned long crc32_little(crc, buf, len)
> - }
> - 
> - /* 
> ========================================================================= */
> --#define DOBIG4 c ^= *++buf4; \
> -+#define DOBIG4 c ^= *buf4++; \
> -         c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
> -             crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
> - #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; 
> DOBIG4
> -@@ -300,7 +300,6 @@ local unsigned long crc32_big(crc, buf, len)
> -     }
> - 
> -     buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
> --    buf4--;
> -     while (len >= 32) {
> -         DOBIG32;
> -         len -= 32;
> -@@ -309,7 +308,6 @@ local unsigned long crc32_big(crc, buf, len)
> -         DOBIG4;
> -         len -= 4;
> -     }
> --    buf4++;
> -     buf = (const unsigned char FAR *)buf4;
> - 
> -     if (len) do {
> Index: patches/patch-zlib_inffast_c
> ===================================================================
> RCS file: patches/patch-zlib_inffast_c
> diff -N patches/patch-zlib_inffast_c
> --- patches/patch-zlib_inffast_c      27 Jan 2020 20:27:10 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,206 +0,0 @@
> ---- zlib/inffast.c.orig
> -+++ zlib/inffast.c
> -@@ -10,25 +10,6 @@
> - 
> - #ifndef ASMINF
> - 
> --/* Allow machine dependent optimization for post-increment or pre-increment.
> --   Based on testing to date,
> --   Pre-increment preferred for:
> --   - PowerPC G3 (Adler)
> --   - MIPS R5000 (Randers-Pehrson)
> --   Post-increment preferred for:
> --   - none
> --   No measurable difference:
> --   - Pentium III (Anderson)
> --   - M68060 (Nikl)
> -- */
> --#ifdef POSTINC
> --#  define OFF 0
> --#  define PUP(a) *(a)++
> --#else
> --#  define OFF 1
> --#  define PUP(a) *++(a)
> --#endif
> --
> - /*
> -    Decode literal, length, and distance codes and write out the resulting
> -    literal and match bytes until either not enough input or output is
> -@@ -96,9 +77,9 @@ unsigned start;         /* inflate()'s starting value for 
> strm->avail_out */
> - 
> -     /* copy state to local variables */
> -     state = (struct inflate_state FAR *)strm->state;
> --    in = strm->next_in - OFF;
> -+    in = strm->next_in;
> -     last = in + (strm->avail_in - 5);
> --    out = strm->next_out - OFF;
> -+    out = strm->next_out;
> -     beg = out - (start - strm->avail_out);
> -     end = out + (strm->avail_out - 257);
> - #ifdef INFLATE_STRICT
> -@@ -119,9 +100,9 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -        input data or output space */
> -     do {
> -         if (bits < 15) {
> --            hold += (unsigned long)(PUP(in)) << bits;
> -+            hold += (unsigned long)(*in++) << bits;
> -             bits += 8;
> --            hold += (unsigned long)(PUP(in)) << bits;
> -+            hold += (unsigned long)(*in++) << bits;
> -             bits += 8;
> -         }
> -         here = lcode[hold & lmask];
> -@@ -134,14 +115,14 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -             Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
> -                     "inflate:         literal '%c'\n" :
> -                     "inflate:         literal 0x%02x\n", here.val));
> --            PUP(out) = (unsigned char)(here.val);
> -+            *out++ = (unsigned char)(here.val);
> -         }
> -         else if (op & 16) {                     /* length base */
> -             len = (unsigned)(here.val);
> -             op &= 15;                           /* number of extra bits */
> -             if (op) {
> -                 if (bits < op) {
> --                    hold += (unsigned long)(PUP(in)) << bits;
> -+                    hold += (unsigned long)(*in++) << bits;
> -                     bits += 8;
> -                 }
> -                 len += (unsigned)hold & ((1U << op) - 1);
> -@@ -150,9 +131,9 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -             }
> -             Tracevv((stderr, "inflate:         length %u\n", len));
> -             if (bits < 15) {
> --                hold += (unsigned long)(PUP(in)) << bits;
> -+                hold += (unsigned long)(*in++) << bits;
> -                 bits += 8;
> --                hold += (unsigned long)(PUP(in)) << bits;
> -+                hold += (unsigned long)(*in++) << bits;
> -                 bits += 8;
> -             }
> -             here = dcode[hold & dmask];
> -@@ -165,10 +146,10 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -                 dist = (unsigned)(here.val);
> -                 op &= 15;                       /* number of extra bits */
> -                 if (bits < op) {
> --                    hold += (unsigned long)(PUP(in)) << bits;
> -+                    hold += (unsigned long)(*in++) << bits;
> -                     bits += 8;
> -                     if (bits < op) {
> --                        hold += (unsigned long)(PUP(in)) << bits;
> -+                        hold += (unsigned long)(*in++) << bits;
> -                         bits += 8;
> -                     }
> -                 }
> -@@ -196,30 +177,30 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> - #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
> -                         if (len <= op - whave) {
> -                             do {
> --                                PUP(out) = 0;
> -+                                *out++ = 0;
> -                             } while (--len);
> -                             continue;
> -                         }
> -                         len -= op - whave;
> -                         do {
> --                            PUP(out) = 0;
> -+                            *out++ = 0;
> -                         } while (--op > whave);
> -                         if (op == 0) {
> -                             from = out - dist;
> -                             do {
> --                                PUP(out) = PUP(from);
> -+                                *out++ = *from++;
> -                             } while (--len);
> -                             continue;
> -                         }
> - #endif
> -                     }
> --                    from = window - OFF;
> -+                    from = window;
> -                     if (wnext == 0) {           /* very common case */
> -                         from += wsize - op;
> -                         if (op < len) {         /* some from window */
> -                             len -= op;
> -                             do {
> --                                PUP(out) = PUP(from);
> -+                                *out++ = *from++;
> -                             } while (--op);
> -                             from = out - dist;  /* rest from output */
> -                         }
> -@@ -230,14 +211,14 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -                         if (op < len) {         /* some from end of window 
> */
> -                             len -= op;
> -                             do {
> --                                PUP(out) = PUP(from);
> -+                                *out++ = *from++;
> -                             } while (--op);
> --                            from = window - OFF;
> -+                            from = window;
> -                             if (wnext < len) {  /* some from start of 
> window */
> -                                 op = wnext;
> -                                 len -= op;
> -                                 do {
> --                                    PUP(out) = PUP(from);
> -+                                    *out++ = *from++;
> -                                 } while (--op);
> -                                 from = out - dist;      /* rest from output 
> */
> -                             }
> -@@ -248,35 +229,35 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -                         if (op < len) {         /* some from window */
> -                             len -= op;
> -                             do {
> --                                PUP(out) = PUP(from);
> -+                                *out++ = *from++;
> -                             } while (--op);
> -                             from = out - dist;  /* rest from output */
> -                         }
> -                     }
> -                     while (len > 2) {
> --                        PUP(out) = PUP(from);
> --                        PUP(out) = PUP(from);
> --                        PUP(out) = PUP(from);
> -+                        *out++ = *from++;
> -+                        *out++ = *from++;
> -+                        *out++ = *from++;
> -                         len -= 3;
> -                     }
> -                     if (len) {
> --                        PUP(out) = PUP(from);
> -+                        *out++ = *from++;
> -                         if (len > 1)
> --                            PUP(out) = PUP(from);
> -+                            *out++ = *from++;
> -                     }
> -                 }
> -                 else {
> -                     from = out - dist;          /* copy direct from output 
> */
> -                     do {                        /* minimum length is three 
> */
> --                        PUP(out) = PUP(from);
> --                        PUP(out) = PUP(from);
> --                        PUP(out) = PUP(from);
> -+                        *out++ = *from++;
> -+                        *out++ = *from++;
> -+                        *out++ = *from++;
> -                         len -= 3;
> -                     } while (len > 2);
> -                     if (len) {
> --                        PUP(out) = PUP(from);
> -+                        *out++ = *from++;
> -                         if (len > 1)
> --                            PUP(out) = PUP(from);
> -+                            *out++ = *from++;
> -                     }
> -                 }
> -             }
> -@@ -313,8 +294,8 @@ unsigned start;         /* inflate()'s starting value 
> for strm->avail_out */
> -     hold &= (1U << bits) - 1;
> - 
> -     /* update state and return */
> --    strm->next_in = in + OFF;
> --    strm->next_out = out + OFF;
> -+    strm->next_in = in;
> -+    strm->next_out = out;
> -     strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - 
> last));
> -     strm->avail_out = (unsigned)(out < end ?
> -                                  257 + (end - out) : 257 - (out - end));
> Index: patches/patch-zlib_inflate_c
> ===================================================================
> RCS file: patches/patch-zlib_inflate_c
> diff -N patches/patch-zlib_inflate_c
> --- patches/patch-zlib_inflate_c      27 Jan 2020 20:27:10 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,15 +0,0 @@
> ---- zlib/inflate.c.orig
> -+++ zlib/inflate.c
> -@@ -1526,9 +1526,10 @@ z_streamp strm;
> - {
> -     struct inflate_state FAR *state;
> - 
> --    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
> -+    if (strm == Z_NULL || strm->state == Z_NULL)
> -+        return (long)(((unsigned long)0 - 1) << 16);
> -     state = (struct inflate_state FAR *)strm->state;
> --    return ((long)(state->back) << 16) +
> -+    return (long)(((unsigned long)((long)state->back)) << 16) +
> -         (state->mode == COPY ? state->length :
> -             (state->mode == MATCH ? state->was - state->length : 0));
> - }
> Index: patches/patch-zlib_inftrees_c
> ===================================================================
> RCS file: patches/patch-zlib_inftrees_c
> diff -N patches/patch-zlib_inftrees_c
> --- patches/patch-zlib_inftrees_c     27 Jan 2020 20:27:10 -0000      1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,52 +0,0 @@
> ---- zlib/inftrees.c.orig
> -+++ zlib/inftrees.c
> -@@ -54,7 +54,7 @@ unsigned short FAR *work;
> -     code FAR *next;             /* next available space in table */
> -     const unsigned short FAR *base;     /* base value table to use */
> -     const unsigned short FAR *extra;    /* extra bits table to use */
> --    int end;                    /* use base and extra for symbol > end */
> -+    unsigned match;             /* use base and extra for symbol >= match */
> -     unsigned short count[MAXBITS+1];    /* number of codes of each length */
> -     unsigned short offs[MAXBITS+1];     /* offsets in table for each length 
> */
> -     static const unsigned short lbase[31] = { /* Length codes 257..285 base 
> */
> -@@ -181,19 +181,17 @@ unsigned short FAR *work;
> -     switch (type) {
> -     case CODES:
> -         base = extra = work;    /* dummy value--not used */
> --        end = 19;
> -+        match = 20;
> -         break;
> -     case LENS:
> -         base = lbase;
> --        base -= 257;
> -         extra = lext;
> --        extra -= 257;
> --        end = 256;
> -+        match = 257;
> -         break;
> -     default:            /* DISTS */
> -         base = dbase;
> -         extra = dext;
> --        end = -1;
> -+        match = 0;
> -     }
> - 
> -     /* initialize state for loop */
> -@@ -216,13 +214,13 @@ unsigned short FAR *work;
> -     for (;;) {
> -         /* create table entry */
> -         here.bits = (unsigned char)(len - drop);
> --        if ((int)(work[sym]) < end) {
> -+        if (work[sym] + 1u < match) {
> -             here.op = (unsigned char)0;
> -             here.val = work[sym];
> -         }
> --        else if ((int)(work[sym]) > end) {
> --            here.op = (unsigned char)(extra[work[sym]]);
> --            here.val = base[work[sym]];
> -+        else if (work[sym] >= match) {
> -+            here.op = (unsigned char)(extra[work[sym] - match]);
> -+            here.val = base[work[sym] - match];
> -         }
> -         else {
> -             here.op = (unsigned char)(32 + 64);         /* end of block */
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/net/rsync/pkg/PLIST,v
> retrieving revision 1.14
> diff -u -p -r1.14 PLIST
> --- pkg/PLIST 22 Apr 2013 16:00:11 -0000      1.14
> +++ pkg/PLIST 23 Jul 2020 14:26:10 -0000
> @@ -1,11 +1,13 @@
>  @comment $OpenBSD: PLIST,v 1.14 2013/04/22 16:00:11 krw Exp $
>  @newgroup _rsync:669
>  @newuser _rsync:669:_rsync:daemon:rsync Daemon:/var/empty:/sbin/nologin
> +@rcscript ${RCDIR}/rsyncd
>  bin/rrsync
>  @bin bin/rsync
> +bin/rsync-ssl
> +@man man/man1/rsync-ssl.1
>  @man man/man1/rsync.1
>  @man man/man5/rsyncd.conf.5
>  share/doc/rsync/
>  share/doc/rsync/tech_report.tex
>  @extra ${SYSCONFDIR}/rsyncd.conf
> -@rcscript ${RCDIR}/rsyncd
> 

Reply via email to