Hi Mikael,

Mikael Öhman <[email protected]> writes:

> Those subdirectories as part of the filenames are unusual. Perhaps this is 
> what's causing problems (I can't easily check things right now)
>
> I would just do
>
> source_urls = [
>     'ftp://cola.gmu.edu/grads/%(version_major_minor)s/',
>     'ftp://cola.gmu.edu/grads/Subblibs/%(version_major_minor)s/builds/',
> ]
> sources = [
>     %(namelower)s-%(version)s-bin-centos7.4-x86_64.tar.gz',
>     {'download_filename'': supplibs-centos7.4-x86_64.tar.gz', 'filename': 
> 'supplibs-%(version)s-centos7.4-x86_64.tar.gz'}
> ]

Thanks for the hints.  I got things working with

source_urls = [
    'ftp://cola.gmu.edu/grads/%(version_major_minor)s/',
    'ftp://cola.gmu.edu/grads/Supplibs/%(version_major_minor)s/builds/',
    'ftp://cola.gmu.edu/grads/',
]
sources = [
    '%(namelower)s-%(version)s-bin-centos7.4-x86_64.tar.gz',
    {'download_filename':'supplibs-centos7.4-x86_64.tar.gz',
     'filename': 'supplibs-%(version)s-centos7.4-x86_64.tar.gz'},
    {'filename': 'data2.tar.gz',
     'extract_cmd': "mkdir %(builddir)s/data && tar -C %(builddir)s/data -xvzf 
%s"}
    ]

> I'd probably also use -centos7.4-x86_64 as the version suffix, if you plan to 
> submit this easyconfig upstream.

Added.

Cheers,

Loris

> Best regards, Mikael
>
> On Fri, Aug 9, 2019 at 2:55 PM Loris Bennett <[email protected]> 
> wrote:
>
>  Hi Kenneth,
>
>  Kenneth Hoste <[email protected]> writes:
>
>  > Hi Loris,
>  >
>  > On 08/08/2019 09:52, Loris Bennett wrote:
>  >> Hi,
>  >>
>  >> I am trying to write an easyconfig for the binary version of GrADS
>  >> (http://cola.gmu.edu/grads/).  The version I am interested in comprises
>  >> a tgz of the main program plus a tgz of "supplementary libraries".  As I
>  >> understand it, I just need to unpack both and then set an environment
>  >> for the main program which points to the directory containing the
>  >> supplementary libraries.
>  >>
>  >> I can obviously just write two easyconfigs, but is there a better way of
>  >> doing it?
>  >
>  > You can just list both tgz's in sources, and maybe enable the
>  > 'build-in-installdir' mode so they get unpacked straight into the 
> installation
>  > directory:
>  >
>  > buildininstalldir = True
>  >
>  >
>  > Does that help?
>
>  Thanks, that got me a bit further.  However, eb fails with 
>
>    == FAILED: Installation ended unsuccessfully (build directory:
>    /trinity/shared/easybuild/software/GrADS/2.2.1): build failed (first
>    300 chars): Failed to copy grads-2.2.1 to
>    /trinity/shared/easybuild/software/GrADS/2.2.1: [Errno 2] No such file
>    or directory: 'grads-2.2.1'
>
>  The sources directory looks like this:
>
>    [build@admin eco]$ ll /trinity/shared/easybuild/sources/g/GrADS/
>    total 0
>    drwxr-xr-x 2 build staff 53 Aug  9 14:46 2.2
>    drwxr-xr-x 3 build staff 25 Aug  9 14:46 Supplibs
>
>  So I guess there is a problem because the version directory in the
>  tarball is 2.2 rather than 2.2.1.
>
>  My easyconfig looks like this:
>
>    easyblock = 'PackedBinary'
>
>    name = 'GrADS'
>    version = '2.2.1'
>
>    homepage = 'http://cola.gmu.edu/grads/'
>    description = "Grid Analysis and Display System"
>
>    toolchain = {'name': 'dummy', 'version': ''}
>
>    # ftp://cola.gmu.edu/grads/2.2/grads-2.2.1-bin-centos7.4-x86_64.tar.gz
>    # ftp://cola.gmu.edu/grads/Supplibs/2.2/builds/
>    source_urls = ['ftp://cola.gmu.edu/grads/']
>    sources = 
> ['%(version_major_minor)s/%(namelower)s-%(version)s-bin-centos7.4-x86_64.tar.gz',
>               
> 'Supplibs/%(version_major_minor)s/builds/supplibs-centos7.4-x86_64.tar.gz']
>    checksums = [
>        '85b657e0088ab8f782a8570574b4a128358a29f6f262e95a4c36ddd04c850c39',  # 
> grads-2.2.1-bin-centos7.4-x86_64.tar.gz
>        '6d7da926cb4536b892f70f38b364361c77af02987bc14a73e178408350caca33',  # 
> supplibs-centos7.4-x86_64.tar.gz
>    ]
>
>    buildininstalldir = True
>
>    sanity_check_paths = {
>        'files': ['bin/grads', 'lib/libgxdummy.so'],
>        'dirs': ['bin', 'lib'],
>    }
>
>    modextravars = {'GADDIR': '%(installdir)s',
>                    }
>
>    moduleclass = 'geo'
>
>  Any thoughts?
>
>  Cheers,
>
>  Loris
>
>  -- 
>  Dr. Loris Bennett (Mr.)
>  ZEDAT, Freie Universität Berlin         Email [email protected]
>
-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email [email protected]

Reply via email to