My Openldap package ******************* Jehan Procaccia - jehan.procaccia@int-evry.fr ============================================= October 11, 2004 ================= Table of Contents *=*=*=*=*=*=*=*=* - 1 Introduction - 2 Relocatable prefix - 3 rpm manipulations - 4 Build - 5 Things to be done manually (postinstall) - 6 Upgrade particularities - 7 Disclaimer 1 Introduction *=*=*=*=*=*=*=* This package has been hacked to be relocatable. 2 Relocatable prefix *=*=*=*=*=*=*=*=*=*=* The Prefix: /usr/local where this package is installed by default can be replaced at installation by defining an other prefix. 3 rpm manipulations *=*=*=*=*=*=*=*=*=*= Installation example: to install in /usr/local/openldap-2.2.17-1 issue the following; rpm -ivh --prefix=/usr/local/openldap-2.2.17-1 openldap-*2.2.17-1*.rpm Beware when manipulating that package with rpm command to name it with its version-release name, ie: to search file and information from the package rpm -qli openldap-servers-2.2.17-1 to remove the package rpm -e openldap-2.2.17-1 and not rpm -e openldap because here you'll remove the system wide intallation of openldap ! here's an example of my Fedora Core 2 installation: << $ rpm -qa | grep openldap openldap-2.1.29-1 openldap-2.2.17-1 openldap-servers-2.2.17-1 openldap-clients-2.1.29-1 openldap-servers-2.1.29-1 openldap-clients-2.2.17-1 openldap-devel-2.2.17-1 openldap-devel-2.1.29-1 >> 4 Build *=*=*=*= To build the relocatable package, some macros needs to be defined. To preserve system wide macros definitions I encourage editing a `~/.rpmmacros' file to set prefix path, a .rpmmacros file is provided in this openldap package source. For information here's the search order of rpmmacros files in my station: 1 /.rpmmacros 2 /usr/lib/rpm/redhat/macros 3 /usr/lib/rpm/i386-linux/macros 4 /usr/lib/rpm/macros this is defined in /usr/lib/rpm/rpmrc file. 5 Things to be done manually (postinstall) *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* Although I took care of moving everything I could in the Prefix at rpmbuild install step, there are few things that needs to be done manually (not yet included in the - edit prefix/etc/openldap/slapd.conf to check path and define `ucdata_path' - edit prefix/etc/rc.d/init.d/ldap startup script a patch should be added here to automate that ... - add /usr/local/openldap-2.2.17-1/lib to /etc/ld.so.conf and issue ldconfig command - remember to use correct path in order to use the version-release installation you desire, ie here's how I populate my 2.2-17-1 database and then use openldap client to search the database << [root@corbeau /usr/local/openldap-2.2.17-1/var/lib/ldap/int] $ /usr/local/openldap-2.2.17-1/sbin/slapadd -f /usr/local/openldap-2.2.17-1/etc/openldap/slapd.conf -l /tmp/dump.ldif $ chown ldap:ldap * $ chown ldap . $ chown ldap /usr/local/openldap-2.2.17-1/etc/openldap/slapd.conf $ /usr/local/openldap-2.2.17-1/etc/rc.d/init.d/ldap start Starting slapd: [ OK ] [root@corbeau /usr/local/openldap-2.2.17-1/bin] $ ./ldapsearch -x uid=test -h localhost -b 'dc=int-evry,dc=fr' >> 6 Upgrade particularities *=*=*=*=*=*=*=*=*=*=*=*=*= Also beware that upgrading from 2.1.X to 2.2.X implies some changes that I can't enumerate, but here are the difficulties I encountered: - binary attributes from userCertificate objectclass for exemple, that my ldif file used to declare this way: attribute;binary:: YWJzpamts causes an error while slapadding the ldif file, I removed them ! - ACLs syntax have changed, cf: http://www.openldap.org/faq/data/cache/1082.html - maybe other things ... ? 7 Disclaimer *=*=*=*=*=*=* These package was build for my own usage, although publicly available I cannot guaranty anything in the use their use . ----------------------------------------------------------------------- This document was translated from LaTeX by HeVeA (http://pauillac.inria.fr/~maranget/hevea/index.html).