/usr/local

Eero Tamminen eero.tamminen at nokia.com
Wed Dec 30 15:15:30 EET 2009


Hi,

ext Thomas Tanner wrote:
> sorry for my ignorance - I've only recently started following the
> optification discussion.
> 
> Is there any good reason why Maemo does not follow the standard UNIX
> layout with user applications in /usr/local ?
> /usr/local seems to be in all search paths and if /usr/local
> would be just a symlink to /home/local there would be no need
> for further symlink tricks.

According to the filesystem hierarchy standard, /usr/local is for
things that are NOT tracked by system package management:
http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY

Whereas /opt is standardized place for 3rd party software:
http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES

I haven't looked what maemo-optify exactly does, but I think
the standard compliant way would be to install package contents
to /opt/<package>/ (with ./configure --prefix).  The .desktop file
will tell to invoke the /opt binaries from a correct place.
If autotools doesn't automatically put things like icons and
.desktop files to correct place, those could have symlinks to
rootfs.

Problematic issues would be how to deal with shared libraries,
for those symlinks would probably be still the best option.
I mean, adding symlink to /opt/lib and having that in $LD_LIBRARY_PATH,
not symlinking the libs to rootfs.

Direct invocations of binaries from scripts could also be problematic.
For those there could be a symlink to /opt/bin and that could be
in $PATH.


	- Eero

(And if somebody would want more space for applications than is
available on /home partition, he could change the /opt symlink to
point to a memory card with suitable file system and prepare for
the issues resulting from having programs on removable media...)


More information about the maemo-developers mailing list