[buildd-tools-devel] Bug#790354: sbuild: please allow to pass a custom configuration file

Johannes Schauer josch at debian.org
Sun Jun 28 12:56:27 UTC 2015


Package: sbuild
Version: 0.65.2-1
Severity: wishlist
Tags: patch

Hi,

it would be great if it were possible to pass a custom configuration
file location to sbuild. Currently, only /etc/sbuild/sbuild.conf as well
as ~/.sbuildrc are used. This means that if one wants to maintain
different profiles to do different kind of builds on the same machine,
then one would either have to create new user or chroot for every sbuild
profile, or copy different configuration files around or switch a
symlink in ~/.sbuildrc to point to the correct file. The latter is also
undesirable because it means that one cannot do several builds with
different configuration options at the same time. And passing
configuration options via the command line instead of the configuration
file is not always an option because either the option can currently
only be set in the configuration file or because the option itself are
many or very long.

A practical example for which it would be useful to maintain more than
one configuration file at a time would be to test the reproducibility of
source packages. In that situation, the user will want to have at least
three configuration files. One to do regular builds (that one would be
in ~/.sbuildrc) and two for reproducible builds. The latter two would
then be responsible for setting environment variables like
DEB_BUILD_OPTIONS, TZ, LANG and LC_ALL as well as run dpkg-buildpackage
in a wrapper of `linux64 --uname-2.6` and `unshare --uts` so that they
differ between the two builds.

With my attached patch and a proper sbuildrc, testing reproducibility in
practice would then be as simple as doing:

$ cd build1 && SBUILD_CONFIG=$HOME/sbuildrc1 sbuild ../package.dsc
$ cd build2 && SBUILD_CONFIG=$HOME/sbuildrc2 sbuild ../package.dsc

Thanks!

cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-allow-custom-configuration-file-through-SBUILD_CONFI.patch
Type: text/x-diff
Size: 1779 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20150628/4a2fd50d/attachment.patch>


More information about the Buildd-tools-devel mailing list