gitian: use latest builder and optimize git interaction
Fetching only the Monero version to be built reduces the downloaded volume by two thirds (from ~240 MB down to ~80 MB). While a non-issue for users on modern networks, the optimization is critical on slow/flaky connections (read: hidden networks) where any increase in volume makes the clone-step more likely to fail with error: RPC failed; curl 18 transfer closed with outstanding read data remaining. Personally I wasn't able to get past this issue on a torified-connection at all without this patch, hence the PR. I've confirmed (with dockrun.sh) that this builds the v0.18.3.1-linux binaries with checksums matching those reported by other builders: https://github.com/monero-project/gitian.sigs/tree/master/v0.18.3.1-linux
This commit is contained in:
parent
5e2d23ec25
commit
78295c9de2
|
@ -7,7 +7,7 @@ build_darwin_OTOOL: = $(shell xcrun -f otool)
|
|||
build_darwin_NM: = $(shell xcrun -f nm)
|
||||
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
|
||||
build_darwin_SHA256SUM = shasum -a 256
|
||||
build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
||||
build_darwin_DOWNLOAD = curl --location --fail --continue-at - --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
||||
|
||||
#darwin host on darwin builder. overrides darwin host preferences.
|
||||
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
build_linux_SHA256SUM = sha256sum
|
||||
build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
||||
build_linux_DOWNLOAD = curl --location --fail --continue-at - --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
|
||||
|
|
|
@ -43,8 +43,8 @@ WORKDIR $WORKDIR
|
|||
|
||||
RUN git clone https://github.com/monero-project/gitian.sigs.git sigs; \
|
||||
git clone https://github.com/devrandom/gitian-builder.git builder; \
|
||||
cd builder; git checkout c0f77ca018cb5332bfd595e0aff0468f77542c23; mkdir -p inputs var; cd inputs; \
|
||||
git clone https://github.com/monero-project/monero
|
||||
cd builder; git checkout 6f21a0ef5c9ea3df1a515c4b8b9a9296512821dd; mkdir -p inputs var; cd inputs; \
|
||||
git clone -v --branch $VERSION --depth 1 https://github.com/monero-project/monero
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
EOF
|
||||
|
|
|
@ -7,6 +7,7 @@ import sys
|
|||
|
||||
gsigs = 'https://github.com/monero-project/gitian.sigs.git'
|
||||
gbrepo = 'https://github.com/devrandom/gitian-builder.git'
|
||||
gbcommit = '6f21a0ef5c9ea3df1a515c4b8b9a9296512821dd'
|
||||
|
||||
platforms = {'l': ['Linux', 'linux', 'tar.bz2'],
|
||||
'a': ['Android', 'android', 'tar.bz2'],
|
||||
|
@ -28,7 +29,7 @@ def setup():
|
|||
if not os.path.isdir('builder'):
|
||||
subprocess.check_call(['git', 'clone', gbrepo, 'builder'])
|
||||
os.chdir('builder')
|
||||
subprocess.check_call(['git', 'checkout', 'c0f77ca018cb5332bfd595e0aff0468f77542c23'])
|
||||
subprocess.check_call(['git', 'checkout', gbcommit])
|
||||
os.makedirs('inputs', exist_ok=True)
|
||||
os.chdir('inputs')
|
||||
if os.path.isdir('monero'):
|
||||
|
@ -67,7 +68,7 @@ def rebuild():
|
|||
|
||||
print('\nCompiling ' + args.version + ' ' + os_name)
|
||||
infile = 'inputs/monero/contrib/gitian/gitian-' + tag_name + '.yml'
|
||||
subprocess.check_call(['bin/gbuild', '-j', args.jobs, '-m', args.memory, '--commit', 'monero='+args.commit, '--url', 'monero='+args.url, infile])
|
||||
subprocess.check_call(['bin/gbuild', '--skip-fetch', '-j', args.jobs, '-m', args.memory, '--commit', 'monero='+args.commit, '--url', 'monero='+args.url, infile])
|
||||
subprocess.check_call(['bin/gsign', '-p', args.sign_prog, '--signer', args.signer, '--release', args.version+'-'+tag_name, '--destination', '../sigs/', infile])
|
||||
subprocess.check_call('mv build/out/monero-*.' + suffix + ' ../out/'+args.version, shell=True)
|
||||
print('Moving var/install.log to var/install-' + tag_name + '.log')
|
||||
|
|
Loading…
Reference in New Issue