Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2019 13:13:14 +0100
From:      Harry Schmalzbauer <freebsd@omnilan.de>
To:        Luciano Mannucci <luciano@vespaperitivo.it>, freebsd-ports@freebsd.org
Subject:   Re: Deregister a port?
Message-ID:  <79cb0b2c-91e7-9c35-9959-250352aa3575@omnilan.de>
In-Reply-To: <43tVKW6ZwDz1ftYH@baobab.bilink.it>
References:  <43tRTn1zNKz1ftYp@baobab.bilink.it> <80bcc481-5a00-2059-c97b-4f993ffaa196@FreeBSD.org> <43tVKW6ZwDz1ftYH@baobab.bilink.it>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 04.02.2019 um 15:22 schrieb Luciano Mannucci:
> On Mon, 4 Feb 2019 13:38:56 +0000
> Matthew Seaman <matthew@FreeBSD.org> wrote:
>
>> Tell us the details and we may be able to help.
> Well, I'm migrating some web servers from very old linux to freebsd.
> I need several versions of php to accomodate various applications
> that are'nt under my control, some open source other hand made by
> customers. I used to keep my various php installations under /opt/phpXX
> via the --prefix switch during compilation. The same can be done in
> freebsd (I suppose :), though I've let some of the web sites use the

Mathew Seaman already descriebed other, much more correct ways to proceed.
My idea for such a hacky environment was to simply duplicate the ports 
database in /var/db/pkg (local.sqlite to somthing like 
local_phpless.sqlite) before you install the coresponding php package 
(but after you installed all the other packages you want on that 
machine).  If they have interfering runtime dependencies, this might be 
not as easy as I'm seeing right now, but possibly it is that easy and 
you end up with a consistent pkg(8) for everything else but PHP.
Simply move sqlite.local after installing PHP accordingly (local.sqlite 
-> local_PHP3.sqlite and local_phpless.sqlite -> local.sqlite) and repeat.
If you keep in mind that PHP has left $PREFIX for multiple versions (for 
that reason, I'd completely/consistently lie about PHP and move _all_ 
versions out of $PREFIX, so pkg(8) tell's that PHP ins't installed at 
all) you can possibly keep the rest of the ports on your system (besides 
PHP depencencies) consistently maintaned by pkg(8), while you manually 
take care about PHP ports/packages, without the tedious task to utilize 
'make' and the corresponding install targets.
pkg(8) also takes care about $PREFIX.
Which can be set on a port by port basis before creating your own 
package with 'make package' (environment or make -D, see 
ports/Mk/bsd.ports.mk from line 443 on)
So possibly, playing with $PREFIX might be another workaround. Depending 
on dependencies, $LOCALBASE is better to temporarily stress.
But that only applies to ports, not (pre-built) packages afaik, no idea 
if you can alter $PREFIX for packages – sure possible, but no idea if 
there's a ready to use option for that, or if you'd need to "patch" the 
package itself.
And I have no idea, if ports conflict infrasturcture takes $PREFIX into 
account – I'm not aware of any reason not beeing allowed to install 
conflicting ports with different $PREFIX.  But no idea if this is true 
in reality.
Just to throw in some theoretical ways to derail your local pkg(8) setup 
;-)

-harry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79cb0b2c-91e7-9c35-9959-250352aa3575>