FreeSpacenav / spacenavd

Free user-space driver for 6-dof space-mice.
http://spacenav.sourceforge.net
GNU General Public License v3.0
279 stars 55 forks source link

Point spacenavd.service at new binary location #23

Closed dyaso closed 4 years ago

dyaso commented 4 years ago

The spacenavd binary's install location seems to've changed since contrib/systemd/spacenavd.service was contributed.

jtsiomb commented 4 years ago

Isn't that distribution-specific? Also it goes against the filesystem hierarchy standard. Distribution-managed installations are supposed to go to /usr, user-compiled programs are supposed to go to /usr/local.

Edit: nevermind, I thought you meant it changed in some distribution. No, the default prefix never changed in the spacenavd source releases. It always was /usr/local. I guess the contributor of the systemd service file just assumed /usr for some reason. I never even looked at the file to be honest, and I don't care what's in it, hence it being in "contrib".

jtsiomb commented 4 years ago

I guess it's more consistent with the rest of spacenavd if it uses the default prefix, though either can be wrong depending on the arguments passed to ./configure. If I was going to maintain the systemd file, I'd auto-generate one from the configure script, but since I'm not, for consistency's sake I'll just merge this.

dyaso commented 4 years ago

Isn't that distribution-specific? [...] Distribution-managed installations are supposed to go to /usr, user-compiled programs are supposed to go to /usr/local.

Oh dear, i didn't know that. Probably better to undo this PR then, at least as submitted it would break the distribution i use, and i assume others -- i didn't even think to check for distribution-provided packages before compiling spacenavd myself, assuming it was too obscure, and then found it didn't seem to be starting.

Thanks for maintaining this project btw, i was so irritated when i bought a newer SpaceMouse model in 2017, then found their linux drivers hadn't updated since 2014 and didn't support it.

dyaso commented 4 years ago

Putting the line

sed -i "s/\/usr/$(echo $PREFIX | sed 's/\//\\\//g')/" ./contrib/systemd/spacenavd.service

into ./configure would have been a better way to do what i was trying to do with this PR, but understandable if you don't want any changes to that.

Sorry for bothering you, i should definitely have opened an Issue and discussed this first.

jtsiomb commented 4 years ago

No as I said, I prefer the supplied service file be consistent with the rest of the spacenavd distribution, and the source distribution does default to /usr/local. That should be the default. The only reason I never caught this inconsistency is that really I never even opened and looked at this file. I just included it as an extra help for users who need to set spacenavd up on their systems that happen to use systemd.

GNU/Linux distribution packagers are more than capable of modifying whatever files they need or providing their own service files if they have to, to make eveyrthing work correctly for their distribution.