-
Notifications
You must be signed in to change notification settings - Fork 568
reproducible build process #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This moves jar creation to `ant release`. To provide build security, it should be possible for anyone to run the build process and end up with the same result as Zetetic. To aid that process, this adds metadata to the release jar that specifies which versions of Java, Android SDK, and Android NDK were used to build the official release.
Hi @eighthave This looks pretty slick, thanks! In testing it locally, I found I needed to adjust the UTC specifier when running on OS X:
However it is currently failing in the
We currently build our release binary packages on OS X, so we will need to investigate this a bit further. |
…mmit If the `faketime` utility is available, use it to fix the time of the build based on the time of the current git commit. This makes the build process reproducible since anyone who builds it from git will end up with a build that has the same exact timestamps. You can get faketime from various package systems: apt-get install faketime brew install faketime port install libfaketime
76ce45e
to
b066090
Compare
Turns out
My guess is that it is caused by you using a 32-bit SDK on a 64-bit Mac? Or
|
Also, I should mention, |
If it is present, I would prefer it to work if there isn't too much involved to get it working. ☺ That said, you were correct about the architecture differences between |
It would be really cool if we could (also) use a MD5 sum to verify the reproducible build.. |
We can do one better: once this process is fully nailed down, then you can use |
Hi @brodybits You can currently verify the binary package that is distributed against our signing key. We have more info about that here. |
sqlipher --> sqlcipher `git describe` will give only the name of the tag if the current commit is tagged. Otherwise, it will get the most recent tag, how many commits since that tag, and the commit hash id. This marks non-release builds clearly and enforces that the release must be made from the proper tagged git commit.
This script unpacks the zip and jars into a temp folders, then compares
I got it quite close to having the release zipball generate the exact same hash, but not quite. I think there are 4 bytes that are different in the jar wrapping of sqlcipher.jar, and about 20 bytes in sqlcipher-javadoc.jar. I don't know what is causing that difference. Everything else is an exact match when running the build on Debian/wheezy/amd64 and Ubuntu/precise/amd64. I threw in a script for comparing builds. |
These commits, in conjuction with the utility
faketime
, make for a reproducible, deterministic build process so that others can exactly reproduce the official release builds. It includes extra metadata in the jar file about which Java, SDK, and NDK were used to make the given build. This makes it easy to verify that the release build came only from the source in the git repo, and nothing was injected in during the build process.You can get faketime from various package systems: