rpms/uw-imap/EL-5 imap-2007e-authmd5.patch, NONE, 1.1 imap-2007e-overflow.patch, NONE, 1.1 imap-2007e-shared.patch, NONE, 1.1 uw-imap.spec, 1.29, 1.30 imap-2001a-overflow.patch, 1.1, NONE imap-2002e-authmd5.patch, 1.1, NONE imap-2002e-shared.patch, 1.1, NONE

Rex Dieter rdieter at fedoraproject.org
Mon Aug 31 14:26:44 UTC 2009


Author: rdieter

Update of /cvs/pkgs/rpms/uw-imap/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18730

Modified Files:
	uw-imap.spec 
Added Files:
	imap-2007e-authmd5.patch imap-2007e-overflow.patch 
	imap-2007e-shared.patch 
Removed Files:
	imap-2001a-overflow.patch imap-2002e-authmd5.patch 
	imap-2002e-shared.patch 
Log Message:
* Mon Aug 31 2009 Rex Dieter <rdieter at fedoraproject.org> 
- omit -devel, -static bits in EPEL builds (#518885)


imap-2007e-authmd5.patch:
 auth_md5.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--- NEW FILE imap-2007e-authmd5.patch ---
diff -up imap-2007e/src/c-client/auth_md5.c.authmd5 imap-2007e/src/c-client/auth_md5.c
--- imap-2007e/src/c-client/auth_md5.c.authmd5	2008-06-04 13:18:34.000000000 -0500
+++ imap-2007e/src/c-client/auth_md5.c	2009-07-07 19:24:12.348005485 -0500
@@ -42,17 +42,17 @@ typedef struct {
 
 /* Prototypes */
 
-long auth_md5_valid (void);
-long auth_md5_client (authchallenge_t challenger,authrespond_t responder,
+static long auth_md5_valid (void);
+static long auth_md5_client (authchallenge_t challenger,authrespond_t responder,
 		      char *service,NETMBX *mb,void *stream,
 		      unsigned long *trial,char *user);
-char *auth_md5_server (authresponse_t responder,int argc,char *argv[]);
-char *auth_md5_pwd (char *user);
+static char *auth_md5_server (authresponse_t responder,int argc,char *argv[]);
+static char *auth_md5_pwd (char *user);
 char *apop_login (char *chal,char *user,char *md5,int argc,char *argv[]);
-char *hmac_md5 (char *text,unsigned long tl,char *key,unsigned long kl);
-void md5_init (MD5CONTEXT *ctx);
-void md5_update (MD5CONTEXT *ctx,unsigned char *data,unsigned long len);
-void md5_final (unsigned char *digest,MD5CONTEXT *ctx);
+static char *hmac_md5 (char *text,unsigned long tl,char *key,unsigned long kl);
+static void md5_init (MD5CONTEXT *ctx);
+static void md5_update (MD5CONTEXT *ctx,unsigned char *data,unsigned long len);
+static void md5_final (unsigned char *digest,MD5CONTEXT *ctx);
 static void md5_transform (unsigned long *state,unsigned char *block);
 static void md5_encode (unsigned char *dst,unsigned long *src,int len);
 static void md5_decode (unsigned long *dst,unsigned char *src,int len);

imap-2007e-overflow.patch:
 rfc822.c |    3 +++
 1 file changed, 3 insertions(+)

--- NEW FILE imap-2007e-overflow.patch ---
diff -up imap-2007e/src/c-client/rfc822.c.overflow imap-2007e/src/c-client/rfc822.c
--- imap-2007e/src/c-client/rfc822.c.overflow	2008-12-12 11:08:26.000000000 -0600
+++ imap-2007e/src/c-client/rfc822.c	2009-07-07 19:27:20.057772757 -0500
@@ -384,6 +384,9 @@ void rfc822_parse_content (BODY *body,ST
 	if (CHR (bs) == '\012'){/* following LF? */
 	  c = SNX (bs); i--;	/* yes, slurp it */
 	}
+	if (!i)			/* Make sure we don't get an overflow for */
+	  break;		/* messages ending on \015 (or the following */
+				/* i-- will cause i to be MAXINT. Not good.) */
       case '\012':		/* at start of a line, start with -- ? */
 	if (!(i && i-- && ((c = SNX (bs)) == '-') && i-- &&
 	      ((c = SNX (bs)) == '-'))) break;

imap-2007e-shared.patch:
 Makefile |   30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

--- NEW FILE imap-2007e-shared.patch ---
diff -up imap-2007e/src/osdep/unix/Makefile.shared imap-2007e/src/osdep/unix/Makefile
--- imap-2007e/src/osdep/unix/Makefile.shared	2009-07-07 19:28:02.909755512 -0500
+++ imap-2007e/src/osdep/unix/Makefile	2009-07-07 19:29:35.870006799 -0500
@@ -170,6 +170,10 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
  EXTRADRIVERS='$(EXTRADRIVERS)' EXTRAAUTHENTICATORS='$(EXTRAAUTHENTICATORS)'\
  PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
 
+# Need this for the shared library rule to work correctly
+.SUFFIXES: .o .so
+SOFILES=${BINARIES:.o=.so}
+
 
 # Here if no make argument established
 
@@ -845,18 +849,24 @@ vu2:	# VAX Ultrix 2.3, etc.
 
 # Build it!
 
-build:	clean once $(ARCHIVE)
+build:	clean once $(ARCHIVE) $(SHLIBNAME)
 
-all:	$(ARCHIVE)
+all:	$(ARCHIVE) $(SHLIBNAME)
 
 $(ARCHIVE): $(BINARIES)
 	sh -c '$(RM) $(ARCHIVE) || true'
 	@$(CAT) ARCHIVE
 	@$(SH) ARCHIVE
 
-.c.o:
-	`$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
+$(SHLIBNAME):	$(SOFILES)
+	gcc -shared -Wl,-soname,$(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS`
+	ln -s $(SHLIBNAME) lib$(SHLIBBASE).so
 
+.c.so:	osdep.h
+	$(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` ${@:.so=.c} -o $@
+
+.c.o:
+	$(CC) -fPIC -DPIC -D_REENTRANT -c `$(CAT) CFLAGS` $*.c
 
 # Cleanup
 
@@ -895,8 +905,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
 
 
 # OS-dependent
-
-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
+OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
 	osdep.h env_unix.h tcp_unix.h \
 	osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
 	auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
@@ -910,12 +919,19 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
 	write.c sslstdio.c \
 	strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
 	OSCFLAGS
+
+osdep.o:	$(OSDEPS)
+	$(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
+	@echo ========================================================================
 	@echo Building OS-dependent module
 	@echo If you get No such file error messages for files x509.h, ssl.h,
 	@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
-	`$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
+	@echo ========================================================================
+
+osdep.so:	$(OSDEPS)
+	$(CC) -fPIC -DPIC -D_REENTRANT `$(CAT) CFLAGS` `cat OSCFLAGS` -c osdep.c -o $@
 
 osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
 	$(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c


Index: uw-imap.spec
===================================================================
RCS file: /cvs/pkgs/rpms/uw-imap/EL-5/uw-imap.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- uw-imap.spec	19 Dec 2008 19:27:44 -0000	1.29
+++ uw-imap.spec	31 Aug 2009 14:26:44 -0000	1.30
@@ -1,20 +1,18 @@
-%define _default_patch_fuzz 2
 
 # Fedora review: http://bugzilla.redhat.com/166008
 
-#define beta 1
-#define dev .DEV.SNAP-
-#define snap 0709171900
-
+%if 0%{?fedora}
+%define _with_devel 1
 # ship static lib, matches default upstream config
 # as convenience to users, since our hacked shlib can potentially break 
 # abi semi-often
 %define _with_static 1
+%endif
 
 Summary: UW Server daemons for IMAP and POP network mail protocols
 Name:	 uw-imap 
 Version: 2007e
-Release: 1%{?dist}
+Release: 7%{?dist}
 
 # See LICENSE.txt, http://www.apache.org/licenses/LICENSE-2.0
 License: ASL 2.0 
@@ -56,9 +54,9 @@ Source35: pop3s-xinetd
 Patch1: imap-2007-paths.patch
 # See http://bugzilla.redhat.com/229781 , http://bugzilla.redhat.com/127271
 Patch2: imap-2004a-doc.patch
-Patch5: imap-2001a-overflow.patch
-Patch9: imap-2002e-shared.patch
-Patch10: imap-2002e-authmd5.patch
+Patch5: imap-2007e-overflow.patch
+Patch9: imap-2007e-shared.patch
+Patch10: imap-2007e-authmd5.patch
 
 BuildRequires: krb5-devel
 BuildRequires: openssl-devel
@@ -68,6 +66,8 @@ BuildRequires: pam-devel
 Prereq: xinetd
 Requires(post): openssl
 
+Requires: %{imap_libs} = %{version}-%{release}
+
 %description
 The %{name} package provides UW server daemons for both the IMAP (Internet
 Message Access Protocol) and POP (Post Office Protocol) mail access
@@ -118,6 +118,7 @@ which will use the UW C-client common AP
 %package utils
 Summary: UW IMAP Utilities to make managing your email simpler
 Group: 	 Applications/System 
+Requires: %{imap_libs} = %{version}-%{release}
 # imap -> uw-imap rename
 Obsoletes: imap-utils < 1:%{version}
 %description utils
@@ -158,12 +159,10 @@ GSSDIR=$(krb5-config --prefix)
 # SSL setup, probably legacy-only, but shouldn't hurt -- Rex
 export EXTRACFLAGS="$EXTRACFLAGS $(pkg-config --cflags openssl 2>/dev/null)"
 # $RPM_OPT_FLAGS
-export EXTRACFLAGS="$EXTRACFLAGS $RPM_OPT_FLAGS"
+export EXTRACFLAGS="$EXTRACFLAGS -fPIC $RPM_OPT_FLAGS"
 # jorton added these, I'll assume he knows what he's doing. :) -- Rex
 export EXTRACFLAGS="$EXTRACFLAGS -fno-strict-aliasing"
-%if 0%{?fedora} > 4 || 0%{?rhel} > 4
 export EXTRACFLAGS="$EXTRACFLAGS -Wno-pointer-sign"
-%endif
 
 echo "y" | \
 make %{?_smp_mflags} lnp \
@@ -183,12 +182,14 @@ rm -rf $RPM_BUILD_ROOT
 
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/
 
-%if "%{?_with_static:1}" == "1"
+%if 0%{?_with_static:1}
 install -p -m644 ./c-client/c-client.a $RPM_BUILD_ROOT%{_libdir}/
 ln -s c-client.a $RPM_BUILD_ROOT%{_libdir}/libc-client.a
 %endif
 
 install -p -m755 ./c-client/%{shlibname} $RPM_BUILD_ROOT%{_libdir}/
+
+%if 0%{?_with_devel:1}
 ln -s %{shlibname} $RPM_BUILD_ROOT%{_libdir}/lib%{soname}.so
 
 mkdir -p $RPM_BUILD_ROOT%{_includedir}/imap/
@@ -196,6 +197,7 @@ install -m644 ./c-client/*.h $RPM_BUILD_
 # Added linkage.c to fix (#34658) <mharris>
 install -m644 ./c-client/linkage.c $RPM_BUILD_ROOT%{_includedir}/imap/
 install -m644 ./src/osdep/tops-20/shortsym.h $RPM_BUILD_ROOT%{_includedir}/imap/
+%endif
 
 install -p -D -m644 src/imapd/imapd.8 $RPM_BUILD_ROOT%{_mandir}/man8/imapd.8uw
 install -p -D -m644 src/ipopd/ipopd.8 $RPM_BUILD_ROOT%{_mandir}/man8/ipopd.8uw
@@ -227,7 +229,7 @@ touch $RPM_BUILD_ROOT%{sslcerts}/{imapd,
 touch $RPM_BUILD_ROOT%{_sysconfdir}/c-client.cf
 
 
-# FIXME -- Rex
+# FIXME, do on first launch (or not at all?), not here -- Rex
 %post
 {
 cd %{sslcerts} &> /dev/null || :
@@ -295,12 +297,14 @@ rm -rf $RPM_BUILD_ROOT
 %ghost %config(missingok,noreplace) %{_sysconfdir}/c-client.cf
 %{_libdir}/lib%{soname}.so.*
 
+%if 0%{?_with_devel:1}
 %files devel
 %defattr(-,root,root,-)
 %{_includedir}/imap/
 %{_libdir}/lib%{soname}.so
+%endif
 
-%if "%{?_with_static:1}" == "1"
+%if 0%{?_with_static:1}
 %files static
 %defattr(-,root,root,-)
 %{_libdir}/c-client.a
@@ -309,6 +313,25 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Aug 31 2009 Rex Dieter <rdieter at fedoraproject.org> 
+- omit -devel, -static bits in EPEL builds (#518885)
+
+* Wed Jul 08 2009 Rex Dieter <rdieter at fedoraproject.org> - 2007e-7
+- fix shared.patch to use CFLAGS for osdep.c too
+
+* Tue Jul 07 2009 Rex Dieter <rdieter at fedoraproject.org> - 2007e-6
+- build with -fPIC
+- rebase patches (patch fuzz=0)
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2007e-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Sun Jan 18 2009 Tomas Mraz <tmraz at redhat.com> 2007e-4
+- rebuild with new openssl
+
+* Mon Jan 12 2009 Rex Dieter <rdieter at fedoraproject.org> 2007e-3
+- main/-utils: +Req: %%imap_libs = %%version-%%release
+
 * Fri Dec 19 2008 Rex Dieter <rdieter at fedoraproject.org> 2007e-1
 - imap-2007e
 


--- imap-2001a-overflow.patch DELETED ---


--- imap-2002e-authmd5.patch DELETED ---


--- imap-2002e-shared.patch DELETED ---




More information about the fedora-extras-commits mailing list