[PC-BSD Pbi-dev] Automated PBI module building

Kris Moore kris at pcbsd.org
Mon Jun 28 10:41:15 PDT 2010


On 06/23/2010 11:22, Jesse Smith wrote:
> Hi list,
>
> I've been playing around with the idea of automating the process of
> taking a FreeBSD port and making a PBI module. There are a few snags to
> work out, but I think good progress has been made.
>
> Please find attached my first attempt at a automation process. The
> PBImaker program should be able handle simple ports.
>
> To compile PBImaker (that's my unimaginative name for the program) save
> the attachment and run
>
> tar zxf pbimaker-0.1.tar.gz
> cd PBImaker
> gmake
>
> To test PBImaker on a port run
>
> ./pbimaker /usr/port/category/port_name
>
> At the moment, PBImaker logs all of its progress and errors to stdout.
> This will be more flexible in future versions. The program does some
> tests on the environment, puts "make" into batch mode, tries to harvest
> as much data from the original port as possible and then builds the
> port. If everything goes well, PBImaker then creates a module template
> and fills in as many blanks as it can. It then cleans up after itself a
> bit, including restoring the previous "make" configuration.
>
> At the moment, PBImaker has some trouble figuring out the port's author
> and the icon for the Kmenu, but otherwise has done well on the ports
> I've used as test runs.
>
>
> Of special note, please only try to build one module at a time. PBImaker
> will probably give really weird (read: unwanted) results if multiple
> modules are built in parallel. It *can* run in serial though, so you can
> create a simple script to build multiple ports one *after* another.
>
> Your feedback is welcome,
> Jesse
>
>    

Got a chance to look at this today :)

Couple of observations:

This tool is pretty cool, but it seems to duplicate some of the work 
done by the pbi-builder scripts already. It would be cool if the tool 
simply generated the module files, and then ran buildpbi.sh <module> to 
generate the final PBI file. If it was able to parse the port files and 
just setup pbi.conf and kmenu-dir/<files> automagically then the 
pbi-builder could take it from there and build the PBI. That way you 
don't need to do another "make install" or mess with copy-files stuff, 
since pbi-builder does those steps already.



-- 
Kris Moore
PC-BSD Software
iXsystems



More information about the Pbi-dev mailing list