From owner-freebsd-questions@FreeBSD.ORG Sun May 16 08:24:46 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED4EE16A4CE for ; Sun, 16 May 2004 08:24:46 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA47143D55 for ; Sun, 16 May 2004 08:24:44 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i4GFOeiQ038421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 May 2004 16:24:40 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i4GFOewn038420; Sun, 16 May 2004 16:24:40 +0100 (BST) (envelope-from matthew) Date: Sun, 16 May 2004 16:24:40 +0100 From: Matthew Seaman To: Robert Fitzpatrick Message-ID: <20040516152440.GA38087@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Robert Fitzpatrick , FreeBSD References: <1084717533.8741.8.camel@columbus> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <1084717533.8741.8.camel@columbus> User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20040504, clamav-milter version 0.70u X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: FreeBSD Subject: Re: Upgrading OpenLDAP 2.1.30 to 2.2.x X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 15:24:47 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 16, 2004 at 10:25:33AM -0400, Robert Fitzpatrick wrote: > Can portupgrade be used to upgrade OpenLDAP 2.1.x to 2.2.x by changing > WITH_OPENLDAP_VER in my /etc/make.conf file to 22? Or do I have to > deinstall the 21 package, and reinstall 22 and everything that depends > on it? You can use portupgrade do that, but it's slightly more complicated than what you propose. The way to upgrade to not just a different version of the same port, but a completely different port is to use the '-o' option to portupgrade. Thus in principal to upgrade from openldap21-client to openldap22-client you would run: # portupgrade -o net/openldap22-client -f net/openldap21-client which will replace the openldap21 client side with the openldap22 stuff, fixing up all the dependcy linkages in pkgdb as it does. (Nb. there aren't any sanity checks while doing this, so you can in theory persuade the ports system that 'quake2server' is an adequate substitue for 'gcc34' and other insanities. Be sure you understand what you are doing.) Now, the astute reader will have noticed the weasel words 'in principal' in that first paragraph. That's because things are somewhat more complicated than you might hope. The problem is that the openldapXX-client ports provide several shlibs, and the ABI version number has changed from one openldap version to the other: % grep .so. openldap21-server/pkg-plist.client=20 lib/liblber.so.2 lib/libldap.so.2 lib/libldap_r.so.2 % grep .so. openldap22-server/pkg-plist.client lib/liblber.so.202 @comment lib/liblber-2.2.so.7 lib/libldap.so.202 @comment lib/libldap-2.2.so.7 lib/libldap_r.so.202 @comment lib/libldap_r-2.2.so.7 That means that all of the applications linked against the LDAP shlibs have suddenly stopped working. To fix them, all you need do is reinstall -- the situation is analogous to the problem with 'libintl.so.N no found' thing that keeps coming up over and over on this list. Before we get too happy about doing that, first we need to take care of the openldap server. But that's only if you've got one running on this particular system. It just takes the same sort of command line as for the client upgrade: # portupgrade -o net/openldap22-server -f net/openldap21-server You may have to install some new versions of the Berkely DB library to get that to work correctly. Now you can re-install all of the other programs that link against the openldap shlibs -- which is basically all dependencies of the openldap-client port. Note that openldap-server is also a dependency of openldap-client, but there's no point in re-installing that again, or anything else updated after the OpenLDAP client software: # portupgrade -rf net/openldap22-client -x '>=3Dopenldap*client' And that is really all there is to it. Oh -- although don't forget to put 'WANT_OPENLDAP_VER=3D22' into your /etc/make.conf or /usr/local/etc/pkgtools.conf once you're done. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAp4e4iD657aJF7eIRAiY1AJ0V857u3N+By3GCIzNpZnP1pTzI0QCfUrlX DSFttIjphMZQFKUvpVknwAc= =NJ8Q -----END PGP SIGNATURE----- --wac7ysb48OaltWcw--