[PC-BSD Pbi-dev] How to make a PBI with a combination of ports?

Fabrizio Parrella fabrizio at bibivu.com
Mon Feb 13 09:53:00 PST 2012


Sorry if I am trying to suggest things even if I am kind of new on 9.0 
and the new PBIs, but it seems to me that you need to add a custom 
script when starting stopping apache as well as when you add the 
configuration:

something like (pseudocode):
INSTALLATION:
  - Add config to Apache/PHP httpd.conf  and to MySQL (create the new 
user for phpMyAd)
  - if Apache PBI exists, add same config changes to its httpd.conf

STARTUP
  - if Apache PBI exists, do not start Apache/PHP PBI


I would suggest to create a PBI with apache, mysql, php, phpMyAdmin, and 
add the two simple "IF"

Maybe even check if apache or mysql are installed with a simple:
  - `which mysql`
  - `which httpd`

Fabry




On 02/13/2012 12:40, Jeff wrote:
> Thanks, I was able to build the PBI with Apache and PHP.
>
> The problem now is that I wanted to include the same services scripts 
> as found in the Apache PBI for start up and other stuff.  Plus I need 
> a custom config file for phpmyadmin for initial setup, and want to 
> modify httpd.conf with a script to include an alias for phpmyadmin.
>
> No big deal, but it occurred to me that running the Apache PBI and 
> PhpMyAdmin PBI that also includes Apache, would conflict unless I 
> configure it to listen on a different port, which is a pain.
>
> Right now, with the Apache PBI, you access the server at 
> http://localhost/index.html, so another server running would have to 
> be http://localhost:8080/phpmyadmin or something like that.
>
> Is there another way to deal with that potential conflict?  What if 
> the 2nd Apache installation used a virtual host setup - would that work?
>
> If I want to include the services scripts and any other custom 
> scripts, do I just add them in the pbi.conf?  I sort of concluded that 
> by looking at pbi.conf for the Apache PBI.
>
> Maybe it would just be easier to add PhpMyAdmin to the Apache PBI. It 
> might make more sense anyway, to include PHP, and possibly even MySQL, 
> since most people will want those too.
>
> Just curious, if someone added PHP, etc to the Apache PBI environment, 
> after the PBI was installed, what would happen to those additions when 
> the PBI got updated?
>
> Thanks,
>
> Jeff
>
>     ------------------------------------------------------------------------
>     *From:* Ken Moore <ken at pcbsd.org>
>     *To:* pbi-dev at lists.pcbsd.org
>     *Sent:* Monday, February 13, 2012 9:55 PM
>     *Subject:* Re: [PC-BSD Pbi-dev] How to make a PBI with a
>     combination of ports?
>
>     On 02/13/2012 06:09, Hakisho Nukama wrote:
>     > Am 13. Februar 2012 10:21 schrieb Jeff<dejamuse at yahoo.com
>     <mailto:dejamuse at yahoo.com>>:
>     >> I don't think Easy PBI is setup to work with metaports since as
>     you say
>     >> they're just a collection of dependencies.
>     >>
>     >> I couldn't find any metaport for Apache, PHP, and PhpMyAdmin,
>     in any case.
>     >> I would have to make one.  I believe this is the way to do it:
>     >> /usr/ports/ports-mgmt/wanted-ports/
>     >>
>     >> I could build the PBI manually without using Easy PBI, but I'm
>     lazy and I
>     >> figure other people will want to combine existing ports into a
>     single PBI at
>     >> some point as well.
>     >>
>     >>
>     >> ________________________________
>     >> From: arrowdodger<6yearold at gmail.com <mailto:6yearold at gmail.com>>
>     >> To: Jeff<dejamuse at yahoo.com <mailto:dejamuse at yahoo.com>>
>     >> Cc: "pbi-dev at lists.pcbsd.org
>     <mailto:pbi-dev at lists.pcbsd.org>"<pbi-dev at lists.pcbsd.org
>     <mailto:pbi-dev at lists.pcbsd.org>>
>     >> Sent: Monday, February 13, 2012 5:06 PM
>     >> Subject: Re: [PC-BSD Pbi-dev] How to make a PBI with a
>     combination of ports?
>     >>
>     >> On Mon, Feb 13, 2012 at 1:52 PM, Jeff<dejamuse at yahoo.com
>     <mailto:dejamuse at yahoo.com>>  wrote:
>     >>
>     >> In order to build a PBI for PhpMyAdmin, I need to include a
>     webserver like
>     >> Apache, Nginx, or Lighttpd, and PHP.
>     >>
>     >> It doesn't seem like EasyPBI is setup to build a PBI from
>     multiple ports.
>     >>
>     >> Can anyone explain how to do this?
>     >>
>     >>
>     >> Let me guess - you need to create meta-port for this. Meta-port
>     is a simple
>     >> port, which doesn't install anything, but depends on some other
>     ports.
>     >>
>     >>
>     >>
>     >> _______________________________________________
>     >> Pbi-dev mailing list
>     >> Pbi-dev at lists.pcbsd.org <mailto:Pbi-dev at lists.pcbsd.org>
>     >> http://lists.pcbsd.org/mailman/listinfo/pbi-dev
>     >>
>     > Specify each additional port for your PBI in pbi.conf with
>     following excerpt
>     > from http://wiki.pcbsd.org/index.php/PBI_Module_Builder_Guide and
>     > make sure a used variable is exported.
>     >
>     > # Ports to build before / after
>     > PBI_MKPORTBEFORE=""
>     > PBI_MKPORTAFTER="audio/esound x11-fonts/dejavu
>     x11-themes/qtcurve-gtk2
>     > devel/gconf2 www/firefox-i18n"
>     > _______________________________________________
>     > Pbi-dev mailing list
>     > Pbi-dev at lists.pcbsd.org <mailto:Pbi-dev at lists.pcbsd.org>
>     > http://lists.pcbsd.org/mailman/listinfo/pbi-dev
>
>     Hakisho Nukama is correct,
>     If a program has an additional dependency that is not listed in
>     the port
>     (or you want to simply package another port with the program)  you
>     just
>     need to add that port to the PBI_MKPORTAFTER line in pbi.conf
>     within the
>     module. EasyPBI is not setup to edit the pbi.conf file yet (it is
>     on my
>     list of things to add) so you will have to do it by hand.
>
>     You may also run into programs that will not build as PBI's due to
>     missing build dependencies in the port, this can be solved the
>     same way:
>     add the desired port to the PBI_MKPORTBEFORE line in pbi.conf in
>     order
>     to ensure that the desired port is included with the main program
>     before
>     the main program builds.
>
>     -- 
>     ~~ Ken Moore ~~
>     PC-BSD/iXsystems
>
>     _______________________________________________
>     Pbi-dev mailing list
>     Pbi-dev at lists.pcbsd.org <mailto:Pbi-dev at lists.pcbsd.org>
>     http://lists.pcbsd.org/mailman/listinfo/pbi-dev
>
>
>
>
> _______________________________________________
> Pbi-dev mailing list
> Pbi-dev at lists.pcbsd.org
> http://lists.pcbsd.org/mailman/listinfo/pbi-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pcbsd.org/pipermail/pbi-dev/attachments/20120213/1a3b8891/attachment.html>


More information about the Pbi-dev mailing list