[Fedora-packaging] Draft for the use of environment-modules

Doug Ledford dledford at redhat.com
Fri Jul 24 12:46:00 UTC 2009


On Jul 23, 2009, at 5:56 PM, Milos Jakubicek wrote:
> On 22.7.2009 18:37, Jussi Lehtola wrote:
>>>
>>> Maybe we should also discuss about the way MPI programs are  
>>> packaged.
>>> Some possible options:
>>
>> Actually, I wrote a draft for this as well. Please have a look at
>> https://fedoraproject.org/wiki/PackagingDrafts/MPI
>
> Well done, I think you could take also some inspiration from hints  
> made by Doug Ledford in BZ#511099:
>
> - what about making the $MPI_HOME, $MPI_BIN and $MPI_LIB variables a  
> MUST?

I would strongly support this.

> - we should make the sample of specfile from the BZ#511099 part of  
> the draft
>
> Some other things that come to my mind:
>
> - the libraries must have the suffix OR they could be installed  
> under %{_libdir}/%{name}/%{version}-<MPI compiler>/lib (i.e. there  
> should similar two choices as for the binaries)

I would say the libraries MUST be installed under $MPI_LIB and any  
resulting binaries MUST be installed under $MPI_BIN.  This makes is so  
that loading the MPI environment module automatically gets you all the  
associated binaries and libraries needed.

> - each MPI build of shared libraries should have a separate -devel  
> subpackage (having them in a single -devel subpackage would need a  
> require of all MPI builds for it, which is imho not good)

This is probably good, and would need to be under $MPI_INCLUDE maybe?   
It might be worth while to consider simply making it a rule that the  
following directories always exist:

$MPI_HOME/bin
$MPI_HOME/lib
$MPI_HOME/include
$MPI_HOME/man

and that they are the standard destination for MPI built programs.   
The man directory is somewhat optional as man pages should be able to  
go in /usr/share/man and simply be reused from the base package, they  
don't normally vary from a non-MPI build to an MPI build.  However,  
the man dir is needed for the MPI packages themselves as they all have  
rather extensive, competing man pages.

> - the main package should be always built without MPI support, if  
> that is possible (i.e. a MUST would be: build at least without MPI  
> (if possible) and with OpenMPI)

You can't do a must as there are some MPI only apps out there  
(mpitests is an easy example).  But a strong should would work.

> I'm also CCing Deji Akingunola and Doug Ledford who are the   
> maintainers of MPI compilers currently available in Fedora, not sure  
> whether they follow this discussion, but they definitely should.


So, as per our conversation in IRC, here's the directory struction I  
would recommend.  This is brought out by the fact that the current MPI  
directory structure I'm using seriously abuses %{_libdir} by putting  
way too much stuff under there.  We don't really want to use /opt  
(even though that's really the perfect place for this) because of the  
whole issue of wanting this to be able to be mounted as a read only  
network filesystem and putting it in /opt adds a new mount point (and  
also adds complexity to drive partitioning issues).  So, keeping it  
under /usr would seem to be a very important goal.  However, we have  
binaries, man pages, libraries, include files, and now we are talking  
about other packages tossing their stuff under these directories too.   
That is a rather excessive abuse of %{_libdir}.  The FHS doesn't  
really have an option to cover this.  At all.  I don't think we can  
accomplish what needs done while adhering strictly to the FHS.  So, I  
think there are two options:

1) Create a suitable MPI_HOME that can hold the entire bunch of stuff  
from a given MPI package (maybe something like /usr/opt, /usr/local/ 
mpi, or /usr/mpi) and under that top level directory install the  
multiple mpi packages and also allow for the installation of mpi  
linked libraries and binaries.

2) Try to split things up into normal FHS locations, but don't use  
binary name suffixes or library name suffixes in the normal  
directories, instead use things like /bin/%{name}-%{_arch}%{? 
opt_cc_suffix}, %{_libdir}/%{name}%{?opt_cc_suffix}, %{_includedir}/% 
{name}-%{_arch}%{?opt_cc_suffix}, %{_datadir}/%{name}-%{_arch}%{? 
opt_cc_suffix}, %{_datadir}/%{name}-%{_arch}%{?opt_cc_suffix}/man.   
While the above is somewhat clumsy, and also eliminates the  
possibility of MPI_HOME being useful as we would now need independent  
definitions of all the various MPI locations, it does have the benefit  
of being mostly FHS compliant.

Regardless of which way people would prefer to go, I do think we  
should go ahead and standardize all the config files in %{_sysconfdir}/ 
%{name}-%{_arch}%{?opt_cc_suffix} so that they won't possibly be on a  
read only filesystem.

Thoughts?  If we can get this standard more or less agree on, I'll get  
the F-11 and devel packages of both lam and openmpi updated the same  
day.

--

Doug Ledford <dledford at redhat.com>

GPG KeyID: CFBFF194
http://people.redhat.com/dledford

InfiniBand Specific RPMS
http://people.redhat.com/dledford/Infiniband




-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20090724/ca507d52/attachment.sig>


More information about the Fedora-packaging mailing list