On Tue, Mar 02, 2004 at 08:30:41PM +0200, Kaj J. Niemi wrote: > > %post/%postun, and there were a few too many RFCs in %doc for my taste. > > Ok. > > > RPM_OPT_FLAGS doesn't seem to be actually used during the build AFAICT. > > True. Make type lnp actually uses RPM_OPT_FLAGS as BASECFLAGS but I don't > think it's being used anywhere in c-client. Diff to yours below. Great, thanks... $RPM_OPT_FLAGS really should be used though. I fear this is going to break horribly on one of the platforms when I submit it. Another issue, it links the .so using: ld -shared -x -soname libc-client.so.0 -o libc-client.so.0 osdep.so ... which is bad, it should use "gcc -shared -Wl,-soname" at least. Current spec attached again with a new patch for an unrelated issue I spotted the other day on FC1. Regards, joe
%define soname c-client %define somajver 0 %define shlibname lib%{soname}.so.%{somajver} Summary: C-client mail access routines for IMAP and POP protocols Name: libc-client Version: 2002e Release: 3 License: University of Washington Free-Fork License Group: System Environment/Daemons URL: http://www.washington.edu/imap/ Source0: imap-%{version}.tar.Z Source1: flock.c Patch0: imap-2002e-redhat-ssl.patch Patch1: imap-2000-linux.patch Patch2: imap-2001a-mbox-disable.patch Patch3: imap-2002b-krbpath.patch Patch4: imap-2000c-redhat-flock.patch Patch5: imap-2001a-overflow.patch Patch6: imap-2002e-redhat-version.patch Patch7: imap-2002d-ssltype.patch Patch8: imap-2002e-cclient-only.patch Patch9: imap-2002e-shared.patch Patch10: imap-2002e-authmd5.patch Buildroot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: krb5-devel, openssl-devel # DO NOT REMOVE THIS PAM HEADER DEPENDANCY OR FACE THE WRATH BuildPreReq: /usr/include/security/pam_modules.h Requires: pam >= 0.59 Conflicts: imap %description C-client is a common API for accessing mailboxes. It is used internally by the popular PINE mail reader, the University of Washington's IMAP server and PHP. %package devel Summary: Development tools for programs which will use the IMAP library. Group: Development/Libraries Conflicts: imap-devel %description devel The c-client-devel package contains the header files and static libraries for developing programs which will use the C-client common API. %prep %setup -q -n imap-%{version} chmod -R u+w . %patch0 -p1 -b .redhat-ssl-patch %patch1 -p1 -b .linux-patch %patch2 -p0 -b .mbox-disable-patch %patch3 -p1 -b .gssapi-patch %patch4 -p1 -b .redhat-flock %patch5 -p1 -b .overflow %patch6 -p1 -b .redhat-version %patch7 -p1 -b .ssltype %patch8 -p1 -b .cclient-only %patch9 -p1 -b .shared %patch10 -p1 -b .authmd5 cp %{SOURCE1} src/osdep/unix/ %build # Set EXTRACFLAGS here instead of in imap-2000-redhat.patch (#20760) EXTRACFLAGS="$EXTRACFLAGS -DDISABLE_POP_PROXY=1 -DIGNORE_LOCK_EACCES_ERRORS=1" EXTRACFLAGS="$EXTRACFLAGS -I/usr/include/openssl" EXTRACFLAGS="$EXTRACFLAGS -fPIC" make lnp \ EXTRACFLAGS="$EXTRACFLAGS" \ EXTRALDFLAGS="$EXTRALDFLAGS" \ EXTRAAUTHENTICATORS=gss \ SSLTYPE=unix \ SHLIBBASE=%{soname} \ SHLIBNAME=%{shlibname} # This line needs to be here. %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_libdir} install -m 644 ./c-client/c-client.a $RPM_BUILD_ROOT%{_libdir}/ ln -s c-client.a $RPM_BUILD_ROOT%{_libdir}/libc-client.a install -m 755 ./c-client/%{shlibname} $RPM_BUILD_ROOT%{_libdir}/ ln -s %{shlibname} $RPM_BUILD_ROOT%{_libdir}/lib%{soname}.so mkdir -p $RPM_BUILD_ROOT%{_includedir}/imap install -m 644 ./c-client/*.h $RPM_BUILD_ROOT%{_includedir}/imap # Added linkage.c to fix (#34658) <mharris> install -m 644 ./c-client/linkage.c $RPM_BUILD_ROOT%{_includedir}/imap install -m 644 ./src/osdep/tops-20/shortsym.h $RPM_BUILD_ROOT%{_includedir}/imap #mkdir -p $RPM_BUILD_ROOT/%{_datadir}/ssl/certs # don't ship quite so many docs rm -rf docs/rfc docs/FAQ.txt %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc CPYRIGHT README WARNING docs/RELNOTES docs/*.txt %doc docs/CONFIG docs/SSLBUILD %{_libdir}/lib%{soname}.so.* %files devel %defattr(-,root,root) %doc docs/* %{_includedir}/imap %{_libdir}/c-client.a %{_libdir}/libc-client.a %{_libdir}/lib%{soname}.so %changelog * Fri Mar 5 2004 Joe Orton <jorton@xxxxxxxxxx> 2002e-3 - install .so with permissions 0755 - make auth_md5.c functions static to avoid symbol conflicts - remove Epoch: 0 * Tue Mar 02 2004 Kaj J. Niemi <kajtzu@xxxxxxxxxxxx> 0:2002e-2 - "lnp" already uses RPM_OPT_FLAGS - have us conflict with imap, imap-devel * Tue Mar 2 2004 Joe Orton <jorton@xxxxxxxxxx> 0:2002e-1 - add post/postun, always use -fPIC * Tue Feb 24 2004 Kaj J. Niemi <kajtzu@xxxxxxxxxxxx> - Name change from c-client to libc-client * Sat Feb 14 2004 Kaj J. Niemi <kajtzu@xxxxxxxxxxxx> 0:2002e-0.1 - c-client 2002e is based on imap-2002d - Build shared version, build logic is copied from FreeBSD net/cclient
Make some more functions static to prevent such horrible namespace pollution. --- imap-2002e/src/c-client/auth_md5.c.authmd5 2004-03-02 17:25:43.000000000 +0000 +++ imap-2002e/src/c-client/auth_md5.c 2004-03-02 17:25:51.000000000 +0000 @@ -34,17 +34,17 @@ /* 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);