On 04/03/2014 09:31 PM, Orion Poplawski wrote:
Packaging (and mpi folks as they are the main users of modules) -
In addition to the current environment-modules package in Fedora, there is at least one other implementation of the "environment modules" system - Lmod. This is Lua based rather than C/TCL based but can handle the TCL based module file format as well as a lua based format with a .lua extension. There is also the pure TCL version of environment-modules which some seem to prefer.
I'd like to package Lmod for Fedora as well. My current plan is to use alternatives for the /etc/profile.d/modules.* links in order to allow both to coexist. I think we also want to move the current /usr/share/Modules/modulefiles system module file location to /usr/share/modulefiles (which would be owned by both environment-modules and Lmod). That way either package can make use of the modulefiles installed by other packages. environment-modules currently ships some sample modules which I'm not yet sure should stay in /usr/share/Modules/modulefiles (and only be used by it) or if they should get moved to /usr/share/modulefiles for Lmod's use as well (some are generic, some specific to environment-modules)
We also would need some kind of virtual provide I believe for module using packages to require instead of the current "environment-modules". Perhaps environment-modules(system) or environment(modules)? Suggestions welcome.
Any other comments?
- Orion
I'm getting close to deploying this with:
- /usr/share/modulefiles being the new default system path. Both environment-modules and Lmod will have /usr/share/Modules/modulefiles in their default MODULEPATH for a bit to help with transition.
- Both with provide "environment(modules)" which module using packages should require.
However, I'm running into problems converting environment-modules to alternatives. /etc/profile.d/modules.sh is currently a file and it does not get converted to a link by update-alternatives on upgrade. Any ideas?
https://fedoraproject.org/wiki/PackagingDrafts/UsingAlternatives does not seem to mention any issues like this.
I've attached the spec I'm trying to update to. I'm afraid I'm going to need some kind of %pre/%pretrans script to handle this.