Skip to content

Instantly share code, notes, and snippets.

@devrandom
Last active September 27, 2024 01:02
Show Gist options
  • Save devrandom/806265 to your computer and use it in GitHub Desktop.
Save devrandom/806265 to your computer and use it in GitHub Desktop.
Building bitcoin with gitian-builder

This is obsolete, since Bitcoin Core has moved to a more modern build system.

# First run:
apt-get install apt-cacher python-vm-builder
vi /etc/default/apt-cacher # ensure autostart is enabled
sudo service apt-cacher start
git clone git://github.com/bitcoin/bitcoin.git
git clone git://github.com/devrandom/gitian-builder.git
mkdir gitian-builder/inputs
wget 'http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.tar.gz' -O gitian-builder/inputs/miniupnpc-1.5.tar.gz
wget 'http://downloads.sourceforge.net/project/wxwindows/2.9.1/wxWidgets-2.9.1.tar.bz2' -O gitian-builder/inputs/wxWidgets-2.9.1.tar.bz2
cd gitian-builder
bin/make-base-vm --arch i386
bin/make-base-vm --arch amd64
cd ..
# To build
cd bitcoin
git pull
cd ../gitian-builder
git pull
./bin/gbuild --commit bitcoin=a452d9ee2dea7e606ec102b0a1a411da4e5e5a91 ../bitcoin/contrib/gitian.yml
---
name: bitcoin
urls:
- https://gitian.org/bitcoin-0.3.21.zip
rss:
- url: http://sourceforge.net/api/file/index/project-id/244765/mtime/desc/limit/100/rss
xpath: //item/link/text()
pattern: bitcoin-\d+.\d+.\d+-linux.zip
signers:
0A82509767C7D4A5D14DA2301AE1D35043E08E54:
weight: 40
name: BlueMatt
key: bluematt
BF6273FAEF7CC0BA1F562E50989F6B3048A116B5:
weight: 40
name: Devrandom
key: devrandom
7F2C769E1C70136857067567669476EAAA76785A:
weight: 40
name: Sipa
key: sipa
keyid: D762373D24904A3E42F33B08B9A408E71DAAC974
1CDB743D775BDD2CAC0B95E436744B67A1EC02ED:
weight: 40
name: tcatm
key: tcatm
01CDF4627A3B88AAE4A571C87588242FBE38D3A8:
weight: 80
name: "Gavin Andresen"
key: gavinandresen
minimum_weight: 160

Use the Downloader

Links

https://github.com/devrandom/gitian-builder/blob/updater/share/gitian-updater
https://github.com/devrandom/gitian-builder/blob/updater/doc/DOWNLOADER.md

sample zip file:

https://gitian.org/bitcoin-0.3.21.zip

Running

gitian-updater --config bitcoin-download-config.yml --dest /tmp/bitcoin

Alternatively, embed the configuration in the script

gitian-updater --config bitcoin-download-config.yml -m bitcoin-updater

then run the result:

./bitcoin-updater --dest /tmp/bitcoin

Expected output

Downloading: bitcoin-0.3.21.zip Bytes: 11624355
   11665408  [100.35%]
Some of the files were not checksummed:
   src/obj/nogui/.gitignore
   src/obj/.gitignore
   src/cryptopp/obj/.gitignore
   src/.gitignore
Signatures from:
    Sipa : weight 20
    Devrandom : weight 20
    BlueMatt : weight 40
    ...
Successful with signature weight 80
@devrandom
Copy link
Author

I think Bitcoin Core moved to Guix based builds

@jrick
Copy link

jrick commented Nov 2, 2021

I believe so too, but found this gist linked from https://gitian.org/.

@Antonio1034
Copy link

Oh, my dream is to fly to Miami. Now I am only at the initial stage of my acquaintance with investments and trade. By the way, I found a good article https://tabtrader.com/articles/top-10-bitcoin-scams therefore, for newcomers, I recommend reading it. I hope I find out how it works and save enough money for life.

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