easybuilders / easybuild

EasyBuild - building software with ease
http://easybuild.io
GNU General Public License v2.0
461 stars 143 forks source link

Issue with FPM packaging, Lmod and the ModuleRC easyblock #836

Open michaelmayer2 opened 1 year ago

michaelmayer2 commented 1 year ago

Step to reproduce:

Build Java-11.eb using EasyBuild 4.6.2 with the --package option on a RHEL based system (e.g. CentOS 7) with Lmod 8.7.7 installed

Expected Result:

Build succeeds and RPM is successfully created

Actual Result:

1) The software is correctly deployed and module_version("Java/11.0.16", "11") added to .modulerc.lua in modules/all/Java/. Informational message from the build logs Found Lmod v8.7.7 >= v7.7.38, so will generate .modulerc.lua in Lua syntax. 2) Packaging step fails with

"Invalid package configuration: Cannot package the path './opt/apps/easybuild/modules/all/Java/11.lua', does it exist?"

which is correct - 11.lua does not exist while .modulerc.lua does.

Additional details

We probably could patch EasyBuild to package the .modulerc.lua instead of the 11.lua when a recent Lmod is detected, but then we will not cover a case where Java/11.0.16 can be reached by two aliases, Java/11 AND Java/11.0, respectively. Implementing a custom post install and remove script however also could be a bit too extreme for this purpose either.