hi malcolm,

can you first clarify what this implies wrt accepting the license? (what is the user agreeing to by setting this cookie?).

wrt the implementation, i'd suggest to start extending the java easyblock with this functionality. if requires for other packages too, we can always promote the code to some generic block or framework (but i'm afraid oracle will change this method every other month or so...)

stijn

On 03/16/2015 05:36 AM, Malcolm Cook wrote:
Hi,

eb Java-1.8.0_31.eb

Fails

Reading the easyconfig source code, I see it advises

“# download the tar.gz directly from
http://www.oracle.com/technetwork/java/javase/downloads/index.html“

So I download it (following
http://stackoverflow.com/questions/10268583/how-to-automate-download-and-installation-of-java-jdk-on-linux)
as:

wget -P  ${PREFIX}/source/j/Java/  --no-check-certificate --no-cookies
--header "Cookie: oraclelicense=accept-securebackup-cookie"
http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.tar.gz

and the eb now succeeds. Yay.

But, surely this should not persist. Something must be done! Perhaps by
me!?!

Presumably the challenge is the check box which is opaque to the easybuild
framework, and what is needed is to get such a header declared in the
Java*.eb and contrive for it to be passed down.

Something like:

    - change filetools.py download_file(*) to
       - accept a new parameter, namely, headers={}
       - change the call to urlopen as:

url_fd = urllib2.urlopen(urllib2.Request(url, headers=headers), timeout=timeout)


    - give EasyBlock a new instance variable, say, source_url_headers
    - modify the Java*.eb to include:

   source_url_headers=[{"Cookie: oraclelicense" : "accept-securebackup-cookie"}]

I think this should work and am willing to “cut my teeth” on this project
with this small set of changes if y’all agree it is a good approach to this
problem.

Do you?

Thanks

~ Malcolm Cook
​

Reply via email to