Páginas

2011-09-19

[drops.log]: FHS, where to install stuff?

I have been reading the the Filesystem Hiearchy Standart (FHS) documentation. As I was reading I was checking the contents o different Linux boxes I have access to (debian, ubuntu and CentOS). What got me confused was about the /opt. Since google chrome is installed in the /opt/google/chrome as recommended but besides that /opt directories were empty.

But, wait. Shouldn’t be firefox, libreoffice, pidgin, etc. in /opt, making it full of directories? I lost my reading track and started to search why, in the document and the net. A linux magazine article was helpful. Even if I am not totally sure that is why I guess firefox is in /usr and google chrome is in /opt:
Firefox is shipped with the distribution. Even if optional package say for instance Inkscape is avaliable in the distro repositories the distro guys install it in the /usr. Google chrome in other hand is not provided with the distribution. Since google chrome is not part of the distribution it should be installed in the proper place, in that case /opt.
The point could be incompatibility of Licenses but since Gnome is GPL, Firefox is Mozilla Public License ("MPL"), and LibreOffice LGPL and they are shipped together in one basic, initial instalation of a distro like ubuntu. So I guess I am going to stick with my former explanation.
One could say the point of /usr is to be shareable. Agreed. It is one of the characteristics expressed in the FSH documentation. But, if can firefox installation shareable, why couldn’t chrome?
Anyway, what that conclusion got me was: So if I develop a piece of software I should make it be instalable in the /opt correctly, but if one distro decides to put my software in their product they should move the instalation to /usr. That could get even with different version. Let’s say: the most recent release I program to /opt, and if the distro has frozen that package their instalation is in /usr and if a user download my package and installs it he should get two different ersions, one in the /opt alien to the distro and other in /usr distro official.
I hope I have gotten that right. We must keep FHS on mind when developing.

Nenhum comentário:

Postar um comentário