[buildd-tools-devel] Bug#551311: Bug#551311: Bug#551311: Please provide debuild like functionality for sbuild

Andres Mejia mcitadel at gmail.com
Tue Oct 20 00:07:08 UTC 2009


On Monday 19 October 2009 19:10:21 Roger Leigh wrote:
> On Sun, Oct 18, 2009 at 11:57:24PM -0400, Andres Mejia wrote:
> > tags 551311 patch
> > thanks
> >
> > Here's a preliminary patch to provide an sbulid-debuild script that
> > provides debuild like functionality for sbuild. I thought it may be
> > better to seperate this functionality from a run of sbuild. Also, instead
> > of actual patches, I've
> 
> Many thanks.  I've committed the three files as they stand, but they
> are not yet tied into the build scripts or packaged, since they do
> need some further work.
> 
> Some initial comments:
> 
> 1) Command-line options.
>    I think it would be appropriate to mimic the exact options that
>    debuild does, and then add sbuild-specific options with e.g.
>    --sbuild-<option> which can then be passed through to sbuild as
>    --<option> (or set via Sbuild::Conf).
> 
> 2) dpkg-buildpackage invocation.
>    Can't we just clean the tree and run dpkg-source directly?  I'm
>    not sure I see the need to do a full build of a package just
>    to generate a source package
> 
> 3) sbuild invocation.
>    Why?  The module Sbuild::Build is there to be used for this purpose.
>    If you are implementing an alterative interface to sbuild, then
>    just include and use the module like bin/sbuild does.
> 
> 4) Features useful for sbuild:
>    - building in source tree (dpkg-source package generation)
>    - running commands before build
>    - running commands after build (lintian)
>    While implemented in sbuild-debuild, these features would also be
>    useful in the regular sbuild as well, IMO.  I've long wanted to
>    create pre- and post-build hook scripts to be run before and after
>    a build.
> 
> 5) Use of chdir.
>    I'm not sure I'm too keen on 'chdir($build_input)'.  Does this
>    mirror debuild's tree walk to find debian/changelog?
>    In general, I think we should mimic the dpkg-buildpackage/debuild
>    behaviour here.  If no .dsc or source is specified, then find
>    debian/changelog and run dpkg-source.  Do any existing tools allow
>    the build directory as an argument?
> 
> So in principle I'm not against the idea, but I do think a number of
> the features would do better in the core library code than as a
> separate program, and if we are calling it sbuild-debuild, I think
> we should emulate debuild behaviour exactly, including options.
> 
> 
> Regards,
> Roger
> 

Well, with this, I now think it's better to extend sbuild and the library code 
instead of creating a seperate program. I suppose this would have the benefit 
of providing more features for sbuild (as noted by comment 4), and would allow 
taking advantage of getting everything logged by sbuild directly (comment 3). 
With this I could also avoid having to mimic every option of debuild (comment 
1), use dpkg-source directly (comment 2), and supply a directory to dpkg-
source directly (comment 5).

-- 
Regards,
Andres





More information about the Buildd-tools-devel mailing list