FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 10-08-2008, 09:28 AM
Denis Leroy
 
Default The role of %{_libexecdir} for using environment-modules

Jussi Lehtola wrote:

Hi,


I'm working on a couple of packages (gromacs and gromacs3) that are
going to use environment-modules since they have a lot of binaries that
otherwise would go to /usr/bin and some of them have very generic names
(e.g. wheel, luck and highway). This way a user can have both the new
release series and the old stable series installed and decide which
version to use.

What is the correct place to put these (architecture dependent)
binaries? Is it OK to use %{_libexecdir}/%{name} (or
%{name}-%{version}) ?


I would recommend %{_libexecdir}/%{name} which seems fairly common. Or
possibly %{_libexecdir}/%{name}-%{ABI} or %{name}-%{version}, but does
it really make sense to have multiple versions installed at the same
time ? Will that be a common scenario for gromacs users ?


As for finding the binaries, I would personally prefer to patch the code
to look for the binaries in the packaged directory rather than use
profile.d.


-denis

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 10:13 AM
Jussi Lehtola
 
Default The role of %{_libexecdir} for using environment-modules

On Wed, 2008-10-08 at 10:28 +0200, Denis Leroy wrote:
> > What is the correct place to put these (architecture dependent)
> > binaries? Is it OK to use %{_libexecdir}/%{name} (or
> > %{name}-%{version}) ?
>
> I would recommend %{_libexecdir}/%{name} which seems fairly common. Or
> possibly %{_libexecdir}/%{name}-%{ABI} or %{name}-%{version}, but does
> it really make sense to have multiple versions installed at the same
> time ? Will that be a common scenario for gromacs users ?

OK, good. Thanks.

Many people are using the older release series, since they have
calculated stuff using it and do not want to use the new release series
since it does things differently. That's the main reason why the older
series should still be available.


On Wed, 2008-10-08 at 10:32 +0200, Patrice Dumas wrote:
On Wed, Oct 08, 2008 at 10:28:35AM +0200, Denis Leroy wrote:
> >
> > As for finding the binaries, I would personally prefer to patch the
code
> > to look for the binaries in the packaged directory rather than use
> > profile.d.
>
> Agreed, with the addition than the env variables should still be taken
> into account, but in case they are not defined, the default paths
should
> be the right ones.

OK. Environment-modules automatically modifies the system paths in such
a way that everything works as it should. I made a simple profile.d
file:
module load gromacs

so that the new release series is automatically loaded.
--
------------------------------------------------------
Jussi Lehtola, FM, Tohtorikoulutettava
Fysiikan laitos, Helsingin Yliopisto
jussi.lehtola@helsinki.fi, p. 191 50632
------------------------------------------------------
Mr. Jussi Lehtola, M. Sc., Doctoral Student
Department of Physics, University of Helsinki, Finland
jussi.lehtola@helsinki.fi
------------------------------------------------------

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 11:55 AM
Jason L Tibbitts III
 
Default The role of %{_libexecdir} for using environment-modules

>>>>> "DL" == Denis Leroy <denis@poolshark.org> writes:

DL> I would recommend %{_libexecdir}/%{name} which seems fairly
DL> common. Or possibly %{_libexecdir}/%{name}-%{ABI} or
DL> %{name}-%{version}, but does it really make sense to have multiple
DL> versions installed at the same time ?

My understanding of the purpose of libexec is that this is fine for
internal binaries, but not for binaries which are expected to be run
by the end user. However, I don't think libexec is mentioned by FHS
so I guess its up to us (FPC) to make a decision.

The only example that comes to mind of something that has a
non-standard location for binaries is kerberos (/usr/kerberos/bin) but
that seems to be more of a historical thing. What other options are
there? Something under /usr/lib? Does multilib come into this
decision at all?

- J<

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 12:15 PM
Ralf Corsepius
 
Default The role of %{_libexecdir} for using environment-modules

On Wed, 2008-10-08 at 05:55 -0500, Jason L Tibbitts III wrote:
> >>>>> "DL" == Denis Leroy <denis@poolshark.org> writes:
>
> DL> I would recommend %{_libexecdir}/%{name} which seems fairly
> DL> common. Or possibly %{_libexecdir}/%{name}-%{ABI} or
> DL> %{name}-%{version}, but does it really make sense to have multiple
> DL> versions installed at the same time ?
>
> My understanding of the purpose of libexec is that this is fine for
> internal binaries, but not for binaries which are expected to be run
> by the end user.
Right.

> However, I don't think libexec is mentioned by FHS
> so I guess its up to us (FPC) to make a decision.
libexecdir has its origin in the GNU-standards.

cf. http://www.gnu.org/prep/standards/standards.html#Directory-Variables

> What other options are
> there? Something under /usr/lib?
Yes, this had been the traditional substitute being used by the FHS and
by RH-based distros.

> Does multilib come into this decision at all?
Normally not. The files inside of libexec are supposed to be
executables/applications, i.e. they normally don't make much sense to be
multilib'ed, but should be treated analogous to files in $(bindir).

Also, using $(libdir) would render application search paths
"arch-dependent", while using $(libexec) would be arch-independent.

Ralf




--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 01:10 PM
Denis Leroy
 
Default The role of %{_libexecdir} for using environment-modules

Jussi Lehtola wrote:

Hi,


I'm working on a couple of packages (gromacs and gromacs3) that are
going to use environment-modules since they have a lot of binaries that
otherwise would go to /usr/bin and some of them have very generic names
(e.g. wheel, luck and highway).


Are these generic-named executables meant to be ran directly by the user
from a shell, or by another executable ? I assumed the latter in my
previous response.


--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 01:24 PM
Jussi Lehtola
 
Default The role of %{_libexecdir} for using environment-modules

On Wed, 2008-10-08 at 14:10 +0200, Denis Leroy wrote:
> Are these generic-named executables meant to be ran directly by the
> user
> from a shell, or by another executable ? I assumed the latter in my
> previous response.

Directly by the user. /usr/bin is out of the question due to

a) two major versions need to be able to coexist on a system with the
user having the liberty to choose among them

b) the binaries with general names may clash with other packages. Of
course this could be solved by renaming the executables in the spec
file, but this would break compatibility with upstream naming.

By using environment-modules the binaries themselves can be put
anywhere, since loading the module appends the path to find them.
--
------------------------------------------------------
Jussi Lehtola, FM, Tohtorikoulutettava
Fysiikan laitos, Helsingin Yliopisto
jussi.lehtola@helsinki.fi, p. 191 50632
------------------------------------------------------
Mr. Jussi Lehtola, M. Sc., Doctoral Student
Department of Physics, University of Helsinki, Finland
jussi.lehtola@helsinki.fi
------------------------------------------------------

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 02:42 PM
Rex Dieter
 
Default The role of %{_libexecdir} for using environment-modules

Dominik 'Rathann' Mierzejewski wrote:

On Wednesday, 08 October 2008 at 15:28, Ed Hill wrote:



/usr/libexec/%{name}
/usr/libexec/%{name}-%{version}

that allows both names and, if desired, versions.


It still feels like a bit of an abuse of libexec.
I prefer using %{_libdir}/%{name}(-%{version})/bin for this purpose.


Agreed. As had been pointed out already, libexec is for private stuff,
not exposed to the end-user.


Also, while I'm not familiar with the app, it still feels odd to ship >
1 version, and should be avoided if reasonably possible.


-- Rex

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 05:25 PM
Rex Dieter
 
Default The role of %{_libexecdir} for using environment-modules

Ed Hill wrote:

If you use %{_libdir} then you will have to deal with multi-lib


What makes you say that?

-- Rex

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-08-2008, 09:34 PM
Ed Hill
 
Default The role of %{_libexecdir} for using environment-modules

On Wed, 08 Oct 2008 11:59:09 -0700 Toshio Kuratomi wrote:
>
> There's two possible ways to work around this:
> %{_libexecdir}
> /usr/libexec/gromacs-2/bin/wheel
>
> /usr/lib (*not* %{_libdir}):
> /usr/lib/gromacs-2/bin/wheel
>
> I don't know that I favor one of these over the other... they both
> have precedent. You could look at this as end-user applications or as
> environment-modules making these binaries "private" to the
> environment-modules "program".

Yes, absolutely! I can think of examples where both /usr/lib
and /usr/libexec have been used for "private" executables. I don't
have a strong preference for either -- I just want one to be chosen as
the "standard Fedora way" to handle the various use cases I described
earlier.


> A third way to look at this would be to have an environment-modules
> directory and place things within that:
> /usr/libexec/environment-modules/gromacs-2/bin/wheel

I'm against the inclusion of "environment-modules" in the path since
you don't *have* to use environment-modules to take advantage of the
multiple implementations or versions once they are made available. One
can always add the desired paths by hand or via ~/.bash_profile or
some other way.


> I'm not sure whether environment-modules only handles executables or
> if it also handles libraries, datafiles, etc, though. So I don't know
> whether that's the best place for an environment-modules directory to
> live. Ed, do you have a comment on whether this is a good or bad idea
> for use of environment-modules?

The environment-variables system can and does (and is often used at
cluster and/or "supercomputer" sites) to handle all sorts of
environment variables including:

PATH, MANPATH, LD_LIBRARY_PATH, CFLAGS, LDFLAGS, etc.

The environment-modules can also depend upon each other (so using one
automatically pulls in all its dependencies). But that's another
topic...

Ed

--
Edward H. Hill III, PhD | ed@eh3.com | http://eh3.com/
--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 
Old 10-09-2008, 02:41 AM
Jens Petersen
 
Default The role of %{_libexecdir} for using environment-modules

> As Ralf said, when you place binaries into %{_libdir} you have to deal
> with different paths on different systems.
>
> On x86:
> /usr/lib/gromacs-2/bin/wheel
>
> On x86_64:
> /usr/lib64/gromacs-2/bin/wheel

I don't see any problem with using %{_libdir} for this: it should be straight forward to script into the environment modules and it would even allow multilib if for some obscure user that were desirable.

Jens

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging
 

Thread Tools




All times are GMT. The time now is 08:19 AM.

VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org