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

user_runtime_dir for *BSD #190

Closed
ThomasWaldmann opened this issue Jun 12, 2023 · 3 comments
Closed

user_runtime_dir for *BSD #190

ThomasWaldmann opened this issue Jun 12, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ThomasWaldmann
Copy link
Contributor

ThomasWaldmann commented Jun 12, 2023

completely broken, returns invalid directory, see there:

borgbackup/borg#7638

when fixing this, make sure it works for root and for other users, see also: #188

@ThomasWaldmann ThomasWaldmann changed the title user_runtime_dir for *BSD user_runtime_dir for *BSD Jun 12, 2023
@ThomasWaldmann ThomasWaldmann changed the title user_runtime_dir for *BSD user_runtime_dir for *BSD Jun 12, 2023
@ThomasWaldmann ThomasWaldmann changed the title user_runtime_dir for *BSD user_runtime_dir for *BSD Jun 12, 2023
@RayyanAnsari
Copy link
Contributor

RayyanAnsari commented Jun 13, 2023

Some notes:

https://github.com/platformdirs/platformdirs/blob/50e638eec6cadee0dfe47197464241be8a70718d/src/platformdirs/unix.py#L150-L152

In Linux, /run was introduced with FHS 3.0, replacing /var/run (which still exists as a symlink for back compat). See FHS 3.0: /var/run and FHS 3.0: /run. The /run/user/$uid directory is created by pam_systemd, which also sets $XDG_RUNTIME_DIR (not sure about what OpenRC does).

On FreeBSD, the /run directory does not exist, instead using /var/run. See FreeBSD: hier(7). There is a package named pam_xdg that creates a runtime directory somewhere (I'm not exactly sure where, haven't tried it myself), and sets $XDG_RUNTIME_DIR. However this is not installed by default and there are no packages that are dependent on it. See FreeBSD: pam_xdg(8).
I have also not seen this package on other BSDs.

@ofek
Copy link
Collaborator

ofek commented Jun 13, 2023

Would you be open to contributing a fix? We would gladly accept and release shortly after.

@gaborbernat
Copy link
Member

#201 fixed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants