Thursday, November 29, 2012

procenv now in Debian and Ubuntu: how you can use it

The procenv utility covered in a previous post is now at version 0.15 and also available in Debian Sid and Ubuntu Raring. So, you can do the usual "sudo apt-get install procenv" followed by simply "procenv" to run it. However, due to the way this utility is built, there is a little more you can do. Read on...

procenv runs itself as part of its build (at the end of course :-). What this means is that you can now see what that build environment is like by looking at the build logs:

If you haven't already heard, for the Ubuntu Raring cycle, autopkgtest (DEP-8) tests -- where package builds automatically trigger tests that run on an environment very similar to a "normal" system -- are a hot topic. procenv is DEP-8 enabled, so again, we get to see exactly what such an autopkgtest environment provides.


With this information, you can perform some rather interesting analysis:

  • See the environment a "buildd" provides.
  • Compare a buildd environment versus your "normal" workstation environment.
  • Compare a Debian buildd environment with an Ubuntu build environment.
  • Compare an Ubuntu buildd environment with an autopkgtest environment.
Where this comes in particularly useful is understanding what is going on when your package "FTBFS" (fails to build from source) even though it builds perfectly on your dev box. The same logic applies if your "make check" tests are failing on the builders. By looking at the procenv logs for the same platform and release as the package you are working on, you may find clues as to what is going on. Maybe the tests are being run as an unexpected user. Maybe the package expects a controlling terminal but isn't being given one. Maybe the limits are being set too low for your tests to perform adequately. All of this and more can be gleaned from looking at the procenv build log output.

Please report any bugs you find here.



No comments:

Post a Comment