Why you need mass package rebuilds in some circumstances

September 13, 2012

In the previous entry, I mentioned that sometimes you need to rebuild a package for reasons unrelated to any changes to it; the example I gave was rebuilding packages due to fixing a code (mis)generation bug in your compiler. This may sound obscure, but in fact situations like this are more common than you might think. You really should be rebuilding packages after any significant change to the basic toolchain and compilation environment, such as a significant new version of GCC. It's also a good policy to build all of your packages for a distribution with the version of the compiler and basic environment that will ship with the distribution instead of carrying over binary packages from past versions of your distribution.

The core reason for this is not to pick up fixes and improvements in the compiler et al, but to make sure that your packaging is reproduceable. As an extreme example, suppose that you move from GCC 4.x to GCC 5.x in the new version of your distribution and that GCC 5.x is pickier about some things in people's code that GCC 4.x silently accepted. If you carry over old binary packages built on previous versions of your distribution instead of rebuilding everything, you may be shipping packages for your new version that can't be rebuilt on it because their source contains something that GCC 5.x no longer accepts.

Rebuilding when the compilation environment changes means that you know that you actually can build all packages from source on a current system. Shipping the result lowers the chance that previously unseen code generation problems are lying there waiting to surface the moment you have to rebuild and ship the package for some other reason.

(Here's a scenario that should like fun. Suppose that you have an old binary package compiled with an old compiler version. You get a bug report for the package, patch the source to make what you think is a fix, rebuild the package (which uses the current compiler), and ship it. Unknown to you, the current version of the compiler has a bug where it mis-compiles one part of the program. Shortly after you ship the update, you start getting reports that your update broke things; in fact, it seems to have broken things that look totally unrelated to your change. Good luck on tracking that problem down, especially if it only affects a small subset of users.)

Written on 13 September 2012.
« The core problem with developers doing their own packaging
What determines how much work a ZFS resilver has to do »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Thu Sep 13 01:27:05 2012
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.