This issue is copied from https://pagure.io/koji/issue/4198
I noticed some of my builds started to fail due to environment-modules not being installed anymore in the build root. Only builds from and including f41 succeed. Builds for f39, f40, epel9, epel10 fail. Is this expected?
Another question is what should be specified as BuildRequires in the spec file: environment(modules), or environment-modules? The former also fails.
Examples: 1. https://koji.fedoraproject.org/koji/taskinfo?taskID=123906939 f40 using BuildRequires: environment(modules) (or no br at all) fails 2. https://koji.fedoraproject.org/koji/taskinfo?taskID=123907037 f40 using BuildRequires: environment-modules works 3. https://koji.fedoraproject.org/koji/taskinfo?taskID=123907432 f41 using BuildRequires: environment(modules) works
Name: test Version: 1.0.0 Release: 1%{?dist} License: GPL Summary: Test #BuildRequires: environment(modules) # fails #BuildRequires: environment-modules # works BuildRequires: mpich-devel BuildRequires: openmpi-devel %description Test %prep %build %{_mpich_load} echo mpich should be printed %{_mpich_unload} %{_openmpi_load} echo openmpi should be printed %{_openmpi_unload} %files %changelog * Tue Sep 24 2024 Marcin Dulak <marcindulak@fedoraproject.org> 1.0.0-1 - initial version
spec files that build against openmpi/mpich may need to be adjusted. Probably no more than 60 packages may need adjusting
dnf repoquery --whatrequires openmpi | cut -d- -f1-2 | sort | uniq | wc -l Last metadata expiration check: 0:01:24 ago on Wed 25 Sep 2024 10:45:54 AM UTC. 65
That's because environment(modules) is provided by both environment-modules and Lmod. So you might get the wrong one unless you actually BR environment-modules.
environment(modules)
The package you get was changed in Fedora 41 presumably because of dnf 5.
In the case of 1. https://koji.fedoraproject.org/koji/taskinfo?taskID=123906939 f40 where using BuildRequires: environment(modules) (or no br at all) fails, I see lmod is installed instead of environment-modules. Would one still expect the macros %{_openmpi_load} and %{_mpich_load} to work?
Who should provide this buildrequires? The spec file that specifies buildrequires openmpi-devel, or openmpi-devel itself? I mean are buildrequires transitive?
This does not seem like a releng issue... I'd suggest the devel list, or a bug on environment-modules ?
Metadata Update from @kevin: - Issue close_status updated to: Can't Fix - Issue status updated to: Closed (was: Open)
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/SL4IL4SWBYIUZVGXNHTX6CRYDHPIXWMO/
For the record only. The reason this works on f41+ is https://src.fedoraproject.org/rpms/rpm-mpi-hooks/c/90f8dfbf925a815820cd1bcdd469c8827a757b19