[Reproducible-builds] Bug#778571: sbuild: predictible build location for reproducible builds

2015-04-07 Thread Benjamin Drung
Am Freitag, den 03.04.2015, 10:47 -0400 schrieb Daniel Kahn Gillmor:
 On Fri 2015-04-03 06:46:07 -0400, Holger Levsen wrote:
  I like /usr/src/debian/$packagename-$random where $random are 4 or 8 
  alphanumberic characters, as there might be situations where one wants to 
  build the same package (+version+suite) simultaneously on the same host.
 
  Thinking further, /usr/src/debian/$packagename_$version_$random might be 
  better.
 
 Holger's proposal here seems to be in direct opposition to the stated
 goal of #778571, which is to have the directory and path be precisely
 predictable.  How do we get these goals to align?

I propose /usr/src/debian/$package/$version as path. To support
simultaneous builds of the same version, sbuild should bind mount that
directory. What do you think?

-- 
Benjamin Drung
System Developer

ProfitBricks GmbH - The IaaS-Company
Greifswalder Str. 207
D - 10405 Berlin

Mail: benjamin.dr...@profitbricks.com
Fax:  +49 30 577 008 598
URL:  http://www.profitbricks.com

Sitz der Gesellschaft: Berlin.
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B.
Geschäftsführer: Andreas Gauger, Achim Weiss.


signature.asc
Description: This is a digitally signed message part
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

[Reproducible-builds] Bug#778571: sbuild: predictible build location for reproducible builds

2015-02-16 Thread Vagrant Cascadian
Package: sbuild
Version: 0.65.0-1
Severity: wishlist
Tags: patch

Thanks for maintaining sbuild!

In order to use sbuild for reproducible builds, the build dir needs to
be consistent across rebuilds, but sbuild currenty generates a
randomly named build dir.


The following proof-of-concept patch does this by setting the build
dir to /build/PACKAGE-VERSION rather than /build/PACKAGE-XX:

From 15b77405a67faaea7bc3974a4e7a3862620d0b42 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian vagr...@debian.org
Date: Fri, 13 Feb 2015 23:18:23 -0800
Subject: [PATCH 1/2] Make predictible build dir location based on the package
 version.

---
 lib/Sbuild/Build.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Sbuild/Build.pm b/lib/Sbuild/Build.pm
index 155e4fc..5149a8a 100644
--- a/lib/Sbuild/Build.pm
+++ b/lib/Sbuild/Build.pm
@@ -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') . '-XX',
-  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')));
 
-- 
2.1.4


This patch is really only a small step forward, making the build dir
consistent only when building with sbuild. Ideally, the build dir
should be set to /usr/src/debian/PACKAGE-VERSION (or some other widely
agreed upon dir) so that builds would be reproducible if built with
other tools such as pbuilder using the same build dir.

Making the build dir configurable might also help...


live well,
  vagrant

-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (500, 'testing'), (120, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages sbuild depends on:
ii  adduser 3.113+nmu3
ii  apt-utils   1.0.9.6
ii  libsbuild-perl  0.65.0-1
ii  perl5.20.1-5
ii  perl-modules5.20.1-5

Versions of packages sbuild recommends:
ii  debootstrap  1.0.66
ii  fakeroot 1.20.2-1

Versions of packages sbuild suggests:
pn  deborphan  none
ii  wget   1.16-1

-- no debconf information


signature.asc
Description: PGP signature
___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds