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

Generation ID stored in /var/lib should be in /var/lib/misc (FHS) #37

Closed
troglobit opened this issue Sep 20, 2020 · 0 comments
Closed
Milestone

Comments

@troglobit
Copy link
Owner

troglobit commented Sep 20, 2020

In #25 we added support for persistent genid, but got the path wrong.

On Linux based systems we should honor the FHS:

"An application (or a group of inter-related applications) must use a subdirectory of /var/lib for its data.
There is one > required subdirectory, /var/lib/misc, which is intended for state files that don't need a subdirectory; ..."

On UNIX systems we should use /var/db.

Hence, _PATH_VARDB in /usr/include/paths.h really is the one to rely on here. Except some C-libraries on Linux still use /var/db, and the system is not guaranteed to have that path, or even a symlink to /var/lib/misc. So, we can either guess/probe on the system or make this a configure option, because some users don't even want to follow the FHS or a traditional hier(7).

@troglobit troglobit added this to the 4.1 milestone Sep 20, 2020
troglobit added a commit that referenced this issue Jun 4, 2023
Follow-up to #37 in 5438ff3, which somehow failed to fix this issue
properly.  To make matters worse, however, it turns out there are
several Linux systems out there still that has _PATH_VARDB set to
/var/db instead of the FHS standardized /var/lib/misc, so we have
to add a check for that too.

Signed-off-by: Joachim Wiberg <[email protected]>
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

1 participant