From: Markus Ullmann Date: Sat, 23 Dec 2006 20:20:55 +0000 (+0000) Subject: Ebuild clean up, don't build 2.1 libs when building 2.2, just preserve if needed X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7dd30e971e34de606c12bedee878908bbe647d1f;p=gentoo.git Ebuild clean up, don't build 2.1 libs when building 2.2, just preserve if needed Package-Manager: portage-2.1.2_rc4 --- diff --git a/net-nds/openldap/ChangeLog b/net-nds/openldap/ChangeLog index 4ab354b1a782..dcc1f3a269ad 100644 --- a/net-nds/openldap/ChangeLog +++ b/net-nds/openldap/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-nds/openldap # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.236 2006/12/23 16:10:26 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/ChangeLog,v 1.237 2006/12/23 20:20:54 jokey Exp $ + + 23 Dec 2006; Markus Ullmann -files/gencert.sh-2.2.27, + openldap-2.1.30-r9.ebuild, openldap-2.2.28-r5.ebuild, + openldap-2.2.28-r6.ebuild, openldap-2.3.30-r1.ebuild, + openldap-2.3.31.ebuild: + Ebuild clean up, don't build 2.1 libs when building 2.2, just preserve if + needed 23 Dec 2006; Markus Ullmann -openldap-2.1.30-r6.ebuild, -openldap-2.1.30-r7.ebuild, openldap-2.1.30-r8.ebuild, diff --git a/net-nds/openldap/files/digest-openldap-2.2.28-r6 b/net-nds/openldap/files/digest-openldap-2.2.28-r6 index 7f47e31dd5fd..39550e28ab46 100644 --- a/net-nds/openldap/files/digest-openldap-2.2.28-r6 +++ b/net-nds/openldap/files/digest-openldap-2.2.28-r6 @@ -1,6 +1,3 @@ -MD5 e2ae8148c4bed07d7a70edd930bdc403 openldap-2.1.30.tgz 2044673 -RMD160 431aa798c6197530c17611b931f0169d7a53e831 openldap-2.1.30.tgz 2044673 -SHA256 7fcefd45dfc82038cf0875e36b86a67d3af44b6a734e0127bae9ff2582ae8b25 openldap-2.1.30.tgz 2044673 MD5 b51db7328430b9cbe527696da726f1fb openldap-2.2.28.tgz 2630427 RMD160 ca3f5aff42e6afc6b7c0a62beb8c13d4ff43d44c openldap-2.2.28.tgz 2630427 SHA256 05c75b719305578dec799f05eaddae6b77eb51857abc6284e47b6abc4317dfba openldap-2.2.28.tgz 2630427 diff --git a/net-nds/openldap/openldap-2.1.30-r9.ebuild b/net-nds/openldap/openldap-2.1.30-r9.ebuild index 173c59ef6172..fdc9649d117c 100644 --- a/net-nds/openldap/openldap-2.1.30-r9.ebuild +++ b/net-nds/openldap/openldap-2.1.30-r9.ebuild @@ -1,7 +1,10 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.1.30-r9.ebuild,v 1.1 2006/11/21 10:06:39 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.1.30-r9.ebuild,v 1.2 2006/12/23 20:20:55 jokey Exp $ +WANT_AUTOMAKE="1.9" +WANT_AUTOCONF="2.5" +AT_M4DIR="./build" inherit eutils DESCRIPTION="LDAP suite of application and development tools" @@ -13,8 +16,12 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" IUSE="berkdb crypt debug gdbm ipv6 odbc perl readline samba sasl slp ssl tcpd selinux" +# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP +# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like +# mine at work)! +# Robin H. Johnson March 8, 2004 + DEPEND=">=sys-libs/ncurses-5.1 - >=sys-apps/sed-4 tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) ssl? ( >=dev-libs/openssl-0.9.6 ) readline? ( >=sys-libs/readline-4.1 ) @@ -22,28 +29,14 @@ DEPEND=">=sys-libs/ncurses-5.1 odbc? ( dev-db/unixODBC ) slp? ( >=net-libs/openslp-1.0 ) perl? ( >=dev-lang/perl-5.6 ) - samba? ( >=dev-libs/openssl-0.9.6 )" - -# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP -# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like -# mine at work)! -# Robin H. Johnson March 8, 2004 - -# if USE=berkdb -# pull in sys-libs/db -# else if USE=gdbm -# pull in sys-libs/gdbm -# else -# pull in sys-libs/db -DEPEND="${DEPEND} + samba? ( >=dev-libs/openssl-0.9.6 ) berkdb? ( >=sys-libs/db-4.1.25_p1-r3 ) !berkdb? ( gdbm? ( >=sys-libs/gdbm-1.8.0 ) !gdbm? ( >=sys-libs/db-4.1.25_p1-r3 ) )" -RDEPEND=" - ${DEPEND} +RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-openldap )" pkg_preinst() { @@ -65,59 +58,52 @@ src_unpack() { # (the net result is that "passwd" can be used to change ldap passwords w/ # proper pam support) sed -ie 's/$(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS)/$(LUTIL_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS)/' \ - ${S}/servers/slapd/Makefile.in + "${S}"/servers/slapd/Makefile.in # Fix up DB-4.0 linking problem # remember to autoconf! this expands configure by 500 lines (4 lines to m4 # stuff). - epatch ${FILESDIR}/${PN}-2.1.30-db40.patch - epatch ${FILESDIR}/${PN}-2.1.30-tls-activedirectory-hang-fix.patch + epatch "${FILESDIR}"/${PN}-2.1.30-db40.patch + epatch "${FILESDIR}"/${PN}-2.1.30-tls-activedirectory-hang-fix.patch # Security bug #96767 # http://bugzilla.padl.com/show_bug.cgi?id=210 - EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${PN}-2.2.26-tls-fix-connection-test.patch + EPATCH_OPTS="-p1 -d ${S}" epatch "${FILESDIR}"/${PN}-2.2.26-tls-fix-connection-test.patch # supersedes old fix for bug #31202 - cd ${S} - epatch ${FILESDIR}/${PN}-2.1.27-perlthreadsfix.patch + cd "${S}" + epatch "${FILESDIR}"/${PN}-2.1.27-perlthreadsfix.patch # fix up stuff for newer autoconf that simulates autoconf-2.13, but doesn't # do it perfectly. - cd ${S}/build + cd "${S}"/build ln -s shtool install ln -s shtool install.sh # ximian connector 1.4.7 ntlm patch - cd ${S} - epatch ${FILESDIR}/${PN}-2.1.30-ximian_connector.patch - - export WANT_AUTOMAKE="1.9" - export WANT_AUTOCONF="2.5" + cd "${S}" + epatch "${FILESDIR}"/${PN}-2.1.30-ximian_connector.patch #make files ready for new autoconf - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf25.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-autoconf25.patch # fix AC calls bug #114544 - EPATCH_OPTS="-p0 -d ${S}/build" epatch ${FILESDIR}/${PN}-2.1.30-m4_underquoted.patch + EPATCH_OPTS="-p0 -d ${S}/build" epatch "${FILESDIR}"/${PN}-2.1.30-m4_underquoted.patch # make tests rpath ready - EPATCH_OPTS="-p0 -d ${S}/tests" epatch ${FILESDIR}/${PN}-2.1.30-tests.patch + EPATCH_OPTS="-p0 -d ${S}/tests" epatch "${FILESDIR}"/${PN}-2.1.30-tests.patch # make autoconf-archive compatible - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-autoconf-archived-fix.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.1.30-autoconf-archived-fix.patch # CVE-2006-5779, bug #154349 - EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.3.27-CVE-2006-5779.patch + EPATCH_OPTS="-p0 -d ${S}" epatch "${FILESDIR}"/${PN}-2.3.27-CVE-2006-5779.patch - # reconf compat and current for RPATH solve - cd ${S} - einfo "Running libtoolize on ${S}" + # reconf current for RPATH solve libtoolize --copy --force - einfo "Running aclocal on ${S}" - aclocal || die "aclocal failed" + eaclocal || die "aclocal failed" EPATCH_OPTS="-p0 -d ${S}" epatch ${FILESDIR}/${PN}-2.1.30-rpath.patch - einfo "Running autoconf on ${S}" - autoconf || die "autoconf failed" + eautoconf || die "autoconf failed" } src_compile() { @@ -155,10 +141,6 @@ src_compile() { ewarn "Berkeley DB for local backend" myconf="${myconf} ${myconf_berkdb}" fi - - # alas, for BSD only - #myconf="${myconf} --with-fetch" - myconf="${myconf} --enable-dynamic --enable-modules" myconf="${myconf} --enable-rewrite --enable-rlookups" myconf="${myconf} --enable-passwd --enable-phonetic" @@ -167,18 +149,14 @@ src_compile() { myconf="${myconf} --enable-null --enable-shell" myconf="${myconf} --enable-local --enable-proctitle" - # disabled options - # --with-bdb-module=dynamic - # --enable-dnsserv --with-dnsserv-module=dynamic - econf \ --enable-static \ --enable-shared \ --libexecdir=/usr/lib/openldap \ ${myconf} || die "configure failed" - make depend || die "make depend failed" - make || die "make failed" + emake depend || die "make depend failed" + emake || die "make failed" } @@ -188,7 +166,7 @@ src_test() { } src_install() { - make DESTDIR=${D} install || die "make install failed" + emake DESTDIR=${D} install || die "make install failed" dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE ${FILESDIR}/DB_CONFIG.fast.example docinto rfc ; dodoc doc/rfc/*.txt @@ -258,13 +236,6 @@ pkg_postinst() { chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} # notes from bug #41297, bug #41039 - ewarn "If you are upgrading from OpenLDAP 2.0, major changes have occured:" - ewarn "- bind_anon_dn is now disabled by default for security" - ewarn " add 'allow bind_anon_dn' to your config for the old behavior." - ewarn "- Default schemas have changed, you should slapcat your entire DB to" - ewarn " a file, delete your DB, and then slapadd it again. Alternatively" - ewarn " you can try slapindex which should work in almost all cases. Be" - ewarn " sure to check the permissions on the database files afterwards!" if use ssl; then ewarn "- Self-signed SSL certificates are treated harshly by OpenLDAP 2.1" ewarn " add 'TLS_REQCERT never' if you want to use them." diff --git a/net-nds/openldap/openldap-2.2.28-r5.ebuild b/net-nds/openldap/openldap-2.2.28-r5.ebuild index 510c48466611..6431c13a7076 100644 --- a/net-nds/openldap/openldap-2.2.28-r5.ebuild +++ b/net-nds/openldap/openldap-2.2.28-r5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r5.ebuild,v 1.9 2006/12/23 16:10:26 jokey Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r5.ebuild,v 1.10 2006/12/23 20:20:55 jokey Exp $ inherit flag-o-matic toolchain-funcs eutils multilib @@ -355,7 +355,6 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - #newexe ${FILESDIR}/gencert.sh-2.2.27 gencert.sh doexe ${FILESDIR}/gencert.sh fi diff --git a/net-nds/openldap/openldap-2.2.28-r6.ebuild b/net-nds/openldap/openldap-2.2.28-r6.ebuild index 39f005e1b284..26b8f3de3aaf 100644 --- a/net-nds/openldap/openldap-2.2.28-r6.ebuild +++ b/net-nds/openldap/openldap-2.2.28-r6.ebuild @@ -1,24 +1,28 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r6.ebuild,v 1.1 2006/11/21 10:06:39 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.2.28-r6.ebuild,v 1.2 2006/12/23 20:20:55 jokey Exp $ -inherit flag-o-matic toolchain-funcs eutils multilib libtool - -OLD_PV="2.1.30" -OLD_P="${PN}-${OLD_PV}" -OLD_S="${WORKDIR}/${OLD_P}" +WANT_AUTOMAKE="1.9" +WANT_AUTOCONF="2.5" +AT_M4DIR="./build" +inherit autotools eutils flag-o-matic multilib toolchain-funcs DESCRIPTION="LDAP suite of application and development tools" HOMEPAGE="http://www.OpenLDAP.org/" -SRC_URI="mirror://openldap/openldap-release/${P}.tgz - mirror://openldap/openldap-release/${OLD_P}.tgz" +SRC_URI="mirror://openldap/openldap-release/${P}.tgz" LICENSE="OPENLDAP" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="berkdb crypt debug gdbm ipv6 kerberos minimal odbc perl readline samba sasl slp ssl tcpd selinux" -RDEPEND=">=sys-libs/ncurses-5.1 +# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP +# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like +# mine at work)! +# Robin H. Johnson March 8, 2004 + +RDEPEND_BERKDB=">=sys-libs/db-4.2.52_p2-r1" +DEPEND="sys-libs/ncurses tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) ssl? ( >=dev-libs/openssl-0.9.6 ) readline? ( >=sys-libs/readline-4.1 ) @@ -27,57 +31,23 @@ RDEPEND=">=sys-libs/ncurses-5.1 slp? ( >=net-libs/openslp-1.0 ) perl? ( >=dev-lang/perl-5.6 ) samba? ( >=dev-libs/openssl-0.9.6 ) - kerberos? ( virtual/krb5 )" - -# note that the 'samba' USE flag pulling in OpenSSL is NOT an error. OpenLDAP -# uses OpenSSL for LanMan/NTLM hashing (which is used in some enviroments, like -# mine at work)! -# Robin H. Johnson March 8, 2004 - -# if USE=berkdb -# pull in sys-libs/db -# else if USE=gdbm -# pull in sys-libs/gdbm -# else -# pull in sys-libs/db -RDEPEND_BERKDB=">=sys-libs/db-4.2.52_p2-r1" -RDEPEND_GDBM=">=sys-libs/gdbm-1.8.0" -RDEPEND="${RDEPEND} + kerberos? ( virtual/krb5 ) berkdb? ( ${RDEPEND_BERKDB} ) !berkdb? ( - gdbm? ( ${RDEPEND_GDBM} ) + gdbm? ( sys-libs/gdbm ) !gdbm? ( ${RDEPEND_BERKDB} ) ) selinux? ( sec-policy/selinux-openldap )" - -DEPEND="${RDEPEND} - >=sys-devel/libtool-1.5.18-r1 - >=sys-apps/sed-4" +RDEPEND="${DEPEND}" # for tracking versions OPENLDAP_VERSIONTAG="/var/lib/openldap-data/.version-tag" -#DEPEND="${DEPEND} ! " -i ${D}/${f} + sed -e "s:/var/lib/run/slapd.:/var/run/openldap/slapd.:" -i "${D}"/${f} + sed -e "/database\tbdb$/acheckpoint 32 30 # " -i "${D}"/${f} fowners root:ldap ${f} fperms 0640 ${f} done # install our own init scripts exeinto /etc/init.d - newexe ${FILESDIR}/2.0/slapd slapd - newexe ${FILESDIR}/2.0/slurpd slurpd + newexe "${FILESDIR}"/2.0/slapd slapd + newexe "${FILESDIR}"/2.0/slurpd slurpd if [ $(get_libdir) != lib ]; then - sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i ${D}/etc/init.d/{slapd,slurpd} + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i "${D}"/etc/init.d/{slapd,slurpd} fi insinto /etc/conf.d - newins ${FILESDIR}/2.0/slapd.conf slapd + newins "${FILESDIR}"/2.0/slapd.conf slapd # install contributed modules docinto / - if [ -e ${S}/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; + if [ -e "${S}"/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; then - cd ${S}/contrib/slapd-modules/dsaschema/ + cd "${S}"/contrib/slapd-modules/dsaschema/ newdoc README README.contrib.dsaschema exeinto /usr/$(get_libdir)/openldap/openldap doexe libdsaschema-plugin.so || \ die "failed to install dsaschema module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap doexe pw-kerberos.so || \ die "failed to install kerberos passwd module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-netscape.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-netscape.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap - doexe ${S}/contrib/slapd-modules/passwd/pw-netscape.so || \ + doexe "${S}"/contrib/slapd-modules/passwd/pw-netscape.so || \ die "failed to install Netscape MTA-MD5 passwd module" fi - if [ -e ${S}/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then - cd ${S}/contrib/slapd-modules/smbk5pwd + if [ -e "${S}"/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then + cd "${S}"/contrib/slapd-modules/smbk5pwd newdoc README.contrib.smbk5pwd libexecdir="/usr/$(get_libdir)/openldap" \ - DESTDIR="${D}" make install-mod || \ + emake DESTDIR="${D}" install-mod || \ die "failed to install smbk5pwd overlay module" fi - if [ -e ${S}/contrib/slapd-tools/statslog ]; then - cd ${S}/contrib/slapd-tools + if [ -e "${S}"/contrib/slapd-tools/statslog ]; then + cd "${S}"/contrib/slapd-tools exeinto /usr/bin newexe statslog ldapstatslog || \ die "failed to install ldapstatslog script" fi - if [ -e ${S}/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; + if [ -e "${S}"/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; then - cd ${S}/contrib/slapi-plugins/addrdnvalues + cd "${S}"/contrib/slapi-plugins/addrdnvalues newdoc README README.contrib.addrdnvalues exeinto /usr/$(get_libdir)/openldap/openldap doexe libaddrdnvalues-plugin.so || \ @@ -450,55 +448,19 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - doexe ${FILESDIR}/gencert.sh + doexe "${FILESDIR}"/gencert.sh fi # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib ${each} + LIBSUFFIXES=".so.2.0.130 -2.2.so.7" + for LIBSUFFIX in ${LIBSUFFIXES} ; do + for each in lber libldap libldap_r ; do + preserve_old_lib "${ROOT}usr/$(get_libdir)/${each}${LIBSUFFIX}" + done done } pkg_postinst() { - # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib_notify ${each} - done - if use ssl; then # make a self-signed ssl cert (if there isn't one there already) if [ ! -e /etc/openldap/ssl/ldap.pem ] @@ -513,15 +475,11 @@ pkg_postinst() { einfo fi fi - - # Since moving to running openldap as user ldap there are some - # permissions problems with directories and files. - # Let's make sure these permissions are correct. - chown ldap:ldap /var/run/openldap - chmod 0755 /var/run/openldap - chown root:ldap /etc/openldap/slapd.conf{,.default} - chmod 0640 /etc/openldap/slapd.conf{,.default} - chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} + chown ldap:ldap "${ROOT}"var/run/openldap + chmod 0755 "${ROOT}"var/run/openldap + chown root:ldap "${ROOT}"etc/openldap/slapd.conf{,.default} + chmod 0640 "${ROOT}"etc/openldap/slapd.conf{,.default} + chown ldap:ldap "${ROOT}"var/lib/openldap-{data,ldbm,slurp} if use ssl; then ewarn @@ -545,10 +503,10 @@ pkg_postinst() { einfo "/usr/share/doc/${P}/DB_CONFIG.fast.example.gz" einfo - if has_version " " -i ${D}/${f} + sed -e "s:/var/lib/run/slapd.:/var/run/openldap/slapd.:" -i "${D}"/${f} + sed -e "/database\tbdb$/acheckpoint 32 30 # " -i "${D}"/${f} fowners root:ldap ${f} fperms 0640 ${f} done # install our own init scripts exeinto /etc/init.d - newexe ${FILESDIR}/2.0/slapd slapd - newexe ${FILESDIR}/2.0/slurpd slurpd + newexe "${FILESDIR}"/2.0/slapd slapd + newexe "${FILESDIR}"/2.0/slurpd slurpd if [ $(get_libdir) != lib ]; then - sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i ${D}/etc/init.d/{slapd,slurpd} + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," -i "${D}"/etc/init.d/{slapd,slurpd} fi insinto /etc/conf.d - newins ${FILESDIR}/2.0/slapd.conf slapd + newins "${FILESDIR}"/2.0/slapd.conf slapd # install contributed modules docinto / - if [ -e ${S}/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; + if [ -e "${S}"/contrib/slapd-modules/dsaschema/libdsaschema-plugin.so ]; then - cd ${S}/contrib/slapd-modules/dsaschema/ + cd "${S}"/contrib/slapd-modules/dsaschema/ newdoc README README.contrib.dsaschema exeinto /usr/$(get_libdir)/openldap/openldap doexe libdsaschema-plugin.so || \ die "failed to install dsaschema module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-kerberos.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-kerberos.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap doexe pw-kerberos.so || \ die "failed to install kerberos passwd module" fi - if [ -e ${S}/contrib/slapd-modules/passwd/pw-netscape.so ]; then - cd ${S}/contrib/slapd-modules/passwd/ + if [ -e "${S}"/contrib/slapd-modules/passwd/pw-netscape.so ]; then + cd "${S}"/contrib/slapd-modules/passwd/ newdoc README README.contrib.passwd exeinto /usr/$(get_libdir)/openldap/openldap - doexe ${S}/contrib/slapd-modules/passwd/pw-netscape.so || \ + doexe "${S}"/contrib/slapd-modules/passwd/pw-netscape.so || \ die "failed to install Netscape MTA-MD5 passwd module" fi - if [ -e ${S}/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then - cd ${S}/contrib/slapd-modules/smbk5pwd + if [ -e "${S}"/contrib/slapd-modules/smbk5pwd/.libs/smbk5pwd.so ]; then + cd "${S}"/contrib/slapd-modules/smbk5pwd newdoc README.contrib.smbk5pwd libexecdir="/usr/$(get_libdir)/openldap" \ - DESTDIR="${D}" make install-mod || \ + emake DESTDIR="${D}" install-mod || \ die "failed to install smbk5pwd overlay module" fi - if [ -e ${S}/contrib/slapd-tools/statslog ]; then - cd ${S}/contrib/slapd-tools + if [ -e "${S}"/contrib/slapd-tools/statslog ]; then + cd "${S}"/contrib/slapd-tools exeinto /usr/bin newexe statslog ldapstatslog || \ die "failed to install ldapstatslog script" fi - if [ -e ${S}/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; + if [ -e "${S}"/contrib/slapi-plugins/addrdnvalues/libaddrdnvalues-plugin.so ]; then - cd ${S}/contrib/slapi-plugins/addrdnvalues + cd "${S}"/contrib/slapi-plugins/addrdnvalues newdoc README README.contrib.addrdnvalues exeinto /usr/$(get_libdir)/openldap/openldap doexe libaddrdnvalues-plugin.so || \ @@ -450,55 +448,19 @@ src_install() { if use ssl || use samba; then dodir /etc/openldap/ssl exeinto /etc/openldap/ssl - doexe ${FILESDIR}/gencert.sh + doexe "${FILESDIR}"/gencert.sh fi # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib ${each} + LIBSUFFIXES=".so.2.0.130 -2.2.so.7" + for LIBSUFFIX in ${LIBSUFFIXES} ; do + for each in lber libldap libldap_r ; do + preserve_old_lib "${ROOT}usr/$(get_libdir)/${each}${LIBSUFFIX}" + done done } pkg_postinst() { - # keep old libs if any - # from 2.1 - for each in ${ROOT}usr/$(get_libdir)/liblber.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r.so.2.0.1* ; do - preserve_old_lib_notify ${each} - done - # from 2.2 - for each in ${ROOT}usr/$(get_libdir)/liblber-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap-2.2* ; do - preserve_old_lib_notify ${each} - done - for each in ${ROOT}usr/$(get_libdir)/libldap_r-2.2* ; do - preserve_old_lib_notify ${each} - done - if use ssl; then # make a self-signed ssl cert (if there isn't one there already) if [ ! -e /etc/openldap/ssl/ldap.pem ] @@ -513,15 +475,11 @@ pkg_postinst() { einfo fi fi - - # Since moving to running openldap as user ldap there are some - # permissions problems with directories and files. - # Let's make sure these permissions are correct. - chown ldap:ldap /var/run/openldap - chmod 0755 /var/run/openldap - chown root:ldap /etc/openldap/slapd.conf{,.default} - chmod 0640 /etc/openldap/slapd.conf{,.default} - chown ldap:ldap /var/lib/openldap-{data,ldbm,slurp} + chown ldap:ldap "${ROOT}"var/run/openldap + chmod 0755 "${ROOT}"var/run/openldap + chown root:ldap "${ROOT}"etc/openldap/slapd.conf{,.default} + chmod 0640 "${ROOT}"etc/openldap/slapd.conf{,.default} + chown ldap:ldap "${ROOT}"var/lib/openldap-{data,ldbm,slurp} if use ssl; then ewarn @@ -545,10 +503,10 @@ pkg_postinst() { einfo "/usr/share/doc/${P}/DB_CONFIG.fast.example.gz" einfo - if has_version "