On 23 March 2017 at 23:41, Jeff Squyres (jsquyres) <jsquy...@cisco.com> wrote:
> Yoinks.  Looks like this was an oversight.  :-(
>
> Yes, I agree that install_in_opt should put the modulefile in /opt as well.

Actually, I have since read the SPEC file from top to bottom and seen a
Changelog entry (from you Jeff. from you!) dating back to 2007 that says

* Fri Feb  9 2007 Jeff Squyres <jsquy...@cisco.com>
...
- Make shell script and modulefile installation indepdendent of
  %{install_in_opt} (they're really separate issues)
...

so are you sure you agree ? (*see below)

> If you could offer a patch or pull request, that would be awesome.

I should get around to cloning a GitHub branch I guess but for now,
it appears to be a simple one-liner

$ diff openmpi-2.0.2.spec openmpi-2.0.2_vuw_gcc.spec
165a166
> %define modulefile_path /opt/%{name}/%{version}/share/openmpi/modulefiles
$

which needs adding at the  bottom of the

%if %{install_in_opt}

stanza. A diff -u patch is attached.


* I think the reasoning for me, is that if the SRPM is being used to create
an OpenMPI that will supercede the RHEL/CentOS system's version
then adding the module into a system area is the right thing, but if an
admin goes to the trouble of "installing in opt" then clearly they want
things "out of the way of the system", in general usage anyway and so
having the modulefile in a place that requires them to take action for
it to become available to the users is a "good thing".

All the best,
Kevin
--- SPECS/openmpi-2.0.2.spec.orig       2017-02-01 13:05:57.000000000 +1300
+++ SPECS/openmpi-2.0.2.spec    2017-03-23 17:11:50.033903233 +1300
@@ -163,6 +163,7 @@
 # bets are off.  So feel free to install it anywhere in your tree.  He
 # suggests $prefix/doc.
 %define _defaultdocdir /opt/%{name}/%{version}/doc
+%define modulefile_path /opt/%{name}/%{version}/share/openmpi/modulefiles
 %endif
 
 %if !%{build_debuginfo_rpm}
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Reply via email to