4 ms·
> So you'd prefer, if no packages are available, unpackaged software be installed to /opt rather than /usr/local? OK. Ah, I did miss the subfolder. This is a v
by kiallmacinnes 11y ago
> So you'd prefer, if no packages are available, unpackaged software be installed to /opt rather than /usr/local? OK.
Ah, I did miss the subfolder. This is a very unusual convention for installation into /usr/local. Typically, this is what modern day usage of /opt looks like.
> The FHS forbids distros from installing software to either location.
> See http://www.pathname.com/fhs/2.2/fhs-4.9.html http://www.pathname.com/fhs/2.2/fhs-4.9.html:
Correct, both options are valid per the FHS. Yet, the description for /opt describes the pattern used in your example.
See http://www.pathname.com/fhs/2.2/fhs-3.12.html http://www.pathname.com/fhs/2.2/fhs-3.12.html:
"A package to be installed in /opt must locate its static files in a separate /opt/<package> directory tree, where <package> is a name that describes the software package."
- nailer 11y agoI see your point - I used to be reticent to use /opt since it was a bit of a Solaris-ism (it only got added to the FHS because the proprietary Unixes kept asking for it). I'm thinking about changing it to /opt instead (and will credit you if I do it), alas /opt/bin isn't in $PATH on most distros.
- merb 11y agoThey can't just add /opt/bin to $PATH Read the link he wrote down: > Programs to be invoked by users must be located in the > directory /opt/<package>/bin. If the package includes UNIX > manual pages, they must be located in /opt/<package>/man > and the same substructure as /usr/share/man must be used. Static packages should be kept together as /opt/myprogramm and mostly follow the same structure as /usr than so like: /opt/myprogramm/bin /opt/myprogramm/include /opt/myprogramm/lib ... Mostly I put my programs there, too. /opt/app1 /opt/app2
- nailer 11y agonod that's the thing - you'll break the interpreter for every node app - '#!/usr/bin/env node' - if you don't have node in $PATH. And as you say. /opt apps normally aren't in $PATH. Looks like /usr/local wins.
- merb 11y agoIt won't. Why should I install node in /opt? Mostly I install server-side or desktop apps there (which most other people do aswell (Chrome, Atlasssian)) They don't need to be in path since they are mostly called by initd or sytemd or .desktop file. Also they don't screw the system as others do that won't get installed with the package manager. Don't touch any directory without the package manager, if you still do use /opt.
- nailer 11y agoI think most people would install desktop apps via their package manager. Unpackaged apps are generally the exception rather than the rule. /usr/local is also outside the package manager as previously discussed.