From eeb0be49050b0076618775f9df2d0b3645dcc034 Mon Sep 17 00:00:00 2001 From: Seth For Privacy Date: Wed, 1 Dec 2021 15:33:08 +0000 Subject: [PATCH 1/6] Bump versions in DOCKRUN.md and add log commands --- contrib/gitian/DOCKRUN.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index fa5e13c82..d30b2a82b 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -56,7 +56,7 @@ The dockrun.sh script will do everything to build the binaries. Just specify the version to build as its only argument, e.g. ```bash -./dockrun.sh v0.17.2.3 +./dockrun.sh v0.17.3.0 ``` The build should run to completion with no errors, and will display the SHA256 checksums @@ -74,12 +74,18 @@ You can set other options for that script by setting the OPT variable when runni e.g. ```bash -OPT="-j 8" ./dockrun.sh v0.17.2.3 +OPT="-j 8" ./dockrun.sh v0.17.3.0 ``` You can also examine the build and install logs by running a shell in the container, e.g. ```bash +# Tail running logs +docker exec -it gitrun /bin/bash +tail -f builder/var/*.log + +# Inspect logs docker exec -it gitrun /bin/bash more builder/var/install-linux.log +more builder/var/build.log ``` From 9d02531f0d14df2a59c08a52de22579460a4afa7 Mon Sep 17 00:00:00 2001 From: Seth For Privacy Date: Wed, 1 Dec 2021 17:44:58 +0000 Subject: [PATCH 2/6] Update DOCKRUN.md --- contrib/gitian/DOCKRUN.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index d30b2a82b..91d0bbc4e 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -74,6 +74,7 @@ You can set other options for that script by setting the OPT variable when runni e.g. ```bash +# Run build processes with 8 threads OPT="-j 8" ./dockrun.sh v0.17.3.0 ``` @@ -82,10 +83,10 @@ You can also examine the build and install logs by running a shell in the contai ```bash # Tail running logs docker exec -it gitrun /bin/bash -tail -f builder/var/*.log +tail -F builder/var/*.log -# Inspect logs +# Inspect logs, in format install-.log and build-.log docker exec -it gitrun /bin/bash more builder/var/install-linux.log -more builder/var/build.log +more builder/var/build-linux.log ``` From cd76011e6cf161ce9ff23f386db31acf8f9f4aee Mon Sep 17 00:00:00 2001 From: Seth For Privacy Date: Thu, 2 Dec 2021 13:55:18 +0000 Subject: [PATCH 3/6] Add note on adding SSH keys for Github --- contrib/gitian/DOCKRUN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index 91d0bbc4e..4d363e272 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -63,6 +63,8 @@ The build should run to completion with no errors, and will display the SHA256 c of the resulting binaries. You'll be prompted to check if the sums look good, and if so then the results will be signed, and the signatures will be pushed to GitHub. +***Note: In order to publish the signed assertions via this script, you need to have your SSH key uploaded to Github beforehand. See https://docs.github.com/articles/generating-an-ssh-key/ for more info.*** + You can also look in the [gitian.sigs](https://github.com/monero-project/gitian.sigs/) repo and / or [getmonero.org release checksums](https://web.getmonero.org/downloads/hashes.txt) to see if others got the same checksum for the same version tag. If there is ever a mismatch -- **STOP! Something is wrong**. Contact others on IRC / GitHub to figure out what is going on. From 03a256e0765f645564cb091022f7ab6b6d85068f Mon Sep 17 00:00:00 2001 From: Seth For Privacy Date: Thu, 2 Dec 2021 15:41:45 +0000 Subject: [PATCH 4/6] Add git clone and cd commands for initial prep --- contrib/gitian/DOCKRUN.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index 4d363e272..9847534bb 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -23,6 +23,13 @@ su $USER The final `su` command is needed to start a new shell with your new group membership, since the `usermod` command doesn't affect any existing sessions. +You'll also need to clone the monero repository and navigate to the `contrib/gitian` directory: + +```bash +git clone https://github.com/monero-project/monero.git +cd monero/contrib/gitian +``` + If you want Mac binaries included in your build, you need to obtain the MacOS SDK: ```bash From 52612e7a12d5d350979bed940b310a57e9ab4a14 Mon Sep 17 00:00:00 2001 From: Seth For Privacy Date: Thu, 2 Dec 2021 16:52:32 +0000 Subject: [PATCH 5/6] Add archive details to post-build section Also moved the tail of in-progress logs to two distinct and precise tail commands, was a good recommendation by @hyc. --- contrib/gitian/DOCKRUN.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index 9847534bb..715ac3ff8 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -87,15 +87,26 @@ e.g. OPT="-j 8" ./dockrun.sh v0.17.3.0 ``` -You can also examine the build and install logs by running a shell in the container, e.g. +Post-build +---------- + +You can examine the build and install logs by running a shell in the container, e.g. ```bash # Tail running logs docker exec -it gitrun /bin/bash -tail -F builder/var/*.log +tail -F builder/var/install.log +tail -F builder/var/build.log # Inspect logs, in format install-.log and build-.log docker exec -it gitrun /bin/bash more builder/var/install-linux.log more builder/var/build-linux.log ``` + +You can find the compiled archives inside of the container at the following directory (be sure to replace `v0.17.3.0` with the version being built): + +```bash +docker exec -it gitrun /bin/bash +ls -la out/v0.17.3.0/ +``` From 6a46f8c40ae069daf22e2bb5b7d72510c00e0eb4 Mon Sep 17 00:00:00 2001 From: Seth For Privacy Date: Thu, 2 Dec 2021 16:54:04 +0000 Subject: [PATCH 6/6] Add copy commands for compiled binaries --- contrib/gitian/DOCKRUN.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/gitian/DOCKRUN.md b/contrib/gitian/DOCKRUN.md index 715ac3ff8..7f44b7914 100644 --- a/contrib/gitian/DOCKRUN.md +++ b/contrib/gitian/DOCKRUN.md @@ -110,3 +110,10 @@ You can find the compiled archives inside of the container at the following dire docker exec -it gitrun /bin/bash ls -la out/v0.17.3.0/ ``` + +To copy the compiled archives to the local host out of the Docker container, you can run the following (be sure to replace `v0.17.3.0` with the version being built): + +```bash +mkdir out +docker cp gitrun:/home/ubuntu/out/v0.17.3.0 out +```