Skip to content

Conversation

@crwood
Copy link
Member

@crwood crwood commented Feb 28, 2021

While most of the prerequisite work needed to achieve reproducible/deterministic builds on GNU/Linux was already completed with #329, this PR provides an additional hook in the make_appimage script that normalizes the file-permissions of resource files inside the AppDir directory. This results in deterministic AppImage builds across a wider range of hosts; assuming a recent release of Docker is installed and properly configured, running make in-container inside the Gridsync the source tree at a specific git revision will now result in a bit-for-bit identical AppImage outputs across differing underlying hosts (specifically Debian 10, Fedora 32, Ubuntu 20.04, Ubuntu 20.10, and Ubuntu 18.04, in my testing).

One exception to this appears to be with GitHub Actions' older OS images: while the build output of the ubuntu-latest/ubuntu-20.04 environment appears to consistently match that of the others I've tested locally, GitHub Actions' ubuntu-18.04 environment produces an altogether different output than any others -- due, perhaps, to some Azure-specific environmental factors that introduce additional variance into some part of the build process. It is hardly worth trying to debug this, however, since the ubuntu-latest/ubuntu-20.04 outputs can already be independently verified against a fairly wide range of common GNU/Linux environments (and, besides, an environment that compiles software in ways that differ from the others is one that shouldn't be depended upon in the first place; being able to identify -- and avoid -- non-deterministic GNU/Linux build environments is precisely the purpose of this PR).

@crwood crwood added the Linux label Feb 28, 2021
@crwood crwood merged commit 7bee182 into master Feb 28, 2021
@crwood crwood deleted the 330.reproducible-builds-linux branch February 28, 2021 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants