Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Nov 2015 18:28:38 +0100
From:      =?UTF-8?Q?Torsten_Z=c3=bchlsdorff?= <mailinglists@toco-domains.de>
To:        Craig Rodrigues <rodrigc@FreeBSD.org>, "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, ports <freebsd-ports@freebsd.org>
Subject:   Re: Call for Help: need script for patching ports tree, building with poudriere
Message-ID:  <563E34C6.9010500@toco-domains.de>
In-Reply-To: <CAG=rPVcOb4g9DD08c7vAsor8UMf3GnckAJ2wkO37p8Ao3G2GwA@mail.gmail.com>
References:  <CAG=rPVcOb4g9DD08c7vAsor8UMf3GnckAJ2wkO37p8Ao3G2GwA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?563E34C6.9010500>