Setup instructions for a Gitian build of Dogecoin Core using a Docker.
Gitian is the deterministic build process that is used to build the Dogecoin Core executables. It provides a way to be reasonably sure that the executables are really built from the source on GitHub. It also makes sure that the same, tested dependencies are used and statically built into the executable.
Multiple developers build the source code by following a specific descriptor ("recipe"), cryptographically sign the result, and upload the resulting signature. These results are compared and only if they match, the build is accepted and uploaded to dogecoin.com.
More independent Gitian builders are needed, which is why this guide exists. It is preferred you follow these steps yourself instead of using someone else's VM image to avoid 'contaminating' the build.
ubuntu
debian
centos
fedora
archlinux
macos
1. Launch automated script (ONLY ONCE)
./gitian-init.sh
1. Install Docker
https://docs.docker.com/engine/install/
2. Generate GPG key
https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key
3. INSTALL those packages:
sudo git make wget brew(MACOS ONLY)
./gitian-build.sh --setup
./gitian-build.sh -j <jobs> -m <mem> --build <signer_name:required> <version:required>
./gitian-build.sh --verify <signer_name:required> <version:required>
For release version: omit v
./gitian-build.sh -j <jobs> -m <mem> --build <signer_name:required> 1.14.3
For commit or branch: use --commit
./gitian-build.sh -j <jobs> -m <mem> --commit --build <signer_name:required> <branch|hash>
./gitian-build.sh --push
./gitian-build.sh -j <jobs> -m <mem> --build -u <repo_url> <signer_name:required> <version:required>
./gitian-build.sh --help
./gitian-build.sh --setup
./gitian-build.sh -j 8 -m 8192 -u https://github.com/micaelmalta/dogecoin --build mmicael 1.14.3
./gitian-build.sh -j 8 -m 8192 --build mmicael 1.14.3
or
./gitian-build.sh -j 8 -m 8192 --commit --build mmicael 1.14.4-dev
./gitian-build.sh --push
The purpose of this is to be able to check that builds work with GITIAN using CIRRUS: https://github.com/marketplace/cirrus-ci
1/ Fork repo: https://github.com/micaelmalta/gitian-builder-dogecoin
2/ git clone <your_repo>
3/ git checkout -b build_<whatever> # IMPORTANT PART AS GITIAN BUILD ARE ONLY BUILD ON build_* branches
4/ vim .cirrus.yml
5/ Change those 2 values:
URL: https://github.com/mmicael/dogecoin
BRANCH: 1.14.4-libevent
6/ git commit -m "whatever"
7/ git push --set-upstream origin <your_branch>
8/ Wait 45mn!
9/ ENJOY!
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
Make sure your user in on Docker group
sudo usermod -aG docker `whoami`
newgrp docker
In order to sign the builds, you need to know your uid. To do it, follow the GNUGPG documentation
https://www.gnupg.org/documentation/manuals/gnupg/Specify-a-User-ID.html
You can also launch this command on your terminal to have the list
gpg --list-keys | grep uid | grep ultimate
Dogecoin Core is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT.
https://github.com/patricklodder
https://gist.github.com/patricklodder/88d6c4e3406db840963f85d95ceb44fe