Package: openldap2.2
Severity: normal
Tags: patch

Hi,

currently Debian's binaries for slapd and slurp reside in /usr/lib/.
According to my understanding of the FHS and Debian policy this is not 
the ideal location for these daemons:
- FHS says: internal binareis that are not intended to to be executed
  directly by users
- Policy requires a per-package sub-directory below /usr/lib/

So, /usr/sbin is the more approproate place for these daemons
(this is also indicated by the links in /usr/sbin).

The attached patch changes the build process so that deamons
and slap* utilitiles reside in /usr/sbin.

This configuration works on my systems for quite some time without any
problems.

CU
Peter

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-1-k7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
--- debian/move_files   2005-06-30 13:12:12.000000000 +0200
+++ debian/move_files   2005-06-30 13:10:26.000000000 +0200
@@ -65,10 +65,19 @@
 
 echo -n Installing:
 set_target slapd
+# move binaries and adapt links (tools are links to slapd in OL2.2+)
+mv debian/tmp/usr/lib/slapd debian/tmp/usr/lib/slurpd debian/tmp/usr/sbin/
+( cd debian/tmp/usr/sbin && \
+  LINKS=`find ./ -type l | sed '[EMAIL PROTECTED]/@@'`; \
+  rm -f $LINKS; \
+  for link in $LINKS; do \
+    ln -s slapd $link; \
+  done; \
+)
 install_stuff usr/sbin
 install_stuff usr/lib/ldap
 install_stuff usr/share/ldap
-install_stuff usr/lib/slapd usr/lib/slurpd
+#install_stuff usr/lib/slapd usr/lib/slurpd
 install_stuff usr/share/man/man5/slapd*
 install_stuff usr/share/man/man8
 install_stuff etc/ldap/schema
@@ -89,6 +98,7 @@
 # install_stuff etc/ldap/ldap*.conf
 rm debian/tmp/etc/ldap/ldap*.conf
 rm debian/tmp/usr/share/man/man5/ldap.conf*
+# link libldap-2.2*.so* to libldap_r-2.2*.so*
 ( cd debian/tmp/usr/lib; \
   ln -sf libldap_r-2.2.so.? libldap-2.2.so.?;
   ln -sf libldap_r-2.2.so.?.?.?? libldap-2.2.so.?.?.??
@@ -96,6 +106,7 @@
 install_stuff usr/lib/*.so.*
 
 set_target libldap2.2-dev
+# link libldap.a to libldap_r.la
 ln -sf libldap_r.a debian/tmp/usr/lib/libldap.a
 install_stuff usr/include
 install_stuff usr/lib/*.so usr/lib/*.a
--- debian/rules        2005-06-30 13:12:12.000000000 +0200
+++ debian/rules        2005-06-30 13:10:26.000000000 +0200
@@ -95,7 +95,8 @@
        dh_installexamples -a
        dh_installinit -Xslapd.prerm -a -- "defaults 19 80"
        dh_installdebconf -a
-       dh_installcron -a
+       # when using OpenSSL, we do not need to add crontab entries
+       #dh_installcron -a
        dh_strip -a
        dh_link -a
        dh_compress -a
--- debian/slapd.links  2005-06-30 13:12:12.000000000 +0200
+++ debian/slapd.links  2005-06-30 13:10:26.000000000 +0200
@@ -1,4 +1,2 @@
-usr/lib/slapd          usr/sbin/slapd
-usr/lib/slurpd         usr/sbin/slurpd
 usr/share/slapd/DB_CONFIG      usr/share/doc/slapd/examples/DB_CONFIG
 usr/share/slapd/slapd.conf     usr/share/doc/slapd/examples/slapd.conf

Reply via email to