aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-05-18 17:29:35 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-05-18 19:34:31 +0300
commit4c56a798c059d1b4359fe39dc360a974ea268da4 (patch)
tree7178dd52e18976ef755ae8fe9e29d90fc10d8c2f /contrib
parentcbbd98863bfbdbeb687af39e480998c083f2d0be (diff)
downloadbitcoin-4c56a798c059d1b4359fe39dc360a974ea268da4.tar.xz
Set/unset USE_LXC, USE_VBOX, USE_DOCKER explicitly
This prevents the setting of more than one environment variable for the gitian-builder (e.g., USE_LXC being set shadows USE_DOCKER; for details see gitian-builder/libexec/make-clean-vm).
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/gitian-build.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/gitian-build.py b/contrib/gitian-build.py
index 1135ad384f..862b415413 100755
--- a/contrib/gitian-build.py
+++ b/contrib/gitian-build.py
@@ -149,7 +149,7 @@ def main():
parser.add_argument('-m', '--memory', dest='memory', default='2000', help='Memory to allocate in MiB. Default %(default)s')
parser.add_argument('-k', '--kvm', action='store_true', dest='kvm', help='Use KVM instead of LXC')
parser.add_argument('-d', '--docker', action='store_true', dest='docker', help='Use Docker instead of LXC')
- parser.add_argument('-S', '--setup', action='store_true', dest='setup', help='Set up the Gitian building environment. Uses LXC. If you want to use KVM, use the --kvm option. Only works on Debian-based systems (Ubuntu, Debian)')
+ parser.add_argument('-S', '--setup', action='store_true', dest='setup', help='Set up the Gitian building environment. Only works on Debian-based systems (Ubuntu, Debian)')
parser.add_argument('-D', '--detach-sign', action='store_true', dest='detach_sign', help='Create the assert file for detached signing. Will not commit anything.')
parser.add_argument('-n', '--no-commit', action='store_false', dest='commit_files', help='Do not commit anything to git')
parser.add_argument('signer', help='GPG signer to sign each build assert file')
@@ -173,14 +173,18 @@ def main():
args.sign_prog = 'true' if args.detach_sign else 'gpg --detach-sign'
- # Set environment variable USE_LXC or USE_DOCKER, let gitian-builder know that we use lxc or docker
+ # Ensure no more than one environment variable for gitian-builder (USE_LXC, USE_VBOX, USE_DOCKER) is set as they
+ # can interfere (e.g., USE_LXC being set shadows USE_DOCKER; for details see gitian-builder/libexec/make-clean-vm).
+ os.environ['USE_LXC'] = ''
+ os.environ['USE_VBOX'] = ''
+ os.environ['USE_DOCKER'] = ''
if args.docker:
os.environ['USE_DOCKER'] = '1'
elif not args.kvm:
os.environ['USE_LXC'] = '1'
- if not 'GITIAN_HOST_IP' in os.environ.keys():
+ if 'GITIAN_HOST_IP' not in os.environ.keys():
os.environ['GITIAN_HOST_IP'] = '10.0.3.1'
- if not 'LXC_GUEST_IP' in os.environ.keys():
+ if 'LXC_GUEST_IP' not in os.environ.keys():
os.environ['LXC_GUEST_IP'] = '10.0.3.5'
# Disable for MacOS if no SDK found