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

Bug#668008: transition/unblock: uw-imap



On Fri, 29 Jun 2012 14:21:19 +0200 Jonas Smedegaard wrote:
> On 12-04-28 at 03:40pm, Adam D. Barratt wrote:
> > On Sun, 2012-04-08 at 09:54 +0200, Jonas Smedegaard wrote:
> > > I have prepared a new upstream release of uw-imap.  It includes
> > > libc-client which is requires recompilation of 5 other packages:
> > > 
> > > libmail-cclient-perl
> > > mailsync
> > > php5
> > > prayer
> > > asterisk
> > > 
> > > First three build-depend on the virtual libc-client-dev so should do
> > > with a simple binNMU.
> > 
> > "Should"?  Are there any API changes in the new libc-client which are
> > likely to affect those packages?
> 
> Actually it turned out there wasn't even a need for a SONAME bump.
> 
> I now released new uw-imap, and this transition is unneeded.

Unfortunately, Jonas's decision to upload without an SONAME bump broke all 
packages that use libc-client (see bug #682256), due to an extra, internal 
(and in this case unnecessarily strict) version check that fails.

The SONAME *shouldn't* have had to be changed as 2007f is merely a bugfix 
release, except for an attempt to also support AIX 5.2, but that's nothing 
that affects us. There are no ABI or API changes. See attached diff. 

At this point we have to either go through with the transition (it's a small 
one), cheat and set the internal version string back to 2007e, or bump the 
epoch and really roll back to 2007e.

Meanwhile, the maintainer of mailsync fixed this problem by rebuilding and 
adding a dependency on libc-client2007e (>= 8:2007f~dfsg-1). It will therefore 
be broken if we roll back to 2007e.

-- 
Magnus Holmgren        holmgren@debian.org
Debian Developer 
From d083ad99d779eb6cf8cff6a9d1b6fca64742c33f Mon Sep 17 00:00:00 2001
From: Jonas Smedegaard <dr@jones.dk>
Date: Sat, 7 Apr 2012 20:05:22 +0200
Subject: [PATCH] Imported Upstream version 2007f~dfsg

---
 Makefile                  |    3 ++-
 docs/RELNOTES             |   11 ++++++++
 src/c-client/mail.h       |    4 +--
 src/imapd/imapd.c         |    4 +--
 src/osdep/unix/Makefile   |    8 ++++++
 src/osdep/unix/env_unix.c |    4 +--
 src/osdep/unix/os_a52.c   |   63 +++++++++++++++++++++++++++++++++++++++++++++
 src/osdep/unix/os_a52.h   |   53 ++++++++++++++++++++++++++++++++++++++
 src/osdep/unix/tcp_unix.c |   12 +++++----
 9 filer ändrade, 150 tillägg(+), 12 borttagningar(-)
 create mode 100644 src/osdep/unix/os_a52.c
 create mode 100644 src/osdep/unix/os_a52.h

diff --git a/Makefile b/Makefile
index e6e4987..5fcf1dd 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,7 @@
 # The following ports are bundled:
 # a32	AIX 3.2 for RS/6000
 # a41	AIX 4.1 for RS/6000
+# a52	Attempt at AIX 5.2
 # aix	AIX/370 (not RS/6000!!)
 # ami	AmigaDOS
 # am2	AmigaDOS with a 68020+
@@ -306,7 +307,7 @@ SPECIALS:
 
 # Note on SCO you may have to set LN to "ln".
 
-a32 a41 aix bs3 bsi d-g d54 do4 drs epx ga4 gas gh9 ghp ghs go5 gsc gsg gso gul h11 hpp hpx lnp lyn mct mnt nec nto nxt nx3 osf os4 ptx qnx sc5 sco sgi sg6 shp sl4 sl5 slx snx soc sol sos uw2: an
+a32 a41 a52 aix bs3 bsi d-g d54 do4 drs epx ga4 gas gh9 ghp ghs go5 gsc gsg gso gul h11 hpp hpx lnp lyn mct mnt nec nto nxt nx3 osf os4 ptx qnx sc5 sco sgi sg6 shp sl4 sl5 slx snx soc sol sos uw2: an
 	$(BUILD) BUILDTYPE=$@
 
 # If you use sv4, you may find that it works to move it to use the an process.
diff --git a/docs/RELNOTES b/docs/RELNOTES
index 5cfd913..db18b67 100644
--- a/docs/RELNOTES
+++ b/docs/RELNOTES
@@ -11,6 +11,17 @@
  * ========================================================================
  */
 
+Updated: 22 July 2011
+
+imap-2007f fixes a couple bugs.
+Fix for RFC 4959 Initial Client Response auth failures noted first by
+  MacOSX Lion Mail users.
+Adjust tcp_open.c:tcp_socket_open to make it a little more useful by adding
+  a write file descriptor test to the select in the case that the open
+  timeout is set.
+In osdep/unix/env_unix.c:create_path there was a printf that should have
+  been an sprintf. Doesn't matter on modern systems.
+
 Updated: 16 December 2008
 
 imap-2007e is a maintenance release, consisting primarily of bugfixes to
diff --git a/src/c-client/mail.h b/src/c-client/mail.h
index 391561f..e90b92e 100644
--- a/src/c-client/mail.h
+++ b/src/c-client/mail.h
@@ -21,12 +21,12 @@
  *		Internet: MRC@Washington.EDU
  *
  * Date:	22 November 1989
- * Last Edited:	16 December 2008
+ * Last Edited:	22 July 2011
  */
 
 /* The Version */
 
-#define CCLIENTVERSION "2007e"
+#define CCLIENTVERSION "2007f"
 
 /* Build parameters */
 
diff --git a/src/imapd/imapd.c b/src/imapd/imapd.c
index d3d1566..4045019 100644
--- a/src/imapd/imapd.c
+++ b/src/imapd/imapd.c
@@ -21,7 +21,7 @@
  *		Internet: MRC@Washington.EDU
  *
  * Date:	5 November 1990
- * Last Edited:	3 March 2008
+ * Last Edited:	22 July 2011
  */
 
 /* Parameter files */
@@ -2141,7 +2141,7 @@ unsigned char *snarf_base64 (unsigned char **arg)
 				/* must be at least one BASE64 char */
   else if (!base64mask[*ret]) return NIL;
   else {			/* quick and dirty */
-    while (base64mask[*s++]);	/* scan until end of BASE64 */
+    while (base64mask[*s]) s++;	/* scan until end of BASE64 */
     if (*s == '=') ++s;		/* allow up to two padding chars */
     if (*s == '=') ++s;
   }
diff --git a/src/osdep/unix/Makefile b/src/osdep/unix/Makefile
index 090c8f2..78913ac 100644
--- a/src/osdep/unix/Makefile
+++ b/src/osdep/unix/Makefile
@@ -199,6 +199,14 @@ a41:	# AIX 4.1 for RS/6000
 	 BASECFLAGS="-g -Dunix=1 -D_BSD -qro -qroconst" \
 	 BASELDFLAGS="-ls"
 
+a52:	# Attempt at AIX 5.2
+	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
+	 SIGTYPE=psx CHECKPW=a41 CRXTYPE=nfs \
+	 SPOOLDIR=/var/spool \
+	 RSHPATH=/usr/bin/rsh \
+	 BASECFLAGS="-g -Dunix=1 -D_BSD -qro -qroconst" \
+	 BASELDFLAGS="-ls"
+
 aix:	# AIX/370
 	@echo You are building for AIX on an S/370 class machine
 	@echo If you want AIX on an RS/6000 you need to use a32 or a41 instead!
diff --git a/src/osdep/unix/env_unix.c b/src/osdep/unix/env_unix.c
index 5ddade1..6b2c447 100644
--- a/src/osdep/unix/env_unix.c
+++ b/src/osdep/unix/env_unix.c
@@ -21,7 +21,7 @@
  *		Internet: MRC@Washington.EDU
  *
  * Date:	1 August 1988
- * Last Edited:	15 May 2008
+ * Last Edited:	23 February 2009
  */
 
 #include <grp.h>
@@ -1813,7 +1813,7 @@ long path_create (MAILSTREAM *stream,char *path)
   restrictBox = NIL;		/* can't restrict */
   if (blackBox) {		/* if black box */
 				/* toss out driver dependent names */
-    printf (path,"%s/INBOX",mymailboxdir ());
+    sprintf (path,"%s/INBOX",mymailboxdir ());
     blackBox = NIL;		/* well that's evil - evil is going on */
     ret = mail_create (stream,path);
     blackBox = T;		/* restore the box */
diff --git a/src/osdep/unix/os_a52.c b/src/osdep/unix/os_a52.c
new file mode 100644
index 0000000..fed6af7
--- /dev/null
+++ b/src/osdep/unix/os_a52.c
@@ -0,0 +1,63 @@
+/* ========================================================================
+ * Copyright 1988-2006 University of Washington
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 
+ * ========================================================================
+ */
+
+/*
+ * Program:	Operating-system dependent routines -- AIX 4.1 on RS 6000
+ *
+ * Author:	Mark Crispin
+ *		Networks and Distributed Computing
+ *		Computing & Communications
+ *		University of Washington
+ *		Administration Building, AG-44
+ *		Seattle, WA  98195
+ *		Internet: MRC@CAC.Washington.EDU
+ *
+ * Date:	1 August 1988
+ * Last Edited:	30 August 2006
+ */
+ 
+#include "tcp_unix.h"		/* must be before osdep includes tcp.h */
+#include "mail.h"
+#include "osdep.h"
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <ctype.h>
+#include <errno.h>
+extern int errno;		/* just in case */
+#include <pwd.h>
+#include "misc.h"
+#include <sys/select.h>
+#include <stddef.h>		/* needed for authenticate() */
+
+int authenticate (char *UserName,char *Response,int *Reenter,char **Message);
+
+extern int sys_nerr;
+extern char *sys_errlist[];
+
+
+#include "fs_unix.c"
+#include "ftl_unix.c"
+#include "nl_unix.c"
+#include "env_unix.c"
+#include "tcp_unix.c"
+#include "gr_waitp.c"
+#include "tz_sv4.c"
+#include "flocksim.c"
+#undef setpgrp
+#include "setpgrp.c"
+#include "utime.c"
diff --git a/src/osdep/unix/os_a52.h b/src/osdep/unix/os_a52.h
new file mode 100644
index 0000000..a826174
--- /dev/null
+++ b/src/osdep/unix/os_a52.h
@@ -0,0 +1,53 @@
+/* ========================================================================
+ * Copyright 1988-2006 University of Washington
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 
+ * ========================================================================
+ */
+
+/*
+ * Program:	Operating-system dependent routines -- AIX on RS6000
+ *
+ * Author:	Mark Crispin
+ *		Networks and Distributed Computing
+ *		Computing & Communications
+ *		University of Washington
+ *		Administration Building, AG-44
+ *		Seattle, WA  98195
+ *		Internet: MRC@CAC.Washington.EDU
+ *
+ * Date:	1 August 1988
+ * Last Edited:	30 August 2006
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <time.h>		/* for struct tm */
+#include <dirent.h>
+#include <fcntl.h>
+#include <utime.h>
+#include <syslog.h>
+#include <sys/file.h>
+#include <ustat.h>
+
+
+#define setpgrp(a,b) Setpgrp(a,b)
+int Setpgrp (int pid,int gid);
+
+#define utime portable_utime
+int portable_utime (char *file,time_t timep[2]);
+
+#include "env_unix.h"
+#include "fs.h"
+#include "ftl.h"
+#include "nl.h"
+#include "tcp.h"
+#include "flocksim.h"
diff --git a/src/osdep/unix/tcp_unix.c b/src/osdep/unix/tcp_unix.c
index 818eb9a..2d834c2 100644
--- a/src/osdep/unix/tcp_unix.c
+++ b/src/osdep/unix/tcp_unix.c
@@ -239,7 +239,7 @@ int tcp_socket_open (int family,void *adr,size_t adrlen,unsigned short port,
   size_t len;
   time_t now;
   struct protoent *pt = getprotobyname ("tcp");
-  fd_set fds,efds;
+  fd_set rfds,wfds,efds;
   struct timeval tmo;
   struct sockaddr *sadr = ip_sockaddr (family,adr,adrlen,port,&len);
   blocknotify_t bn = (blocknotify_t) mail_parameters (NIL,GET_BLOCKNOTIFY,NIL);
@@ -285,13 +285,15 @@ int tcp_socket_open (int family,void *adr,size_t adrlen,unsigned short port,
       now = time (0);		/* open timeout */
       ti = ttmo_open ? now + ttmo_open : 0;
       tmo.tv_usec = 0;
-      FD_ZERO (&fds);		/* initialize selection vector */
+      FD_ZERO (&rfds);		/* initialize selection vector */
+      FD_ZERO (&wfds);		/* initialize selection vector */
       FD_ZERO (&efds);		/* handle errors too */
-      FD_SET (sock,&fds);	/* block for error or readable */
+      FD_SET (sock,&rfds);	/* block for error or readable or writable */
+      FD_SET (sock,&wfds);
       FD_SET (sock,&efds);
       do {			/* block under timeout */
 	tmo.tv_sec = ti ? ti - now : 0;
-	i = select (sock+1,&fds,NIL,&efds,ti ? &tmo : NIL);
+	i = select (sock+1,&rfds,&wfds,&efds,ti ? &tmo : NIL);
 	now = time (0);		/* fake timeout if interrupt & time expired */
 	if ((i < 0) && (errno == EINTR) && ti && (ti <= now)) i = 0;
       } while ((i < 0) && (errno == EINTR));
@@ -300,7 +302,7 @@ int tcp_socket_open (int family,void *adr,size_t adrlen,unsigned short port,
 	fcntl (sock,F_SETFL,flgs);
 	/* This used to be a zero-byte read(), but that crashes Solaris */
 				/* get socket status */
-	while (((i = *ctr = read (sock,tmp,1)) < 0) && (errno == EINTR));
+	if(FD_ISSET(sock, &rfds)) while (((i = *ctr = read (sock,tmp,1)) < 0) && (errno == EINTR));
       }	
       if (i <= 0) {		/* timeout or error? */
 	i = i ? errno : ETIMEDOUT;/* determine error code */
-- 
1.7.10.4

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: