[buildd-tools-devel] Bug#567419: Bug#567419: generic hook framework

Andres Mejia mcitadel at gmail.com
Mon Aug 16 00:49:49 UTC 2010


On Thursday 28 January 2010 18:44:02 martin f krafft wrote:
> Package: sbuild
> Version: 0.59.0-1
> Severity: wishlist
> 
> It would be awesome if sbuild had a generic hook framework (e.g.
> run-parts directories, passing all kinds of information to the
> scripts in the environment) which would allow me to plug scripts in
> at various stages.
> 
>   - After entering the chroot
>   - After fetching the sources
>   - After installing the build-deps
>   - After unpacking the source
>   - After the build has failed
>   - After the build has completed successfully
> 
> Non-zero returns from those hooks could drop the user into a $SHELL
> if stdin is connected to a tty, or otherwise just tear down the
> chroot.
> 
> Stderr from those hooks should probably go into the sbuild log.

I've been working on something similar to this (check bug #551311). The 
"hooks" support I've implemented is implemented in a way where sbuild would 
run a set of commands that a user would specify (currently before and after a 
build). These commands can be run with arguments and there's support for 
adding percent escaped arguments like '%c' which converts to the path of a 
resulting *.changes file that is generated from a build.

It's currently work in progress, so some of the features you've mentioned are 
not there. For example, I haven't looked into manipulating the environment so 
the commands that are run can take advantage of them, nor have I looked into 
supporting running commands at other places during a build. I'm currently 
waiting on Roger to review and commit the patches that I've submitted so far.

-- 
Regards,
Andres Mejia





More information about the Buildd-tools-devel mailing list