From 0e38a9d16dfacfefbc7715268185f4f2bc47c116 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 13 Mar 2014 14:24:47 -0700 Subject: Added a -k/--insecure option to make curl not check certs. --- bin/spack | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/spack b/bin/spack index 72fd47d732..420b9adc78 100755 --- a/bin/spack +++ b/bin/spack @@ -51,9 +51,11 @@ parser = argparse.ArgumentParser( parser.add_argument('-V', '--version', action='version', version="%s" % spack.spack_version) parser.add_argument('-v', '--verbose', action='store_true', dest='verbose', - help="print additional output during builds") + help="Print additional output during builds") parser.add_argument('-d', '--debug', action='store_true', dest='debug', - help="write out debug logs during compile") + help="Write out debug logs during compile") +parser.add_argument('-k', '--insecure', action='store_true', dest='insecure', + help="Do not check ssl certificates when downloading archives.") parser.add_argument('-m', '--mock', action='store_true', dest='mock', help="Use mock packages instead of real ones.") @@ -76,6 +78,11 @@ if args.mock: mock_path = new_path(spack.module_path, 'test', 'mock_packages') spack.packages_path = mock_path +# If the user asked for it, don't check ssl certs. +if args.insecure: + tty.warn("You asked for --insecure, which does not check SSL certificates. ") + spack.curl.add_default_arg('-k') + # Try to load the particular command asked for and run it command = spack.cmd.get_command(args.command) try: -- cgit v1.2.3-70-g09d2 From 77aeac65013250b1bd3beccb4c2f6dc6d3138ac9 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 13 Mar 2014 14:50:38 -0700 Subject: Support github URLs --- bin/spack | 2 +- lib/spack/spack/url.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/spack b/bin/spack index 420b9adc78..775a9dbd08 100755 --- a/bin/spack +++ b/bin/spack @@ -80,7 +80,7 @@ if args.mock: # If the user asked for it, don't check ssl certs. if args.insecure: - tty.warn("You asked for --insecure, which does not check SSL certificates. ") + tty.warn("You asked for --insecure, which does not check SSL certificates.") spack.curl.add_default_arg('-k') # Try to load the particular command asked for and run it diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index 0bc7ff53b4..a4c32eb37b 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -102,6 +102,9 @@ def parse_version_string_with_indices(path): # e.g. https://github.com/petdance/ack/tarball/1.93_02 (r'github.com/.+/(?:zip|tar)ball/v?((\d+\.)+\d+_(\d+))$', path), + # e.g. https://github.com/hpc/lwgrp/archive/v1.0.1.tar.gz + (r'github.com/[^/]+/[^/]+/archive/v?(\d+(?:\.\d+)*)\.tar\.gz$', path), + # e.g. https://github.com/erlang/otp/tarball/OTP_R15B01 (erlang style) (r'[-_](R\d+[AB]\d*(-\d+)?)', path), @@ -169,6 +172,7 @@ def parse_name(path, ver=None): ntypes = (r'/sourceforge/([^/]+)/', r'/([^/]+)/(tarball|zipball)/', r'/([^/]+)[_.-](bin|dist|stable|src|sources)[_.-]%s' % ver, + r'github.com/[^/]+/([^/]+)/archive', r'/([^/]+)[_.-]v?%s' % ver, r'/([^/]+)%s' % ver, r'^([^/]+)[_.-]v?%s' % ver, -- cgit v1.2.3-70-g09d2