joomla ports - installation- multiple virtual hosts

Wesley Shields wxs at atarininja.org
Thu Mar 29 19:26:24 UTC 2007


On Thu, Mar 29, 2007 at 02:36:53PM -0400, Lowell Gilbert wrote:
> Vizion <vizion at vizion.occoxmail.com> writes:
> >>>> -----Original Message-----
> >>>>[mailto:owner-freebsd-ports at freebsd.org] On Behalf Of Vizion
> >>>> Sent: Thursday, March 29, 2007 8:57 AM
> >>>> To: ports at freebsd.org
> >>>> Cc: freebsd-ports-local at be-well.ilk.org
> >>>> Subject: Re: joomla ports - installation- multiple virtual hosts
> >>>> 
> >>>> Vizion <vizion at vizion.occoxmail.com> writes:
> >>>> Just wonder if anyone is able to suggest a way of modify  the Makefile
> >>> so as ro be able to install joomla,from /ports/www/joomla/, into a
> >>> chosen directory for a number of virtual hosts.
> >  
> >>> Maybe I'm confused (I did bang my head yesterday), but isn't that
> >>> exactly what ports(7) defines PREFIX for?  I.e., you should be able 
> >>> to set it in the environment without changing the Makefile.
> >>> 
> >> I believe you - but I know nothing about it. Does that mean 
> >> using Prefix I can tell the port to install multiple 
> >> instances of joomla each one going into a different path - 
> >> one under each virtual host root?
> 
> Yes, I think that's exactly what it means.  
> 
> >> Maybe I am missing something too- unfortunately my head 
> >> doesn't need banging for that to happen.<chuckles> If so 
> >> could you give me an example of the command?
> 
> The idea was just to set the PREFIX variable in your shell environment
> before installing to the jail.  The precise syntax depends on your
> shell, but it's just like setting any other variable.
> 
> > One further thought.. how would the installation of multiple instances affect the pkgdb?
> 
> Oh, right.  That would be a problem.  My suggestion doesn't handle it
> at a high enough level.  It looks like ports support DESTDIR, just
> like the world-building did when you installed the base system into
> the jails.  The comment from the relevant port makefile is:

Unless I'm missing something he's talking about installing into virtual
hosts as defined by his web server, not into jails.

> # DESTDIR		- The path to the environment we are installing to.  Define
> #				  this if you want to install packages into a jail
> #				  or into an another FreeBSD environment mounted
> #				  elsewhere than /.  ${PREFIX} is relative to
> #				  ${DESTDIR}.  E.g. setting DESTDIR=/bla PREFIX=/opt will
> #				  result packages installed under /bla/opt and registered
> #				  under /bla/var/db/pkg.
> #				  Default: not set (means /)
> #

You don't want to use DESTDIR for this either (again, unless I'm missing
something).  What you want to do is to do what an earlier post suggested
and re-work the port such that you can install it with a given PREFIX
and have the pkg be recorded separately for that install.  You'll want
to tweak the pkg-plist and something which gets put into the pkg-name
(PKGNAMESUFFIX as Scot suggested will work).  This way the plist has
recorded that it installed into your virtual host as opposed to it's
normal location, and the package will have a different name from other
joomla installs.

Of course upgrading will be difficult if you go that route.

Honestly, you're better off doing this in a slave port (or multiple
slave ports if you want).

-- WXS


More information about the freebsd-ports mailing list