pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/imap-uw/patches These patches fix a very long sta...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7d77c2ce957f
branches:  trunk
changeset: 372434:7d77c2ce957f
user:      buhrow <buhrow%pkgsrc.org@localhost>
date:      Mon Jan 24 22:21:58 2022 +0000

description:
These patches fix a very long standing bug where aguments passed to utime(3) by IMAP-UW and the
c-client library were incorrect.  Unfortunately, on 32-bit systems, the the bug went unnoticed
because all the bits lined up correctly.  On 64-bit systems, this happenstance doesn't work,
meaning the mtime and atime time stamps this software modifies are completely wrong, usually
defaulting to the beginning of the epoch, but only because the random memory locations pointed
to by the incorrect pointers are  0.
Fortunately, the software package includes a portable version of the utime library call that
converts the internal usage of this function to one that's compatible with the one resident in
libc on NetBSD, FreeBSD and other BSD systems.  This patch simply enables that portable code
when compiling this package  on BSD systems while using the pkgsrc system.

These patches have been compiled and are running in production on a 64-bit NetBSD/amd64
system running NetBSD-9.2.

Fixes pkg/pr-56645

diffstat:

 mail/imap-uw/patches/patch-ab |  23 ++++++++++++++---------
 mail/imap-uw/patches/patch-ap |  10 ++++------
 mail/imap-uw/patches/patch-bi |  11 +++++++++++
 mail/imap-uw/patches/patch-bj |  13 +++++++++++++
 4 files changed, 42 insertions(+), 15 deletions(-)

diffs (127 lines):

diff -r 394d728ba74a -r 7d77c2ce957f mail/imap-uw/patches/patch-ab
--- a/mail/imap-uw/patches/patch-ab     Mon Jan 24 21:05:57 2022 +0000
+++ b/mail/imap-uw/patches/patch-ab     Mon Jan 24 22:21:58 2022 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.25 2010/01/25 23:04:49 tron Exp $
+$NetBSD: patch-ab,v 1.26 2022/01/24 22:21:58 buhrow Exp $
 
---- src/osdep/unix/Makefile.orig       2008-06-04 19:18:34.000000000 +0100
-+++ src/osdep/unix/Makefile    2010-01-25 22:56:57.000000000 +0000
+--- src/osdep/unix/Makefile.orig       2011-07-22 17:20:10.000000000 -0700
++++ src/osdep/unix/Makefile    2022-01-15 07:49:18.399845264 -0800
 @@ -48,7 +48,7 @@
  # Try to have some consistency in GCC builds.  We want optimization, but we
  # also want to be able to debug.
@@ -11,7 +11,7 @@
  GCC4CFLAGS= $(GCCCFLAGS) -Wno-pointer-sign
  
  
-@@ -149,7 +149,7 @@
+@@ -149,11 +149,11 @@
  
  # Normally no need to change any of these
  
@@ -20,7 +20,12 @@
  BINARIES=osdep.o mail.o misc.o newsrc.o smanager.o utf8.o utf8aux.o siglocal.o \
   dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
   rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
-@@ -529,7 +529,7 @@
+- unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
++ unix.o utime.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
+ CFLAGS=-g
+ 
+ CAT=cat
+@@ -537,7 +537,7 @@
        $(BUILD) `$(CAT) SPECIALS` OS=bsi \
         CRXTYPE=nfs \
         SPOOLDIR=/var \
@@ -29,7 +34,7 @@
         RSHPATH=/usr/bin/rsh \
         BASECFLAGS="$(GCCCFLAGS)" \
         BASELDFLAGS="-lcrypt"
-@@ -718,7 +718,7 @@
+@@ -726,7 +726,7 @@
         RSHPATH=/usr/bin/rsh \
         BASECFLAGS="-g -O -w" \
         BASELDFLAGS="-lsocket -lnsl -lgen" \
@@ -38,7 +43,7 @@
  
  
  # Note: It is a long and disgusting story about why cc is set to ucbcc.  You
-@@ -855,7 +855,7 @@
+@@ -863,7 +863,7 @@
        @$(SH) ARCHIVE
  
  .c.o:
@@ -47,7 +52,7 @@
  
  
  # Cleanup
-@@ -915,7 +915,7 @@
+@@ -923,7 +923,7 @@
        @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
        @echo is not installed on your system.  Either install OpenSSL first
        @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
@@ -56,7 +61,7 @@
  
  osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
        $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
-@@ -968,7 +968,7 @@
+@@ -976,7 +976,7 @@
         -DLOCKPGM1=\"$(LOCKPGM1)\" -DLOCKPGM2=\"$(LOCKPGM2)\" \
         -DLOCKPGM3=\"$(LOCKPGM3)\" > OSCFLAGS
        echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS
diff -r 394d728ba74a -r 7d77c2ce957f mail/imap-uw/patches/patch-ap
--- a/mail/imap-uw/patches/patch-ap     Mon Jan 24 21:05:57 2022 +0000
+++ b/mail/imap-uw/patches/patch-ap     Mon Jan 24 22:21:58 2022 +0000
@@ -1,14 +1,12 @@
-$NetBSD: patch-ap,v 1.4 2009/06/11 08:13:05 wiz Exp $
+$NetBSD: patch-ap,v 1.5 2022/01/24 22:22:11 buhrow Exp $
 
---- src/osdep/unix/unix.c.orig 2008-06-04 13:39:54.000000000 -0500
-+++ src/osdep/unix/unix.c
-@@ -40,8 +40,8 @@
+--- src/osdep/unix/unix.c.orig 2011-07-22 17:20:10.000000000 -0700
++++ src/osdep/unix/unix.c      2022-01-18 22:13:13.433534293 -0800
+@@ -40,7 +40,6 @@
  #include <stdio.h>
  #include <ctype.h>
  #include <errno.h>
 -extern int errno;             /* just in case */
  #include <signal.h>
-+#include <utime.h>    /* need this to get __utime50() prototype on NetBSD */
  #include "mail.h"
  #include "osdep.h"
- #include <time.h>
diff -r 394d728ba74a -r 7d77c2ce957f mail/imap-uw/patches/patch-bi
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/patches/patch-bi     Mon Jan 24 22:21:58 2022 +0000
@@ -0,0 +1,11 @@
+$NetBSD: patch-bi,v 1.1 2022/01/24 22:25:06 buhrow Exp $
+
+--- src/osdep/unix/os_bsi.h.orig       2011-07-22 17:20:11.000000000 -0700
++++ src/osdep/unix/os_bsi.h    2022-01-15 07:49:59.934504576 -0800
+@@ -41,3 +41,6 @@
+ #include "ftl.h"
+ #include "nl.h"
+ #include "tcp.h"
++
++#undef utime
++#define utime portable_utime
diff -r 394d728ba74a -r 7d77c2ce957f mail/imap-uw/patches/patch-bj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/imap-uw/patches/patch-bj     Mon Jan 24 22:21:58 2022 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-bj,v 1.1 2022/01/24 22:25:13 buhrow Exp $
+
+--- src/osdep/unix/utime.c.orig        2011-07-22 17:20:10.000000000 -0700
++++ src/osdep/unix/utime.c     2022-01-15 08:29:29.662938659 -0800
+@@ -26,6 +26,8 @@
+  * Last Edited:       30 August 2006
+  */
+ 
++#include <utime.h>
++#include <string.h>
+ #undef utime
+ 
+ /* Portable utime() that takes it args like real Unix systems



Home | Main Index | Thread Index | Old Index