-
Notifications
You must be signed in to change notification settings - Fork 922
Description
Background information
Trying to build RPMs from the SRPM which get installed properly under /opt with an env modulefile in /etc/modulefiles.
What version of Open MPI are you using? (e.g., v1.10.3, v2.1.0, git branch name and hash, etc.)
v4.0.1
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
Trying to build RPMs
Please describe the system on which you are running
- Operating system/version: CentOS Linux release 7.5.1804 (Core)
- Computer hardware: Docker
- Network type: N/A
Details of the problem
rpmbuild \
--define 'install_in_opt 1' \
--define 'install_modulefile 1' \
--rebuild openmpi-4.0.1-1.src.rpm
Currently when these options are combined the modulefile gets installed under:
/opt/openmpi/4.0.1/share/openmpi/modulefiles
rather than the desired location of:
/etc/modulefiles
which defeats the purpose of installing in /opt. Generally people who are installing in /opt are doing so because they have many different versions installed at the same time and they want to be able to switch between them using module purge/load/unload. By putting the modulefile under /opt as well it adds a redundant post-install step to add the path to MODULEPATH.
When --define 'install_in_opt 1' is set, the spec file should not change %{_sysconfdir}.