News for hackers. Stuff that matters.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by Smaug123 on Sunday October 29, 2023 @10:03AM (#38058760)
Loads of things. Obvious ones where the decision is explicitly taken to be non-reproducible include timestamps and authorship information. There are also other places where reproducibility is implicitly broken by default: e.g. many runtimes don't define the order of entries in a hashmap, and then the compiler iterates over a hashmap to build the binary.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by londons_explore on Sunday October 29, 2023 @11:44AM (#38059637)
I can see why devs would want "This Software was built on 10/10/2007 by bob7 from git hash aaffaaff" to appear on the splash screen of software.

How do you get similar behaviour while having a reproducible build?

Can you, for example, have the final binary contain a reproducible part, and another section of the elf file for deliberately non-reproducible info?

Re:NixOS Reproducible Builds: minimal ISO successfully indep... by beisner on Sunday October 29, 2023 @12:42PM (#38060281)
if you have a reproducible build, then the notion of "software was built on date by user" is kind of useless information, no? Because it does not matter - if you can verify that a specific git hash of a codebase results in a particular binary through reproducible builds, a malicious adversary could have built it yesterday and given it to me and i can be almost surely confident (barring hash-collisions...) it's identical to a known trusted team member building it.

Having information about which git has was used, as well as the time it was published, is part of the source distribution so an output can contain references to these inputs and still be deterministic w.r.t. those inputs.

If you REALLY want to know when/who built something, you could add in an auxiliary source file which contains that information, which is required to build. Which is essentially what compilers which leverage current time do anyway, it's just implicit.

Re:NixOS Reproducible Builds: minimal ISO successfully indep... by ndriscoll on Sunday October 29, 2023 @12:52PM (#38060383)
Your source would also have to have a reference to which exact version of which compiler to use, which versions of which external headers to use, etc. and now you're inventing Nix.

Conceivably there could be a standard for a sidecar file to specify how something was built (e.g. nixpkgs commit hash, or all of the parameters that went into the build). Or content address the inputs, i.e. invent Nix again.

So we could solve this problem by having everyone standardize on using Nix.

Re:NixOS Reproducible Builds: minimal ISO successfully indep... by Smaug123 on Sunday October 29, 2023 @01:02PM (#38060482)
Such standards do exist: https://slsa.dev/spec/v1.0/provenance
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by londons_explore on Sunday October 29, 2023 @01:49PM (#38060929)
The usecase is: user wants an easy way to know, from the GUI of some running software, exactly what build/version/git commit/branch/date they're running - perhaps to file a bug report for example.

The actual build date doesn't matter if the software is reproducible - but its a proxy for 'how out of date is this software'.

Re:NixOS Reproducible Builds: minimal ISO successfully indep... by tripdout on Sunday October 29, 2023 @02:53PM (#38061461)
In that case, you can report the Git SHA and still be reproducible.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by tikhonj on Sunday October 29, 2023 @06:00PM (#38063271)
If you actually had reproducible builds, the build date would not tell you anything about how out of date the software is—you would only need the date of the source code the binary was built from. By definition, the binary you'd get from building a version of the source today would be identical to the version you'd get building it the day that version of the source was finished.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by jowea on Sunday October 29, 2023 @07:17PM (#38063835)
You can still include the git commit id and its date on the build.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by Smaug123 on Sunday October 29, 2023 @12:51PM (#38060369)
Yeah, "who built this" information belongs in a signing certificate that accompanies the build artefact, not in the artefact itself. The Git hash can certainly appear in the binary (it's a reproducible part of the build input), and the date can instead be e.g. the commit date, which is probably more relevant to a user anyway.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by bloak on Sunday October 29, 2023 @01:56PM (#38060988)
Much as I like Git, I'm not sure I like the idea of the artefacts depending on the git commit and therefore on the entire git history. I rather feel the artefacts should only depend on the actual source and not on a particular version control system used for storing the source.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by zbentley on Sunday October 29, 2023 @11:21PM (#38065328)
You're welcome to include full sources, or not-tied-to-git directions to acquire them, with your release binaries.

Regardless, whether or not you do that is a discussion of distribution format, not binary reproducibility. Your distribution can contain as much (or as little) additional material as you like along with your release binaries.

Re:NixOS Reproducible Builds: minimal ISO successfully indep... by bloak on Monday October 30, 2023 @05:38AM (#38067339)
Absolutely. I'm just stating my personal preference, that's all.
Re:NixOS Reproducible Builds: minimal ISO successfully indep... by preisschild on Monday October 30, 2023 @09:10AM (#38069052)
You can still include the git hash or a git tag/release version info, since the reproducer has the same git repo anyway.

But including timestamp of build would necessitate “spoofing” the timestamp by the reproducer to be the same as the original.