procenv and buildd environments

James Hunt james.hunt at ubuntu.com
Thu Nov 29 19:32:07 UTC 2012


The procenv utility [1], which provides information on the environment
it runs in, is now available in Debian Sid [2] and Ubuntu Raring [3].

As part of its package build, 'make check' gets run which does the
following:

(1) Dumps information on the C pre-processor, compiler and linker.
(2) Runs procenv itself.

Step (1) is an aid to (2) in case it should fail. (2) is
useful since it:

- Helps to ensure the package works as expected once installed [*].
- Is a good check that procenv can handle 'odd' environments such as
  those provided by chroots (which are unusual in that their libc version
  often does not align with the provided kernel version).

The readily accessible build logs for procenv itself ([4], [5], [6]) may
in some circumstances help with FTBFS and test failure issues with
_other_ packages since they provide an insight into the environment in
which a package is built.

Using the build logs, informative analysis can be performed:

- See the environment a buildd provides.
- Compare a 'normal' environment with a buildd-provided one.
- Compare a Debian buildd environment to an Ubuntu one.

There are other examples and ideas in the initial blog post and the man
page.

[*] - Note that procenv also has DEP-8 support such that the
autopkgtest-provided environment can also be inspected [7]. The plan is to also
enable Ubuntu PPA builds, again for comparative purposes.

If anyone is interested in adding additional features to procenv, see
the TODO and please let me know.

Kind regards,

James.

[1] - https://launchpad.net/procenv
[2] - http://packages.debian.org/sid/procenv
[3] - http://packages.ubuntu.com/raring/procenv
[4] - https://buildd.debian.org/status/package.php?p=procenv&suite=sid
[5] - http://buildd.debian-ports.org/status/package.php?p=procenv
[6] - https://launchpad.net/ubuntu/+source/procenv (expand version 'twistie' for
build logs)
[7] -
https://jenkins.qa.ubuntu.com/view/Raring/view/AutoPkgTest/job/raring-adt-procenv/

--
James Hunt
____________________________________
http://upstart.ubuntu.com/cookbook
http://upstart.ubuntu.com/cookbook/upstart_cookbook.pdf



More information about the ubuntu-devel mailing list