hpcugent / Lmod-UGent

spec files of Lmod for UGent-HPC
8 stars 7 forks source link

provide `environment(modules)` #41

Closed stdweird closed 3 years ago

stdweird commented 3 years ago
# dnf install python3-sphinx
Last metadata expiration check: 0:07:19 ago on Sat 29 Aug 2020 10:36:32 PM CEST.
Error: 
 Problem: package python3-sphinx-1:1.7.6-1.el8.noarch requires environment(modules), but none of the providers can be installed
  - package Lmod-8.2.5-2.ug.el8.x86_64 conflicts with environment-modules provided by environment-modules-4.1.4-4.el8.x86_64
  - package Lmod-8.2.5-2.ug.el8.x86_64 conflicts with environment-modules provided by environment-modules-4.1.4-1.el8.x86_64
  - problem with installed package Lmod-8.2.5-2.ug.el8.x86_64
  - conflicting requests
  - package Lmod-8.2.7-1.el8.x86_64 is filtered out by exclude filtering

the Lmod rpm/spec should mention a 'Provides: environment(modules)' if it does provide environment-modules compatibilty

stdweird commented 3 years ago

@boegel @rtmclay thoughts?

stdweird commented 3 years ago

see https://git.centos.org/rpms/environment-modules/blob/c8/f/SPECS/environment-modules.spec#_19

boegel commented 3 years ago

It's a bit strange that python3-sphinx requires an environment modules tool, but I found the reason why in https://src.fedoraproject.org/rpms/python-sphinx/c/fa7e4f510bfb46af9fd23ff2c063b75ab6e9fe5f?branch=master (because it ships a module file).

They're also switching there from Lmod to environment(modules), so it makes sense to add Provides: environment(modules) to the Lmod spec, like they do in Fedora: https://src.fedoraproject.org/rpms/Lmod/blob/master/f/Lmod.spec#_38

stdweird commented 3 years ago

@boegel i like the fedora spec. is there any reason we can't use the lmod fedora build, and add our customisations to that in and actual Lmod-UGent rpm that has it as a dependency?

stdweird commented 3 years ago

@boegel ah i see. the configure options are (very) different

boegel commented 3 years ago

@stdweird fixed in #42

wpoely86 commented 3 years ago

The reason the epel/fedora rpm is not used directly is that Lmod doesn't have a config file. You can set the options either in the configure script (which hardcodes it in the lua source) or through environment variables. As the latter is error prone, we used the former.

The proper thing would be to have a config file for Lmod and just ship the SitePackage in a separate RPM.