[CWB] [ cwb-Bugs-3043353 ] rpm should never install files in /usr/local

SourceForge.net noreply at sourceforge.net
Fri Aug 13 14:08:49 CEST 2010


Bugs item #3043353, was opened at 2010-08-12 00:26
Message generated for change (Comment added) made by imsedgar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=3043353&group_id=131809

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compilation issues
Group: None
Status: Closed
Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Edgar Hoch (imsedgar)
Assigned to: Nobody/Anonymous (nobody)
Summary: rpm should never install files in /usr/local

Initial Comment:
The file rpm-linux.spec build a rpm package that installs files in /usr/local.
But /usr/local is by convention reserved for manual installation of system administrators and should never be modified by a software package.
Sie Linux Standard Base (LSF), which uses Filesystem Hierarchy Standard (FHS):
http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY

Add-on software should install in /opt:
http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES

Following this the rpm-linux.spec and config/site/linux-rpm should be changed to install in /opt/ims-ocwb/ or something similar.
The package can make symbolic links in /usr/bin for the user callable programms.

If I will have time I will provide patches some day.


----------------------------------------------------------------------

Comment By: Edgar Hoch (imsedgar)
Date: 2010-08-13 14:08

Message:
I am not sure if you understand what I mean. If you install cwb manually by
make and make install etc., then /usr/local ist right. I didn't suggest to
change the default place for manual installation!

But when you create a rpm package, then the software must be installed on
other places. Instead of /opt you may also choose /usr, if you are sure
that there will be no name clash with other linux system packages.

Please see also the fedora packaging guide lines.
http://fedoraproject.org/wiki/PackageMaintainers/CreatingPackageHowTo#.25build_section
http://fedoraproject.org/wiki/Packaging/Guidelines#Filesystem_Layout

Yes, you will find comments in the net for many topics one telling A and
the other telling B. But I think the better source for our problem are
official guidelines from linux maintainers like these of fedora and the
Filesystem Hierarchy Standard. Here a quote of FHS:

"The /usr/local hierarchy is for use by the system administrator when
installing software locally. It needs to be safe from being overwritten
when the system software is updated. It may be used for programs and data
that are shareable amongst a group of hosts, but not found in /usr."

This entails that no rpm package should write to /usr/local because when
there is an update the this update rpm package overwrites files in
/usr/local (which could have been modified by the system administrator or
manually installed (outside a package)).
I think you can agree that package management is a system task and
therefore a rpm install and update subsumes in "when the system software is
updated".

Also FHS tells that /usr/local may be shareable amoung a group of hosts.
We have /usr/local shared over nfs so it is not possible to install
packages that put anything in /usr/local because either the package has no
right to write there (as root over nfs) or - if it would possible - every
install on another host would overwrite the of the ofther, and an uninstall
would remove files that where needed on other hosts.

You mention that if you change to /opt people will have two version of
cwb, one in /usr/local and one in /opt.
That is not true. Either they install manually with "make" etc - then
nothing should change, cwb should got to /usr/local as usual.
But when they have created a rpm package and installed this then rpm _has_
an uninstall script build in, so in update or an uninstall and install will
remove all the files that have belonged to the old package and are no
longer in the new one. So the cwb files from the rpm package in /usr/local
will be removed if the new package have the files in /opt. So your third
argument is invalidated.

You argue that it's not clear that CWB is more appropriately labelled
"add-on software" than "manual installation of systemadministrators". You
argue that cwb is manually installed and that a sysadmin do it.
First, if the system administrator installs the software manually by
"make" etc then /usrr/local is the right place - as mentioned above.
But then the system administrator creates a package then installing a
package is - conventionally - not called a "manual installation". A package
installation is an automatic or system installation because the package
manager does the placing of the files, updates the database, may run
scripts, etc.
And any packages that are not part of the system distribution (for
example, the fedora repositories), are not system package and usually
called "add-on software" in the sense of package management. "add-on
software" doesn't qualify cwb as anything other than that it is not part of
the linux distribution - I think you can agree in this conclusion.

So I think that "Wont Fix" is not adequate for this problem.
Please also ask Stefan.
Thanks and best regards


----------------------------------------------------------------------

Comment By: Andrew Hardie (andrewhardie)
Date: 2010-08-13 10:25

Message:
I am not convinced of the need for this change; firstly because it's not
clear that CWB is more appropriately labelled "add-on software" than
"manual installation of system administrators" (clearly it is manually
installed and clearly it's sysadmins who do it!); secondly because a quick
look around the webs suggests that, in any case, the distinction between
/opt and /usr/local is not so clear cut. See:

http://www.linuxjournal.com/magazine/pointcounterpoint-opt-vs-usrlocal
http://lists.netisland.net/archives/plug/plug-2006-01/msg00130.html
http://serverfault.com/questions/96416/should-i-install-linux-applications-in-var-or-opt
http://superuser.com/questions/122420/usr-local-or-opt
http://art.ubuntuforums.org/showthread.php?p=8848283

...the comments on the last three pages in particular suggest that,
insofar as there is a difference, /usr/local is better for CWB. Thirdly and
finally, since we've been installing in /usr/local and there is no
uninstall script, changing to /opt would mean everyone would have two
versions of CWB in parallel the next time they updated - potentially
bothersome. So -- unless Stefan thinks differently -- I'm marking this a
won't-fix.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=722303&aid=3043353&group_id=131809


More information about the CWB mailing list