Prompted by the announcement of reproducible builds status, I took a
look at a few of my packages and started testing with sbuild... which
apparently needs a few patches to get reproducible builds working...

I've got a couple brief proof-of-concept patches.

One patch sets the build dir to a static location based on the package
version, rather than a tempdir with a random string.

The other patch ignores .buildinfo files in the .changes when displaying
package contents. Without it, the build status gets set to "attempted"
and is treated as a failed build:

  dpkg-deb: error: 
`/«CHROOT»/«BUILDDIR»/ltsp_5.5.4-4~20150213~1_amd64.buildinfo' is not a debian 
format archive

Both patches can surely be improved upon.

commit 8468411099b8ec28641df015742784b63b98b573
Author: Vagrant Cascadian <>
Date:   Fri Feb 13 23:51:11 2015 -0800

    Ignore .buildinfo files produced by reproducible builds.

diff --git a/lib/Sbuild/ b/lib/Sbuild/
index 5149a8a..f15e94a 100644
--- a/lib/Sbuild/
+++ b/lib/Sbuild/
@@ -1768,6 +1768,8 @@ sub build {
        foreach (@debcfiles) {
            my $deb = "$build_dir/$_";
            next if $deb !~ /(\Q$host_arch\E|all)\.[\w\d.-]*$/;
+           # ignore .buildinfo files produced by reproducible builds.
+           next if $deb =~ /\.*buildinfo$/;
            if (!open( PIPE, "dpkg --info $deb 2>&1 |" )) {

commit 15b77405a67faaea7bc3974a4e7a3862620d0b42
Author: Vagrant Cascadian <>
Date:   Fri Feb 13 23:18:23 2015 -0800

    Make predictible build dir location based on the package version.

diff --git a/lib/Sbuild/ b/lib/Sbuild/
index 155e4fc..5149a8a 100644
--- a/lib/Sbuild/
+++ b/lib/Sbuild/
@@ -396,8 +396,8 @@ sub run_chroot_session {
        # TODO: Don't hack the build location in; add a means to customise
        # the chroot directly.  i.e. allow changing of /build location.
        $self->set('Chroot Build Dir',
-                  tempdir($self->get('Package') . '-XXXXXX',
-                          DIR =>  $session->get('Location') . "/build"));
+                  $session->get('Location') . "/build/" . 
$self->get('Package') . "-" . $self->get('Version'));
+       mkdir $self->get('Chroot Build Dir');
        $self->set('Build Dir', $session->strip_chroot_path($self->get('Chroot 
Build Dir')));

Thanks for your work towards reproducibility!

live well,

p.s. not (yet) subscribed to list, so if you need me to respond, please
CC me.

Attachment: signature.asc
Description: PGP signature

Reproducible-builds mailing list

Reply via email to