3

Are Ubuntu builds deterministic? I assumed they are, that is, if I recreate the process of building Ubuntu installation media, I will get the same image, (bit-for-bit, with the same checksums) as the one on the Ubuntu mirrors.

Recent post by Joanna Rutkowska (lead developer of Qubes OS distro) suggests that it isn't so:

currently most projects, including all Linux distributions, do not build deterministically

Why not?

8
  • Asking "why not?" is subjective, and each question should only be one question, so i've removed that extra bit from your question.
    – dobey
    May 1, 2015 at 16:20
  • 1
    possible duplicate of Will Ubuntu work with reproducible builds?
    – dobey
    May 1, 2015 at 16:21
  • 1
    @dobey I actually thought there might be the exact objective reason(s) "why not?", that's why I included this and as a single question, too. May 1, 2015 at 17:05
  • @dobey I see no reason why "Why not?" would be any less objectively answerable, in this case, than the rest of the question. This question is asking if they are deterministic, and, if not, then what makes them not deterministic. I have rolled back your edit. May 2, 2015 at 21:32
  • @EliahKagan The words "why not?" tend to invite subjective criticism, rather than objective statements.
    – dobey
    May 2, 2015 at 22:58

2 Answers 2

2

No they're not. Let's clarify a distinction here,

  • Does the system support "reproducible builds"?

    Yes all systems support packages that are deterministic.

  • Does the system enforce "reproducible builds"?

    Nope, though it does help diagnose problems, and works is being done to make packages reproducible -- bugs are being reported and handled anyway.

  • Is everything, without exception, reproducible?

    Not even close.

Now let's define "reproducible builds"

A build is reproducible if given the same source code, build environment and build instructions, any party can recreate bit-by-bit identical copies of all specified artifacts.

The relevant attributes of the build environment, the build instructions and the source code as well as the expected reproducible artifacts are defined by the authors or distributors. The artifacts of a build are the parts of the build results that are the desired primary output.

Now let's talk about what is required

Check out this page under "How" which lays down three criteria

  1. the build system needs to be made entirely deterministic: transforming a given source must always create the same result. Typically, the current date and time must not be recorded and output always has to be written in the same order.

  2. the set of tools used to perform the build and more generally the build environment should either be recorded or pre-defined.

  3. users should be given a way to recreate a close enough build 3., perform the build process, and verify that the output matches the original build.

You can find more documentation about all of that here.

As to why Ubuntu isn't currently reproducible, things like Perl currently fail because -V stores the compiler args for convenience -- they're waiting on GCC to patch this upstream. A lot of this functionality could simply nuked. Some other problems: some man pages and programs have the build dates compiled in, others compile in mutable paths to shared libraries and the like.

Not being reproducible isn't a problem or a vulnerability. It just makes it harder to verify that you haven't been tampered with, and currently that functionality is being viewed as more valuable.

You can follow Debian's progress towards determinism here

-1

For starters, I don't think Rutkowska was talking about building installation media deterministically, but about packages (deb, rpm).

Debian is working on building packages reproducibly (https://wiki.debian.org/ReproducibleBuilds) but there are still lots of packages that don't build that way...

Building a whole distribution deterministically surely is even more of a challenge.

1
  • This is why I voted it a duplicate of the question about reproducible builds which has already been answered.
    – dobey
    May 2, 2015 at 22:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .