Am 04.02.2019 um 15:22 schrieb Luciano Mannucci:
On Mon, 4 Feb 2019 13:38:56 +0000
Matthew Seaman <matt...@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
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"