Call for Help: need script for patching ports tree, building with poudriere

Torsten Zühlsdorff mailinglists at toco-domains.de
Sat Nov 7 17:56:56 UTC 2015


Hello Craig,

> I've been working on some advanced scripting with Eitan Adler.
> We are interested in experimenting with integrating Jenkins + Phabricator
> using: https://wiki.jenkins-ci.org/display/JENKINS/Phabricator+Plugin
> For starters, we want to see what we can accomplish with ports.
>
> Can someone provide a script that does the following:
>
> (1)  Takes a patch file
> (2)  Applies the patch file to a checked out ports tree
> (3)  If patching fails, quit and report an error
> (4)  If patch succeeds, do a simple guess to figure out which ports were
> affected
> (5)  Create a file build.ports.txt which lists these ports, and can be used
> as input
>       to poudriere, by invoking:
>
>            poudriere bulk -f build.ports.txt
>
> (6)  In addition, run portlint, port test, and any other appropriate
> scripts to
>       test that the patched ports following the porting style guidelines.
>
> For example, if the patch in this review was submitted:
> https://reviews.freebsd.org/D3791
> then a build.ports.txt file with this content would be created:
>
>
> [List of ports]
>
> and poudriere would be invoked to build those ports.
>
> Does such a script exist?

I wrote myself a similar script, but it is very basic (and PHP).

It:
- assumes that patches are generated against /usr/ports (which makes 
applying much easier)
- apply the patches
- get the ports affected by the diff with svn diff
- runs portlint
- runs poudriere for many versions...
- reset every change made to the portstree

There are many glitches and it is not this fast, but it safe much time 
while i wrote port updates. I get a very simple report if everything is 
fine and then i submit my PR. But of course any other workflow is possible.

I aimed to support multiple poudriere server to speed up the process. 
But i have way more ideas than time... ;)

> If not, would someone by interested in working on such a script, and
> providing it
> via GitHub at https://github.com/freebsd/freebsd-ci/ ?

I will help you, but currently (which means till the end of the year) i 
am very short on time.

Are there any requirements to the script in language, performance, etc. ?

Greetings,
Torsten



More information about the freebsd-ports mailing list