Make insecure option work with curl AND git. (#1786)

This commit is contained in:
Todd Gamblin
2016-10-11 23:13:40 -07:00
committed by GitHub
parent a6f85f51d0
commit 488e1bab2c
5 changed files with 47 additions and 29 deletions

View File

@@ -26,10 +26,7 @@
# Author: Justin Too <too1@llnl.gov>
#
import distutils.dir_util
import spack
from spack import *
import llnl.util.tty as tty
class Jdk(Package):
@@ -37,11 +34,6 @@ class Jdk(Package):
in the form of a binary product aimed at Java developers."""
homepage = "http://www.oracle.com/technetwork/java/javase/downloads/index.html"
version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf',
url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz")
version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4',
url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz")
# Oracle requires that you accept their License Agreement in order
# to access the Java packages in download.oracle.com. In order to
# automate this process, we need to utilize these additional curl
@@ -53,18 +45,12 @@ class Jdk(Package):
'-H', # specify required License Agreement cookie
'Cookie: oraclelicense=accept-securebackup-cookie']
def do_fetch(self, mirror_only=False):
# Add our custom curl commandline options
tty.msg(
"[Jdk] Adding required commandline options to curl " +
"before performing fetch: %s" %
(self.curl_options))
for option in self.curl_options:
spack.curl.add_default_arg(option)
# Now perform the actual fetch
super(Jdk, self).do_fetch(mirror_only)
version('8u66-linux-x64', '88f31f3d642c3287134297b8c10e61bf',
url="http://download.oracle.com/otn-pub/java/jdk/8u66-b17/jdk-8u66-linux-x64.tar.gz",
curl_options=curl_options)
version('8u92-linux-x64', '65a1cc17ea362453a6e0eb4f13be76e4',
url="http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.tar.gz",
curl_options=curl_options)
def install(self, spec, prefix):
distutils.dir_util.copy_tree(".", prefix)