[buildd-tools-devel] Bug#777204: sbuild is unable to handle source packages with build dependencies using the :native architecture qualifier

Johannes Schauer josch at debian.org
Fri Feb 6 12:13:33 UTC 2015


Hi,

On Fri, 06 Feb 2015 10:33:06 +0100 Johannes Schauer <josch at debian.org> wrote:
> currently sbuild will not allow building source packages using the :native
> architecture qualifier as specified in [1]. This is because it will copy any
> foo:native build dependency into the dummy binary package it creates and the
> :native architecture qualifier is not allowed in binary package dependencies.

the :native architecture qualifier is not in policy and neither is the rest of
multiarch. So I'll show that apt and dpkg understand the qualifier and how this
patch fixes the problem for sbuild.

Firstly, to convince yourself that apt and dpkg understand it, do the
following on an amd64 system with apt (= 1.0.9.6) and dpkg-dev (= 1.17.23):

	$ apt-get build-dep --simulate -t unstable botch
	NOTE: This is only a simulation!
	      apt-get needs root privileges for real execution.
	      Keep also in mind that locking is deactivated,
	      so don't depend on the relevance to the real current situation!
	Reading package lists... Done
	Building dependency tree       
	Reading state information... Done
	Selected version '0.5-1~experimental1' (unstable) for botch
	0 upgraded, 0 newly installed, 0 to remove and 249 not upgraded.

apt is able to fulfill the build dependencies of the package botch which (for
testing purposes) build depends on python3-yaml:native:

	$ apt-cache showsrc botch | grep :native
	Build-Depends: debhelper (>= 9), ocaml-nox, camlp4, python3, graphviz, markdown, ocaml-findlib, libextlib-ocaml-dev, libocamlgraph-ocaml-dev, libatdgen-ocaml-dev, libxmlm-ocaml-dev, libdose3-ocaml-dev (>= 3.3), dose-builddebcheck (>= 3.3), dose-extra (>= 3.3), dctrl-tools, aspcud, python3-apt, python3-debian, python3-networkx, python3-yaml:native, pep8, pyflakes

next, check that dpkg-checkbuilddeps understand the syntax:

	$ apt-get source botch
	$ sudo apt-get build-dep botch # notice how it installs python3-yaml:amd64
	$ cd botch-0.5
	$ grep :native debian/control
	 python3-yaml:native,
	$ dpkg-checkbuilddeps && echo success
	success

Building the package with dpkg-buildpackage will succeed but building with
sbuild (without my patch) will fail because of the following merged build
dependencies of the produced dummy package:

	Merged Build-Depends: base-files, ..., python3-yaml:native, pep8, pyflakes

The :native architecture qualifier is invalid for binary package dependencies,
so apt will (correctly) fail to satisfy the dependencies of the
sbuild-build-depends-botch-dummy package.

With my patch, the binary package will have the :native stripped:

	Merged Build-Depends: base-files, ..., python3-yaml, pep8, pyflakes

and the build will succeed. In a cross-build scenario, the build architecture
would be appended as a qualifier but this is not relevant for the buildds which
only do native builds. In this case, stripping :native is sufficient.

You can also see that the only part of the build infrastructure which rejects
the :native qualifier is sbuild by looking at the buildd status for botch in
experimental:

https://buildd.debian.org/status/package.php?p=botch&suite=experimental

You see that the package alternates between needs-build (because dose3
understands the :native qualifier and can satisfy the source package
dependencies) and bd-uninstallable (because sbuild fails).

In conclusion, it seems that the only missing piece to support uploads of
source packages with the :native architecture qualifier to unstable is sbuild.

Thanks!

cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20150206/7d8d27a5/attachment.sig>


More information about the Buildd-tools-devel mailing list