[buildd-tools-devel] Bug#655215: Bug#655215: Bug#655215: sbuild: Do not do run "fakeroot ./debian/rules clean" before building source

Roger Leigh rleigh at codelibre.net
Mon Jan 9 13:35:09 UTC 2012


On Mon, Jan 09, 2012 at 01:37:43PM +0100, Daniel Dehennin wrote:
> Roger Leigh <rleigh at codelibre.net> writes:
> 
> > When you run dpkg-buildpackage, it also runs debian/rules clean
> > prior to running dpkg-source -b to pack up the source package.  sbuild
> > is simply copying the behaviour of dpkg-buildpackage here.  From what
> > I understand, if we omit the clean, we would potentially pack up a
> > dirty source tree.  We don't build the source tree directly--it's a
> > requirement that we pack it up prior to building.
> >
> > I think it's important to point out that sbuild itself /does not
> > build source trees/.  It builds Debian packages from a .dsc.  I.e.
> > from a Debian source package.  If you run sbuild with a .dsc or
> > package_version rather than a directory, it will do all its work
> > inside the chroot.  Part of the job of sbuild is doing clean builds
> > of packages; you can't do a clean build starting from a dirty tree.
> 
> I'm ok with doing "dpkg-source -b" on a clean tree.
> 
> My use case is to automate the building from a VCS (git actually):
> 
> - I tag a version to be build
> - I push the tag
> - The post-receive hook trigger the build system
> - The build system pull the git tree
> - The build system run "git-buildpackage"
> 
> The source tree must be clean on the build system, or there is some
> files under VCS which should not.

In this situation, I guess there are two possibilities:

1) You run "dpkg-source -b" yourself, then run sbuild with the
   resulting .dsc.  This won't require any changes to sbuild directly.

2) We add an option to sbuild to permit cleaning of the tree to be
   skipped.  I guess we can add -nc like for dpkg-buildpackage.

It depends on whether (1) is too much of an inconvenience.  But it's
certainly possible to do (2).


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.





More information about the Buildd-tools-devel mailing list