[Buildd-tools-devel] Bug#500746: Bug#500746: feature request: use pre-existing schroot or run early script hook

Kees Cook kees at debian.org
Thu Feb 19 01:08:25 UTC 2009


Hi Roger,

On Thu, Oct 02, 2008 at 12:36:34AM +0100, Roger Leigh wrote:
> OK.  I think calling external scripts here would be a good idea.  We
> could use run-parts to run all the scripts in e.g. /etc/sbuild/setup.d,
> for example, in a similar manner to the schroot setup scripts, but with
> all of the relevant sbuild state exported in the environment.  This
> would make it trivially extensible by users and other packages.

I'm finally getting back to looking at this.  It does seem likely that
system-wide setup scripts could be good, but I'm not sure the specific
use-case I'm after would really be done here (for example, I don't want to
do this for Debian builds, only Ubuntu builds).  It doesn't seem right to
make those choices in /etc/sbuild/setup.d/something is the right place --
i.e. it should really be up to the sbuild invoker.

> Agreed.  If you haven't already, you might be interested in looking at
> the current sbuild in git:
> 
>   git://git.debian.org/git/buildd-tools/sbuild.git
> 
> Here, the main build state, configuration, chroot information etc. have
> all been object-oriented using perl objects.  We can easily write a few
> lines of perl to dump the object state into the environment so scripts
> can access it.  This would only be possible for scalar and perhaps array
> values realistically, but it would give you all you need to do what you
> want.

Where should this happen?  My particular use-case seems to need details
from both $build and $options.  Should exec_command export all of those
values into the environment in addition to the stuff listed in
Defaults->ENV?  SBUILD_BUILD_...  and SBUILD_OPTION_...  ?

I've updated the patch (untested...) to use all the new calling conventions
in git, just for reference...

Thanks!

-Kees

-- 
Kees Cook                                            @debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbuild-setup-script.patch
Type: text/x-diff
Size: 2065 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20090218/1f77cb49/attachment.patch 


More information about the Buildd-tools-devel mailing list