Questions tagged [binary-reproducibility]

the goal or quality of consistently reproducing identical build output given identical source input, or often more specifically the goal of byte-for-byte identical executable files when built repeatedly, perhaps on different machines or at different times

Binary reproducibility is the goal or quality of consistently reproducing identical build output given identical source input, or often more specifically the goal of byte-for-byte identical executable files (or identical checksums, hashes or other digests of those files) when built repeatedly, perhaps on different machines or at different times. The process by which this is achieved is often called a deterministic build or reproducible build.

For software subject to a requirement to be able to determine whether an arbitrary executable resulted from building a specific set of sources, binary reproducibility provides a straightforward, easily explained answer to that requirement. This requirement is often applied to software that is security-sensitive (e.g. Bitcoin Core, Tor), or used in a heavily regulated market (e.g. avionics, health care equipment, licensed gambling).

A number of tools or elements involved in builds may hamper this goal for a variety of reasons. Inclusion of environmental information such as timestamps, compiler versions, user and computer names and absolute paths is common, as is inclusion of a random UUID on every run to simplify matching of an executable with related files such as detached debug symbols or platform-specific native images. Many compilers produce nondeterministic compiler-generated symbol names, either for constructs explicitly defined but not named by in source code, or as an artifact of an implementation detail not surfaced in source code at all. Finally, highly optimizing compilers may employ nondeterministic optimization techniques such as Monte Carlo simulation guided optimization or profile guided optimization.

66 questions
1
vote
1 answer

Gradle same checksum for repeated build

I'm building a Java project with gradle and want to publish checksum files along with the artifacts of my build. The problem is that repeated builds generate different checksums without any code changes. After spending some time chasing down the…
dpr
  • 10,591
  • 3
  • 41
  • 71
1
vote
1 answer

Load package but package with same name is already loaded

I have two versions of the same Python package. I need from a module in a subpackage in the current version to be able to call a function inside the old version of the package (which copied itself in the past) Where I am now: now/ package/ …
1
vote
1 answer

How to use Procyon Decompiler with Diffoscope

I was running Diffoscope on Ubuntu Bionic and when I turned on the debug log (--debug) I noticed many lines like these (one per .class file in the JAR): diffoscope.comparators.java: Unable to find ProcyonDecompiler. Falling back... I installed the…
Martín Coll
  • 3,368
  • 3
  • 37
  • 52
1
vote
4 answers

How to produce 8 bytes from 4 bytes with a reproducible operation?

I've 4 bytes of data and need an 8 bytes array for a security operation. I should produce these 8 bytes form the 4 bytes byte array and this should be reproducible. I was thinking of using exact byte array and adding 4 extra bytes and fill them with…
Xaqron
  • 29,931
  • 42
  • 140
  • 205
1
vote
0 answers

Source code not changed, but everytime I rebuild the project(Visual Studio C#), the output exe file content is different

I create an empty WPF project(Visual Studio 2010 or 2013, C#), and I found even I did not modify the source code, just rebuild the project, the output exe file content is different. Can anyone tell why? And in the same build machine, I want "When…
1
vote
2 answers

Does Solaris cc embed in an executable differing info for different compiles?

G'day, This has been asked before for VC++ but I am interested in the answer for Solaris. I'm compiling and linking the following trivial C code: #include int main() { printf("Hello world!\n"); return 0; } using the command: cc…
Rob Wells
  • 36,220
  • 13
  • 81
  • 146
1
vote
0 answers

Csc.exe compiles "different" .dlls from same .cs

Give a source .cs file as simple as below, is there any way to produce identical .dlls with MSBuild (or at least with csc.exe), so their binary hash would match? foo.cs public class Foo { public int Bar; } foo.bat del foo*.dll csc /t:library…
Ilya Kozhevnikov
  • 10,242
  • 4
  • 40
  • 70
1
vote
1 answer

Why are vcbuild- and Visual Studio-compiled files binary not bytewise similar at all?

Until now, I compiled my project from VS and now I moved compilation process to a script. I use vcbuild.exe with command line parameters for this purpose. What I see is that my output files is not bytewise similar at all. I compared a command line…
user1766151
  • 86
  • 1
  • 4
0
votes
0 answers

How are Dart packages distributed?

I am currently working on some research on Reproducible Builds and considering the Pub ecosystem. How does Pub compile/pack packages into to-be distributed binaries?
Oreofe Solarin
  • 286
  • 5
  • 13
0
votes
1 answer

How to compare google-generated apks with appbundle

I published my first android App in the play store. Since google manages the signing keys, I need to rely on google to publish my app and not modify it. To verify my package, I downloaded all the distributed APKs, extracted them and tried to compare…
0
votes
1 answer

Workflow for building python wheels in a multistage dockerfile with pipenv

In order to keep final docker image small, my usual approach to building python projects with binary dependencies is to build the pinned dependencies in a first stage and copy them to a final stage lacking the building toolchains. Broadly: FROM…
0
votes
1 answer

Generate reproducible checksum for jar files

I want to generate a reproducible checksum for my output files (e.g. *.jar) such that other developers or testers could notice when there are any changes. From reproducible builds website https://reproducible-builds.org/docs/jvm/, I could now…
0
votes
2 answers

Yocto: how to disable BUILD_REPRODUCIBLE_BINARIES for single file in root filesystem, so that this file's mtime can be set arbitrarily

I have a Yocto build based on Poky that inherits reproducible_build. This essentially sets BUILD_REPRODUCIBLE_BINARIES to "1", and REPRODUCIBLE_TIMESTAMP_ROOTFS to "1520598896", which is 12:34:56 on 9th March 2018 UTC. In this build, I have a…
davidA
  • 12,528
  • 9
  • 64
  • 96
0
votes
1 answer

Writing genrule with randomness in Bazel

We have a code generator that takes random seed as an input. If no seed specified, it will randomly pick a random seed, which means the outcome is not deterministic: # generated_code1.h and generated_code2.h are almost always different my-code-gen…
0
votes
1 answer

Vocabulary for a script that is expected to produce the same output no matter where it is run

I'd like some advice on what vocabulary to use to describe the following. Having the right vocabulary will allow me to search for tools and ideas related to the concept I'd like to say a script is SomeWord if it is expected to produce the same…