diff --git a/ldap.init b/ldap.init index c5707e4..5df38dd 100644 --- a/ldap.init +++ b/ldap.init @@ -149,10 +149,6 @@ function start() { # Define a couple of local variables which we'll need. Maybe. user=ldap prog=`basename ${slapd}` - # Build a wrapper script to exec slapd with the right arguments, to - # avoid being tripped out by changes or weirdness in how daemon() - # handles quoted arguments. - wrapper=`mktemp ${TMP:-/tmp}/start-slapd.XXXXXX` harg="ldap:///" if grep -q ^TLS /etc/openldap/slapd.conf || test x$SLAPD_LDAPS = xyes ; then harg="$harg ldaps:///" @@ -163,14 +159,9 @@ function start() { if test -z "$wrapper" ; then return 1 fi - cat >> $wrapper <<- EOF - exec ${slapd} -h "$harg" -u ${user} $OPTIONS $SLAPD_OPTIONS - EOF - chmod u+x $wrapper - trap "rm -f $wrapper" EXIT # Start daemons. echo -n $"Starting $prog: " - daemon --check=$prog $wrapper + daemon --check=$prog ${slapd} -h "\"$harg\"" -u ${user} $OPTIONS $SLAPD_OPTIONS RETVAL=$? echo if [ $RETVAL -eq 0 ]; then diff --git a/openldap.spec b/openldap.spec index 1c05d17..baa6796 100644 --- a/openldap.spec +++ b/openldap.spec @@ -317,7 +317,7 @@ LD_LIBRARY_PATH=${dbdir}/%{_lib}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}; export # Build the client libraries for the compat package. pushd openldap-%{compat_version}/build-compat %configure \ - --disable-slapd --disable-slurpd \ + --enable-slapd --disable-slurpd \ --with-threads=posix --enable-static --enable-shared --enable-dynamic \ --enable-local --with-tls --with-cyrus-sasl --without-kerberos make %{_smp_mflags} @@ -419,6 +419,11 @@ pushd openldap-%{compat_version}/build-compat/libraries rm $RPM_BUILD_ROOT/%{_libdir}/*.so popd +pushd openldap-%{compat_version}/build-compat/servers/slapd + make install-tools DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} LIBTOOL="$libtool" + mv $RPM_BUILD_ROOT/%{_sbindir}/slapcat $RPM_BUILD_ROOT/%{_sbindir}/compat-slapcat +popd + # Install servers. %ifarch %{nptl_arches} case %{_target_platform} in @@ -650,6 +655,7 @@ fi %attr(0755,root,root) %{_libdir}/liblber-2.2.so.* %attr(0755,root,root) %{_libdir}/libldap-2.2.so.* %attr(0755,root,root) %{_libdir}/libldap_r-2.2.so.* +%attr(0755,root,root) %{_sbindir}/compat-slapcat %files servers %defattr(-,root,root) @@ -718,6 +724,10 @@ fi %attr(0644,root,root) %{evolution_connector_libdir}/*.a %changelog +* Tue May 22 2007 Jan Safranek +- do not create script in /tmp on startup (bz#188298) +- add compat-slapcat to openldap-compat (bz#179378) + * Mon Apr 23 2007 Jan Safranek 2.3.34-2%{?dist} - slapadd during package update is now quiet (bz#224581) - use _localstatedir instead of var/ during build (bz#220970)