kplex icon indicating copy to clipboard operation
kplex copied to clipboard

fix default prefix location for linux.

Open FredericGuilbault opened this issue 5 years ago • 3 comments

Under linux every binary that are not provided by a package manager should be under a local/ folder.

Default value should expect manual build As each Distro have it's own package builder that will launch the makefile from their own build procedure. it's in their role to define the prefix used in their respective distro.

FredericGuilbault avatar Oct 12 '20 22:10 FredericGuilbault

This is a sensible update but has knock-on implications: the unit file / init file would also need to be changed although that should be done anyway given that make install could put the binary anywhere. I'd also need to update the documentation. I'm not sure I remember the original reasoning for this but it may have been /usr/local not being in the standard PATH for an earlier version of either ubuntu or raspbian though it's definitely there now. There's also a possible concern about an old version of kplex being left around in /usr after someone has manually make install-ed a version with a new version which puts everything under /usr/local. Would you like to turn this pull request into an "Issue" and I can try to address it all at once? Your thoughts on the issues here would be appreciated.

stripydog avatar Oct 21 '20 11:10 stripydog

Also...while not disagreeing with the notion that locally installed software should generally go under /usr/local and further noting the gnu make docs saying this should be the default, is there another document you're quoting regarding non-package-managed software locations?

stripydog avatar Oct 21 '20 12:10 stripydog

the unit file / init file would also need to be changed

You are right, my PR was a bit naïve. Ill open an issue.


is there another document you're quoting regarding non-package-managed software locations?

It's part of the linux FHS standards

 Purpose of 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.
Locally  installed  software  must  be  placed  within  /usr/local  rather  than  /usr  unless  it  is  being installed to replace or upgrade software in /usr.

https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.pdf (page 21)

Also Unix standards says :

/usr/local | Resembles /usr in structure, but its subdirectories are  used for additions not part of the operating system distribution, such  as custom programs or files from a BSD Ports collection. Usually has subdirectories such as /usr/local/lib or /usr/local/bin.

https://en.wikipedia.org/wiki/Unix_filesystem#Conventional_directory_layout

FredericGuilbault avatar Oct 22 '20 17:10 FredericGuilbault