From owner-freebsd-questions@FreeBSD.ORG Fri Dec 8 22:15:39 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B826116A417 for ; Fri, 8 Dec 2006 22:15:39 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.187.76.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9C1343CA6 for ; Fri, 8 Dec 2006 22:14:37 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from [IPv6:::1] (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.13.8/8.13.8) with ESMTP id kB8MFIhk094773; Fri, 8 Dec 2006 22:15:18 GMT (envelope-from m.seaman@infracaninophile.co.uk) Authentication-Results: smtp.infracaninophile.co.uk from=m.seaman@infracaninophile.co.uk; sender-id=permerror; spf=permerror X-SenderID: Sendmail Sender-ID Filter v0.2.14 smtp.infracaninophile.co.uk kB8MFIhk094773 Message-ID: <4579E3F0.1070907@infracaninophile.co.uk> Date: Fri, 08 Dec 2006 22:15:12 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 1.5.0.8 (X11/20061110) MIME-Version: 1.0 To: Alexis Dorais-Joncas References: <4579C3D8.4050307@g-noc.net> In-Reply-To: <4579C3D8.4050307@g-noc.net> X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig06E2F2E044AE2C5E16738177" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (smtp.infracaninophile.co.uk [IPv6:::1]); Fri, 08 Dec 2006 22:15:28 +0000 (GMT) X-Virus-Scanned: ClamAV 0.88.6/2308/Fri Dec 8 16:10:24 2006 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00, DKIM_POLICY_TESTING,NO_RELAYS autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: How to install the same port twice but at different locations? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2006 22:15:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig06E2F2E044AE2C5E16738177 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Alexis Dorais-Joncas wrote: > Hi all, >=20 > Subject says it all. I would like to install the package phpMyAdmin on > two different locations on my server. Is this doable? If so, how? >=20 > I'm using FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu > Nov 3 09:36:13 UTC 2005 =20 > root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 with ports > updated daily with cvsup. >=20 > Right now, after I do : > cd /usr/ports/databases/phpmyadmin > sudo make PREFIX=3D/xxx/yyy install >=20 > I get : > pkg_info|grep Admin > phpMyAdmin-2.9.1.1 A set of PHP-scripts to manage MySQL over the web >=20 > And when I try to install it again but using a different PREFIX, I get > this : > =3D=3D=3D> Checking if databases/phpmyadmin already installed > =3D=3D=3D> phpMyAdmin-2.9.1.1 is already installed > You may wish to ``make deinstall'' and install this port again >=20 > Using FORCE_PKG_REGISTER unregisters the first installation, so its no > good for this I guess. The problem is not so much installing the PHP code in two different locations, which you can do quite simply by playing with the PREFIX settings, but trying to register the same thing two times in the package DB. Hmmm... The only way I can see to deal with this is to use a separate package database for the second installation. Something like: setenv PREFIX /some/where/else setenv PKG_DBDIR /var/db/pkg-some-where-else mkdir -p /var/db/pkg-some-where-else cd /usr/ports/databases/phpMyAdmin make install Note: this install will find and use all of the dependencies installed to support the first instance of phpMyAdmin. If you're doing multiple=20 installs to support using phpMyAdmin in a jail then there are better methods. Probably the most conceptually simple method is to null-mount /usr/ports under your jail directory, then log into the jail and work inside it. However that does require having a 'fat' jail with a complete= system environment inside it. This is the functionality that DESTDIR was invented to support (ie. installing in a location that is different to the way the location will appear in use) -- unfortunately DESTDIR support is being reworked and isn't fully available yet. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig06E2F2E044AE2C5E16738177 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFeeP18Mjk52CukIwRCKo8AJ95jSfr8x6E91wSblZkSzm5RG4vtACfYu7M MAkPQ9Bu8TJscjpO4hXVLpQ= =fGZG -----END PGP SIGNATURE----- --------------enig06E2F2E044AE2C5E16738177--