Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/usr/local config #13

Open
begin-theadventure opened this issue Sep 3, 2023 · 2 comments
Open

/usr/local config #13

begin-theadventure opened this issue Sep 3, 2023 · 2 comments

Comments

@begin-theadventure
Copy link

Shouldn't /usr/local in config.rs be changed to /etc?
Filesystem Hierarchy Standard - "Note that /usr/etc is still not allowed: programs in /usr should place configuration files in /etc"
Arch Wiki - "Packages should never be installed to /usr/local/".

@mqudsi
Copy link
Owner

mqudsi commented Sep 5, 2023

Thanks for noticing an issue with where the configuration files are loaded from and opening this thread, @begin-theadventure. I have a few different answers/points related to your questions:

  • PREFIX is a de facto environment/make variable always set when compiling an application/library (as a package or w/out any package integration) and indicates what all standard locations should be prefixed with - so the link in your post to config.rs:42 (get_prefix()) is fine and wouldn't be touched regardless of anything. In this case, it's saying if the user hasn't overridden PREFIX then install the binary to /usr/local/bin/syngestures (and other stuff would be incidental).
  • For me personally, my unix reference is first and foremost (Free)BSD and not Arch or any other Linux distribution. FreeBSD's hier(7) explains the hierarchy on FreeBSD, where packages are, in fact, installed to /usr/local/ together with their (sometimes user-editable) configuration files.
  • Even for Arch, I don't think anything in this package conflicts with installing the application to a prefix of /usr/local by default - this repo does not house a package, it houses an open source application that distro maintainers may choose to package on their own. I think there is consensus that a manually-downloaded, hand-compiled, and hand-installed app foo should be installed to /usr/local/ so it doesn't interfere with binaries installed via the (system) package manager.

That's all just for the PREFIX stuff. Now I agree with you that the default global configuration directory should be /etc/ (even if prefix was /usr/local) and that it's a bug /etc/syngestures.toml and /etc/sysngestures.d/*.toml aren't searched by the current logic. Those should indeed be queried first before overriding/merging with a configuration from $PREFIX/etc/syngestures.... (I'm pretty sure the first version did that and the current behavior is a regression, but I could be wrong and misremembering.)

@begin-theadventure
Copy link
Author

begin-theadventure commented Sep 6, 2023

Thanks for the reply and explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants