Skip to content
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

Fix Gitian deterministic build #471

Closed
aguycalled opened this issue May 6, 2019 · 8 comments
Closed

Fix Gitian deterministic build #471

aguycalled opened this issue May 6, 2019 · 8 comments

Comments

@aguycalled
Copy link
Member

Currently Gitian does not produce deterministic builds for Windows binaries.

@mxaddict mxaddict self-assigned this May 6, 2019
@mxaddict
Copy link
Contributor

mxaddict commented May 6, 2019

Dibs 😄

@mxaddict
Copy link
Contributor

mxaddict commented May 7, 2019

I've started on this, and decided to add the changes to this PR #461 since they are very related

I needed the updated /depends to update the gitian setup as well.

@mxaddict
Copy link
Contributor

mxaddict commented May 8, 2019

@aguycalled

So far I've gotten this result from windows build based on patch-5 PR #461

USE_DOCKER=1 ./bin/gbuild -j8 --commit navcoin-core=patch-5 --url navcoin-core=https://github.com/mxaddict/navcoin-core.git ../navcoin-core/contrib/gitian-descr
iptors/gitian-win.yml
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 5 (delta 4), reused 5 (delta 4), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/mxaddict/navcoin-core
   9baeff4..448dc89  patch-5    -> patch-5
--- Building for bionic amd64 ---
Stopping target if it is up
Making a new image copy                                                                                                                                                                                     
Starting target
Checking if target is up.
Preparing build environment
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
Upgrading system, may take a while (log in var/install.log)
Creating package manifest
Creating build script (var/build-script)
Running build script (log in var/build.log)
Grabbing results from target
Grabbing cache from target
Generating report
b1dd88cdd8bf09af2539d0b345e647129d8fd55c92b6d824b6ecc53efd531028  navcoin-4.6.0-win.tar.gz
8ea47d64a1d286f3db44f8a4220bde6b9da4d615845328d77b6f77f827440c1d  navcoin-4.6.0-win32-debug.zip
81eb9973c247bd57ec5b15eff79bb8f65173dc06c72cdd9e82303ddb791be50a  navcoin-4.6.0-win32-setup-unsigned.exe
961ae253683dd413fe543a7cffe71a1638923d8716903e848ee76be012877a34  navcoin-4.6.0-win32.zip
2ad73c0f07f37f8cbb0466042e09686d63924c8b66421bd65a01c82c329696dd  navcoin-4.6.0-win64-debug.zip
92503574bcf91178777cc81ea86b2d91b037c0fab2a3d1e17696e3809620dd23  navcoin-4.6.0-win64-setup-unsigned.exe
7f5a6950561e83a82f0351431a92d7c73c89e6fbfb6484278fa0c0462a0d7280  navcoin-4.6.0-win64.zip
0f5b9baeb0c3abe2972924ad469c07d181d7f1d04f58761af125ab822b160e72  src/navcoin-4.6.0.tar.gz
a97d7446ce3c4ac4b065027b7c5616e131018c3fcc65cc8f4f7674343fe8a82a  navcoin-win-4.0.0-res.yml
Done.


USE_DOCKER=1 ./bin/gbuild -j8 --commit navcoin-core=patch-5 --url navcoin-core=https://github.com/mxaddict/navcoin-core.git ../navcoin-core/contrib/gitian-descriptors/gitian-win.yml
--- Building for bionic amd64 ---
Stopping target if it is up
Making a new image copy
Starting target
Checking if target is up.
Preparing build environment
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
Upgrading system, may take a while (log in var/install.log)
Creating package manifest
Creating build script (var/build-script)
Running build script (log in var/build.log)
Grabbing results from target
Grabbing cache from target
Generating report
b1dd88cdd8bf09af2539d0b345e647129d8fd55c92b6d824b6ecc53efd531028  navcoin-4.6.0-win.tar.gz
8ea47d64a1d286f3db44f8a4220bde6b9da4d615845328d77b6f77f827440c1d  navcoin-4.6.0-win32-debug.zip
81eb9973c247bd57ec5b15eff79bb8f65173dc06c72cdd9e82303ddb791be50a  navcoin-4.6.0-win32-setup-unsigned.exe
961ae253683dd413fe543a7cffe71a1638923d8716903e848ee76be012877a34  navcoin-4.6.0-win32.zip
2ad73c0f07f37f8cbb0466042e09686d63924c8b66421bd65a01c82c329696dd  navcoin-4.6.0-win64-debug.zip
92503574bcf91178777cc81ea86b2d91b037c0fab2a3d1e17696e3809620dd23  navcoin-4.6.0-win64-setup-unsigned.exe
7f5a6950561e83a82f0351431a92d7c73c89e6fbfb6484278fa0c0462a0d7280  navcoin-4.6.0-win64.zip
0f5b9baeb0c3abe2972924ad469c07d181d7f1d04f58761af125ab822b160e72  src/navcoin-4.6.0.tar.gz
a97d7446ce3c4ac4b065027b7c5616e131018c3fcc65cc8f4f7674343fe8a82a  navcoin-win-4.0.0-res.yml

@mxaddict
Copy link
Contributor

mxaddict commented May 8, 2019

Here is the docker setup process:

# Installed docker
git clone https://github.com/devrandom/gitian-builder.git
git clone https://github.com/mxaddict/navcoin-core.git
cd gitian-builder
bin/make-base-vm --docker --arch amd64 --suite bionic
USE_DOCKER=1 ./bin/gbuild -j8 --commit navcoin-core=patch-5 --url navcoin-core=https://github.com/mxaddict/navcoin-core.git ../navcoin-core/contrib/gitian-descriptors/gitian-win.yml

@mxaddict
Copy link
Contributor

mxaddict commented May 8, 2019

I did another build again today and seems windows builds now have same hashes after build 😄

--- Building for bionic amd64 ---
Stopping target if it is up
Making a new image copy
Starting target
Checking if target is up.
Preparing build environment
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
Upgrading system, may take a while (log in var/install.log)
Creating package manifest
Creating build script (var/build-script)
Running build script (log in var/build.log)
Grabbing results from target
Grabbing cache from target
Generating report
b1dd88cdd8bf09af2539d0b345e647129d8fd55c92b6d824b6ecc53efd531028  navcoin-4.6.0-win.tar.gz
8ea47d64a1d286f3db44f8a4220bde6b9da4d615845328d77b6f77f827440c1d  navcoin-4.6.0-win32-debug.zip
81eb9973c247bd57ec5b15eff79bb8f65173dc06c72cdd9e82303ddb791be50a  navcoin-4.6.0-win32-setup-unsigned.exe
961ae253683dd413fe543a7cffe71a1638923d8716903e848ee76be012877a34  navcoin-4.6.0-win32.zip
2ad73c0f07f37f8cbb0466042e09686d63924c8b66421bd65a01c82c329696dd  navcoin-4.6.0-win64-debug.zip
92503574bcf91178777cc81ea86b2d91b037c0fab2a3d1e17696e3809620dd23  navcoin-4.6.0-win64-setup-unsigned.exe
7f5a6950561e83a82f0351431a92d7c73c89e6fbfb6484278fa0c0462a0d7280  navcoin-4.6.0-win64.zip
0f5b9baeb0c3abe2972924ad469c07d181d7f1d04f58761af125ab822b160e72  src/navcoin-4.6.0.tar.gz
a97d7446ce3c4ac4b065027b7c5616e131018c3fcc65cc8f4f7674343fe8a82a  navcoin-win-4.0.0-res.yml
Done.

@mxaddict
Copy link
Contributor

mxaddict commented May 8, 2019

OSX build:

--- Building for bionic amd64 ---
Stopping target if it is up
Making a new image copy
Starting target
Checking if target is up.
Preparing build environment
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
Upgrading system, may take a while (log in var/install.log)
Creating package manifest
Creating build script (var/build-script)
Running build script (log in var/build.log)
Grabbing results from target
Grabbing cache from target
Generating report
a17a8c7e189d2d2ccd3a118b8e8ec2c94ef000d544d4ce38b848bfeb48291479  navcoin-4.6.0-osx-unsigned.dmg
2414813efd2099031da4ba35928851d3ab0739cce01f73cf4998b6476c0e5bb2  navcoin-4.6.0-osx-unsigned.tar.gz
1f1963bf3e69cd634e7448582e312ff6ddc0b3116311b05f884f49a6a201de0c  navcoin-4.6.0-osx64.tar.gz
0f5b9baeb0c3abe2972924ad469c07d181d7f1d04f58761af125ab822b160e72  src/navcoin-4.6.0.tar.gz
c415a774db05bc11d9dca5ab15cfd6d870b27ea1288732ca53b1cb0eeb3a3584  navcoin-osx-4.0.0-res.yml
Done.

@mxaddict
Copy link
Contributor

mxaddict commented May 8, 2019

OSX confirmed with a second build:

a17a8c7e189d2d2ccd3a118b8e8ec2c94ef000d544d4ce38b848bfeb48291479  navcoin-4.6.0-osx-unsigned.dmg
2414813efd2099031da4ba35928851d3ab0739cce01f73cf4998b6476c0e5bb2  navcoin-4.6.0-osx-unsigned.tar.gz
1f1963bf3e69cd634e7448582e312ff6ddc0b3116311b05f884f49a6a201de0c  navcoin-4.6.0-osx64.tar.gz
0f5b9baeb0c3abe2972924ad469c07d181d7f1d04f58761af125ab822b160e72  src/navcoin-4.6.0.tar.gz
c415a774db05bc11d9dca5ab15cfd6d870b27ea1288732ca53b1cb0eeb3a3584  navcoin-osx-4.0.0-res.yml

@aguycalled
Copy link
Member Author

Paid a31754d23dec948beed7b9f3bff1a9b613c2a5f01a5f9c65702e39750be9ab75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants