-
Notifications
You must be signed in to change notification settings - Fork 202
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
fix: Global flock fallback to single-user mode if not enough permissions #1756
Conversation
…xed that damn Sphinx config again"
How to test this? Is see "INFO: Lock" and "INFO: Unlock". Is that it? |
Hello Willem,
You should make sure to activate Run only one snapshot at a time in the Options tab of the Manage profiles (or Profile Settings) dialog? This need to be done for your users BIT profile and for your roots BIT profile. Run BIT in terminal with
If running as root the path is different.
When running again as user, after running it as root, the path should also be /run/lock. |
Checked it on Arch in Distrobox, as a non-root user. Also does not crash. (Running as root would require more setup.) |
I see no strong need for an additional review. Despite myself, two users tested the solution and reported no problems. Because of the time resources I hope it is OK for others if I merge this in the upcoming weekend. |
The global flock context manager (introduced in #1679) now fall back to single-user mode if not enough permissions available to create an flock file accessible by other users and root. The multi-user mode will be activate later until BIT is started as root for the first time. It will create an flock file accessible by all users. That behavior is relevant for Arch-based systems but not relevant on Debian-based systems because regular users have enough permissions to /run/lock. See the docstring for technical details.
It also fix a bug (introduced with #1679) ignoring the config value of
global.use_flock
.Additionally I modified and fixed the Sphinx config to make all necessary information about this behavior available in the generated HTML documentation.
Fix #1743
Fix #1751