[packagers] Repos and LSB?

Bent Terp Bent.Terp at cgb.ki.se
Wed Jun 15 07:42:11 CEST 2005

On Tue 14 June 2005 17.59, Morten Kjeldgaard wrote:
> This raises a fundemental problem of the way we are packaging, because
> it is not compliant with the Linux Standard Base. According to that
> specification, the /usr partition is reserved for the system ONLY, users
> or local admins should NOT install programs there.

Correct. But packagers are not local users or admins - at least not when 
they're packaging ;-)

When I install things directly (good ole tar,configure,make, make install) I 
use /usr/local as basedir; but I use %{prefix} as base when building.

> Instead, LSB uses the
> /opt partition for applications

Last time I checked, LSB refers to Filesystem Hierarchy Standard, which says 
the following about /usr/bin: "This is the primary directory of executable 
commands on the system."

And for /usr/local: "The /usr/local hierarchy is for use by the system 
administrator when installing software locally", but also that "Locally 
installed software must be placed within /usr/local rather than /usr unless 
it is being installed to replace or upgrade software in /usr."

So I guess it comes down to defining "locally installed" - for me it's been 
tarballs, rather than rpms; but Morten seems to define it as everything not 
part of the original CD's. I can't claim to know which definition is right.

> However, in the RPM packaging world, executables are almost always
> placed in /usr/bin, no matter how exotic they are, and this leads to
> conflicts like the one I ran into.

Look at it from the positive side: this way you noticed upfront that there was 
a collision - otherwise you could have had some rather interesting output 
from scripts that suddenly found themselves calling /usr/local/bin/factor 
instead of the expected /usr/bin/factor - or viceversa depending on your 

> I am a bit reluctant to start using /opt, because in most installations
> I have seen, that directory would end up on the (usually small) root
> partition.

But that's easily fixed down the road with an mv and a mount.

> Alternatively, one could use /usr/local, which IMO would be
> better, but I tend to think of /usr/local as the local sysadm's
> playground where various stuff would get installed outside the RPM
> system.

Me too :-D

> I'd be interested in hearing if someone has given this some thought!

We COULD register rpmforge with LANANA 
<http://www.lanana.org/lsbreg/instructions.html> and use /opt/rpmforge as 
%{prefix}. That would mean that e.g. O goes in /opt/rpmforge/O and ncbiblast 
in /opt/rpmforge/ncbiblast.

We'd then need %postinstall's doing symlinks fron 
e.g. /opt/rpmforge/ncbiblast./bin/blastall into /opt/bin and a lot more down 
that road.

BUT even with everybody agreeing on this and a common rpmforge-config package 
(adding /opt/bin to $PATH and such), it wouldn't solve the collision problem 
in general, merely reduce it.

I had a collision in PHYLIP, but chose merely to rename factor to 
phylip.factor, which may seem flippant but I couldn't really figure out what 
else to do - basically I consider the phylip author to be at fault for 
creating the collision in the first place.... come to think of it, Morten, 
are you building phylip as well? Given that you mention factor as the 


More information about the packagers mailing list