~canonical-launchpad-branches/launchpad-buildd/trunk

« back to all changes in this revision

Viewing changes to sbuildrc

  • Committer: Colin Watson
  • Date: 2017-07-18 15:55:57 UTC
  • mto: This revision was merged to the branch mainline in revision 250.
  • Revision ID: cjwatson@canonical.com-20170718155557-xvrhtt96dwcp37g5
Configure sbuild to use schroot sessions rather than sudo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
$resolve_alternatives = 1;
18
18
 
19
 
# Also let LANG through to subprocesses, or sudo will set it to
20
 
# /etc/default/locale on the host, which probably doesn't exist in the
21
 
# chroot. sbuild-package invokes sbuild with LANG=C, which is what we
22
 
# want.
 
19
$build_environment = {
 
20
    # sbuild sets LC_ALL=C.UTF-8 by default, so setting LANG as well should
 
21
    # be redundant, but do so anyway for compatibility.
 
22
    'LANG' => 'C.UTF-8',
 
23
    # It's not clear how much sense this makes, but sudo set this as a
 
24
    # fallback default, so keep it for compatibility.
 
25
    'TERM' => 'unknown',
 
26
    # A number of build systems (e.g. automake, Linux) use this as an
 
27
    # indication that they should be more verbose.
 
28
    'V' => '1',
 
29
};
 
30
 
 
31
# We want to expose almost nothing from the buildd environment.
 
32
# DEB_BUILD_OPTIONS is set by sbuild-package.
23
33
$environment_filter = [
24
 
    '^PATH$',
25
 
    '^DEB(IAN|SIGN)?_[A-Z_]+$',
26
 
    '^(C(PP|XX)?|LD|F)FLAGS(_APPEND)?$',
27
 
    '^USER(NAME)?$',
28
 
    '^LOGNAME$',
29
 
    '^HOME$',
30
 
    '^TERM$',
31
 
    '^SHELL$',
32
 
    '^LANG$'];
 
34
    '^DEB_BUILD_OPTIONS$',
 
35
    ];
33
36
 
34
 
# We need to use "sudo -E" so that the above environment variables are
35
 
# allowed through.
36
 
$sudo = "/usr/share/launchpad-buildd/slavebin/sudo-wrapper";
 
37
# We're just going to throw the chroot away anyway.
 
38
$purge_build_deps = 'never';
37
39
 
38
40
# After that time (in minutes) of inactivity a build is terminated.
39
41
# Activity
40
42
# is measured by output to the log file.
41
43
$stalled_pkg_timeout = 150;
42
44
 
43
 
$chroot_mode="sudo";
44
45
$sbuild_mode="buildd";