I personally think the ability for users to use any filename for eb is a design
decision that you should take in consideration. One of the discussion in our
last meeting was PR check, it makes sense to check file name in order to merge
PR to branch, since this is a criteria we have been following then it makes
little sense the user can still build an application with arbitrary name that
goes against the eb standard. One of the features, I would like to have in EB
is the ability to uninstall a package from eb which can work if you follow a
naming standard. Uninstall would be particularly useful when you are building a
dependency tree and you run into an issue, there should be a way to revert the
changes similar to yum history undo when you install a RPM package. Currently,
I have to uninstall the package manually and it is inconvenient and error prone.
The eb name check should be straightforward. I have done this check for the
Testing Framework as means to verify software package with easyconfig file.
If name of eb file match the tag:
"name"-"version"-"toolchain-name"-"toolchain-version"-"version-suffix" found in
easyconfig then it can proceed with the build.
This can be done according to current standard, shown below is the steps taken
to retrieve the Name, Version, Toolchain tag used for comparison.
Name Check:
[hpcswadm@amrndhl1157 GCC]$ grep "name = " GCC-5.4.0-2.27.eb
name = 'GCC'
[hpcswadm@amrndhl1157 GCC]$ grep "name = " GCC-5.4.0-2.27.eb | cut -f3 -d " "
'GCC'
[hpcswadm@amrndhl1157 GCC]$ grep "name = " GCC-5.4.0-2.27.eb | cut -f3 -d " " |
tr -d "'"
GCC
Version Check: There are some cases where there is multiple version tags this
could be done by getting the first entry
[hpcswadm@amrndhl1157 GCC]$ grep "version = " GCC-5.4.0-2.27.eb | cut -f3 -d " "
'5.4.0'
'GCCcore'
[hpcswadm@amrndhl1157 GCC]$ grep "version = " GCC-5.4.0-2.27.eb | cut -f3 -d "
" | tr -d "'" | head -n1
5.4.0
Toolchain Name Check:
[hpcswadm@amrndhl1157 GCC]$ grep "toolchain = " GCC-5.4.0-2.27.eb | cut -f4 -d
" "
'dummy',
[hpcswadm@amrndhl1157 GCC]$ grep "toolchain = " GCC-5.4.0-2.27.eb | cut -f4 -d
" " | tr -d "',"
Dummy
Toolchain Version Check:
[hpcswadm@amrndhl1157 GCC]$ grep "toolchain = " GCC-5.4.0-2.27.eb | cut -f6 -d
" "
''}
[hpcswadm@amrndhl1157 GCC]$ grep "toolchain = " GCC-5.4.0-2.27.eb | cut -f6 -d
" " | tr -d "'}"
File Name Extraction
[hpcswadm@amrndhl1157 GCC]$ ls -l /hpc/hpcswadm/easybuild/GCC/GCC-5.4.0-2.27.eb
-rw-r--r-- 1 hpcswadm hpcswadm 787 Mar 16 12:24
/hpc/hpcswadm/easybuild/GCC/GCC-5.4.0-2.27.eb
[hpcswadm@amrndhl1157 GCC]$ file=$(basename
/hpc/hpcswadm/easybuild/GCC/GCC-5.4.0-2.27.eb)
[hpcswadm@amrndhl1157 GCC]$ echo $file
GCC-5.4.0-2.27.eb
[hpcswadm@amrndhl1157 GCC]$ echo ${file::-3}
GCC-5.4.0-2.27
I handle version suffix check different, I don't use the easyconfig parameter
"versionsuffix" since it uses variables, but rather I take the difference
between the ebfilename and "name"-"version"-"toolchain" extract the version
suffix that way. The name of the module file is dependent on the Module Name
scheme (Flat vs HMNS). I do a check by finding out a relationship between
module file and its corresponding easyconfig. In HMNS the toolchain is not part
of the module file name, so this can only be done by searching all easyconfig
files in software directory $EASYBUILD_ROBOT_PATHS/g/GCC and doing a check for
tags (name,version,toolchain,versionsuffix).
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Pieter Neerincx
Sent: Wednesday, March 29, 2017 4:53 AM
To: [email protected]
Subject: Re: [easybuild] eb file format toolchain version mismatch successful
build?
> On 29 Mar 2017, at 09:50, Alvarez, Damian <[email protected]> wrote:
>
> For easyconfig files specified on the command line, we don't check
> anything, to give people the freedom to name their easyconfig files
> "test.eb" or whatever (even the .eb extension isn't required).
>
>
> Yay!, freedom to shoot ourselves on the foot ;-P. IMO, if the robot can’t
> pick it up, neither should eb when specifying it in the command line. That’s
> at least how I’d configure our setup if that was an option.
+1! for a production setup. I do understand you may want to break the
+policy for testing purposes though ;)
@Kenneth: would it be possible to allow whatever filename for easyconfigs
specified on the commandline, but do check for naming conventions and throw a
big warning if the easyconfig cannot be picked up by the robot option for
dependency resolution? We already have a perforated pair of feet here :o...
Cheers,
Pi
> Damian
>
>
>
>
> ----------------------------------------------------------------------
> --------------------------
> ----------------------------------------------------------------------
> --------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> ----------------------------------------------------------------------
> --------------------------
> ----------------------------------------------------------------------
> --------------------------
>
-------------------------------------------------------------
phone: +31 6 143 66 783
e-mail: [email protected]
skype: pieter.online
-------------------------------------------------------------