Hi Malcolm,

Yes, your approach w/c/should work!

I am unsure if including the proposed workaround hardwired in mainstream 
easybuild
would be the long-term optimal approach (think who could complain) but there is 
a way around that too:

- What if the headers-customisation are living in a file external to easybuild 
and fed as an extension?

I think that kind of approach is more passable and it is up to users to swap 
headers-customisation files
(ie. implying consent to what the headers mean or/and take compliance on their 
own hands)

Fotis

On Mar 16, 2015, at 4:36 AM, Malcolm Cook <[email protected]> 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
> 

cheers,
Fotis


-- 
echo "sysadmin know better bash than english" | sed s/min/mins/ \
  | sed 's/better bash/bash better/' # signal detected in a CERN forum






Reply via email to