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

Daniel Dehennin daniel.dehennin at baby-gnu.org
Mon Jan 9 12:37:43 UTC 2012


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.

That's the reason I asked for an option to disable the clean.

[...]

> We could potentially copy the entire unpacked tree into the chroot.
> But internally sbuild only deals with .dsc files; we need a .dsc
> to get the build-deps and the other metadata required for the build.
> While it would technically be possible to also obtain the information
> from debian/control, this would introduce multiple codepaths to do
> the same thing, and the new codepaths would be untested and would be
> used far less than the existing ones.

I assume it was done like this and I'm ok with that behaviour, my only
concern is about running the clean outside the schroot.

Regards.

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1





More information about the Buildd-tools-devel mailing list