rpms/openldap/devel openldap-2.4.22-ldif_h.patch, NONE, 1.1 openldap-2.4.22-libldif.patch, NONE, 1.1 openldap.spec, 1.163, 1.164

Jan Zeleny jzeleny at fedoraproject.org
Mon Jun 28 15:09:11 UTC 2010


Author: jzeleny

Update of /cvs/extras/rpms/openldap/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv31138

Modified Files:
	openldap.spec 
Added Files:
	openldap-2.4.22-ldif_h.patch openldap-2.4.22-libldif.patch 
Log Message:
patches modifying openldap to work with mozilla NSS crypto

openldap-2.4.22-ldif_h.patch:
 Makefile.in |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE openldap-2.4.22-ldif_h.patch ---
--- openldap-2.4.22/include/Makefile.in.orig	2010-06-03 07:38:29.000000000 -0600
+++ openldap-2.4.22/include/Makefile.in	2010-06-03 07:39:21.000000000 -0600
@@ -15,17 +15,18 @@
 
 all-local: ldap_config.h FORCE
 
 install-local: FORCE
 	-$(MKDIR) $(DESTDIR)$(includedir)
 	for header in $(srcdir)/lber.h lber_types.h \
 		$(srcdir)/ldap.h $(srcdir)/ldap_cdefs.h \
 		$(srcdir)/ldap_schema.h $(srcdir)/ldap_utf8.h \
-		$(srcdir)/slapi-plugin.h ldap_features.h; \
+		$(srcdir)/slapi-plugin.h ldap_features.h \
+		$(srcdir)/ldif.h ; \
 	do \
 		$(INSTALL) $(INSTALLFLAGS) -m 644 $$header $(DESTDIR)$(includedir); \
 	done
 
 clean-local: FORCE 
 	$(RM) ldap_config.h
 
 veryclean-local: clean-local FORCE

openldap-2.4.22-libldif.patch:
 Makefile.in |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

--- NEW FILE openldap-2.4.22-libldif.patch ---
--- openldap-2.4.22/libraries/liblutil/Makefile.in.orig	2010-06-03 10:57:01.000000000 -0600
+++ openldap-2.4.22/libraries/liblutil/Makefile.in	2010-06-03 10:59:29.000000000 -0600
@@ -9,16 +9,19 @@
 ## modification, are permitted only as authorized by the OpenLDAP
 ## Public License.
 ##
 ## A copy of this license is available in the file LICENSE in the
 ## top-level directory of the distribution or, alternatively, at
 ## <http://www.OpenLDAP.org/license.html>.
 
 LIBRARY	= liblutil.a
+
+SHAREDLIB = libldif.la
+
 PROGRAM = testavl
 
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
 
 NT_SRCS = ntservice.c
 NT_OBJS = ntservice.o slapdmsg.res
 
@@ -35,16 +38,18 @@
 	@LIBSRCS@ $(@PLAT at _SRCS)
 
 OBJS	= base64.o entropy.o sasl.o signal.o hash.o passfile.o \
 	md5.o passwd.o sha1.o getpass.o lockf.o utils.o uuid.o sockpair.o \
 	avl.o tavl.o ldif.o fetch.o \
 	meter.o \
 	@LIBOBJS@ $(@PLAT at _OBJS)
 
+SHAREDLIBOBJS = ldif.lo fetch.lo
+
 testavl: $(XLIBS) testavl.o
 	(LTLINK) -o $@ testavl.o $(LIBS)
 
 testtavl: $(XLIBS) testtavl.o
 	(LTLINK) -o $@ testtavl.o $(LIBS)
 
 # These rules are for a Mingw32 build, specifically.
 # It's ok for them to be here because the clean rule is harmless, and
@@ -54,8 +59,24 @@
 	@if [ ! -f $@ ]; then cp $(srcdir)/$@ .; fi
 
 slapdmsg.res: slapdmsg.rc slapdmsg.bin
 	windres $< -O coff -o $@
 
 clean-local:
 	$(RM) *.res
 
+all-local: $(SHAREDLIB)
+
+.SUFFIXES: .c .o .lo
+
+.c.lo:
+	$(LTCOMPILE_LIB) $<
+
+$(LIBRARY): $(SHAREDLIBOBJS) version.lo
+
+$(SHAREDLIB): $(SHAREDLIBOBJS) version.lo
+	$(LTLINK_LIB) -o $(SHAREDLIB) $(SHAREDLIBOBJS) version.lo $(LINK_LIBS)
+
+install-local: FORCE
+	-$(MKDIR) $(DESTDIR)$(libdir)
+	$(LTINSTALL) $(INSTALLFLAGS) -m 644 $(SHAREDLIB) $(DESTDIR)$(libdir)
+	$(LTFINISH) $(DESTDIR)$(libdir)


Index: openldap.spec
===================================================================
RCS file: /cvs/extras/rpms/openldap/devel/openldap.spec,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -p -r1.163 -r1.164
--- openldap.spec	28 May 2010 12:34:21 -0000	1.163
+++ openldap.spec	28 Jun 2010 15:09:11 -0000	1.164
@@ -11,7 +11,7 @@
 Summary: LDAP support libraries
 Name: openldap
 Version: %{version}
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: OpenLDAP
 Group: System Environment/Daemons
 Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz
@@ -36,6 +36,8 @@ Patch9: openldap-2.3.37-smbk5pwd.patch
 Patch10: openldap-2.4.6-multilib.patch
 Patch11: openldap-2.4.16-doc-cacertdir.patch
 Patch12: openldap-2.4.21-dn2id-segfault.patch
+Patch13: openldap-2.4.22-ldif_h.patch
+Patch14: openldap-2.4.22-libldif.patch
 
 # Patches for the evolution library
 Patch200: openldap-2.4.6-evolution-ntlm.patch
@@ -45,6 +47,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version
 BuildRequires: cyrus-sasl-devel >= 2.1, gdbm-devel, libtool >= 1.5.6-2, krb5-devel
 BuildRequires: openssl-devel, pam-devel, perl, pkgconfig, tcp_wrappers-devel,
 BuildRequires: unixODBC-devel, libtool-ltdl-devel, groff
+BuildRequires: nss-devel
 Requires: glibc >= 2.2.3-48, mktemp
 Obsoletes: compat-openldap < 2.4
 
@@ -132,6 +135,8 @@ pushd openldap-%{version}
 %patch10 -p1 -b .multilib
 %patch11 -p1 -b .cacertdir
 %patch12 -p1 -b .segfault
+%patch13 -p1 -b .ldif_h
+%patch14 -p1 -b .libldif
 
 cp %{_datadir}/libtool/config/config.{sub,guess} build/
 popd
@@ -191,10 +196,12 @@ make install libdb_base=libslapd_db libs
 ln -sf libslapd_db.so ${dbdir}/%{_lib}/${subdir}/libdb.so
 popd
 
-export CPPFLAGS="-I${dbdir}/include"
-export CFLAGS="$CPPFLAGS $RPM_OPT_FLAGS -D_REENTRANT -DLDAP_CONNECTIONLESS -fPIC -D_GNU_SOURCE"
+export CPPFLAGS="-I${dbdir}/include -I%_includedir/nss3 -I%_includedir/nspr4"
+export CFLAGS="$CPPFLAGS $RPM_OPT_FLAGS -D_REENTRANT -DLDAP_CONNECTIONLESS -fPIC -D_GNU_SOURCE -DHAVE_TLS -DHAVE_MOZNSS -DSLAPD_LMHASH"
 export LDFLAGS="-L${dbdir}/%{_lib}"
 export LD_LIBRARY_PATH=${dbdir}/%{_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+MOZNSS_TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
+export LIBS="$MOZNSS_TLS_LIBS"
 
 build() {
 %configure \
@@ -202,7 +209,7 @@ build() {
     \
     --enable-local --enable-rlookups \
     \
-    --with-tls \
+    --with-tls=no \
     --with-cyrus-sasl \
     \
     --enable-wrappers \
@@ -212,17 +219,29 @@ build() {
     --enable-cleartext \
     --enable-crypt \
     --enable-spasswd \
-    --enable-lmpasswd \
+    --disable-lmpasswd \
     --enable-modules \
     --disable-sql \
     \
     --libexecdir=%{_libdir} \
     $@
+# HACK HACK HACK
+# openldap uses #include <nss/somemoznssfile.h>
+# this doesn't work on fedora and similar which uses /usr/include/nss3
+# so we have to fake it out
+pushd include
+if [ ! -d nss ] ; then
+    ln -s %_includedir/nss3 nss
+fi
+if [ ! -d nspr ] ; then
+    ln -s %_includedir/nspr4 nspr
+fi
+popd
 make %{_smp_mflags} LIBTOOL="$libtool"
 }
 
 # Build the servers with Kerberos support (for password checking, mainly).
-LIBS=-lpthread; export LIBS
+LIBS="$LIBS -lpthread"; export LIBS
 LD_LIBRARY_PATH=${dbdir}/%{_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}; export LD_LIBRARY_PATH
 pushd openldap-%{version}/build-servers
 build \
@@ -253,6 +272,7 @@ popd
 
 # Build clients without Kerberos password-checking support, which is only
 # useful in the server anyway, to avoid stray dependencies.
+export LIBS="$MOZNSS_TLS_LIBS"
 pushd openldap-%{version}/build-clients
 build \
     --disable-slapd \
@@ -569,6 +589,7 @@ fi
 %attr(0755,root,root) %dir %{_sysconfdir}/openldap
 %attr(0755,root,root) %dir %{_sysconfdir}/openldap/cacerts
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/openldap/ldap*.conf
+%attr(0755,root,root) %{_libdir}/libldif-2.4*.so.*
 %attr(0755,root,root) %{_libdir}/liblber-2.4*.so.*
 %attr(0755,root,root) %{_libdir}/libldap-2.4*.so.*
 %attr(0755,root,root) %{_libdir}/libldap_r-2.4*.so.*
@@ -631,6 +652,11 @@ fi
 %attr(0644,root,root)      %{evolution_connector_libdir}/*.a
 
 %changelog
+* Thu Jun  3 2010 Rich Megginson <rmeggins at redhat.com> - 2.4.22-3
+- added ldif.h to the public api in the devel package
+- added -lldif to the public api
+- added HAVE_MOZNSS and other flags to use Mozilla NSS for crypto
+
 * Tue May 18 2010 Jan Zeleny <jzeleny at redhat.com> - 2.4.22-2
 - rebuild with connectionless support (#587722)
 - updated autofs schema (#584808)



More information about the scm-commits mailing list