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

Avoid making build directory read-only #4736

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

Flamefire
Copy link
Contributor

When using e.g. --stop=patch the log directory will be inside the build directory. When --read-only-installdir is set the log directory and the build directory itself will be read-only which is not what the option intended: The ensure_writable_log_dir function changes the permissions of the folder containing the log directory to writeable without checking if this is required. When supposedly reverting it any write permissions will be removed even if they have been there before.

Similar the write permissions of the log directory are removed even when the installation was stopped.

This adds the neccessary checks.

When using e.g. `--stop=patch` the log directory will be inside the build directory. When `--read-only-installdir` is set the log directory and the build directory itself will be read-only which is not what the option intended:
The `ensure_writable_log_dir` function changes the permissions of the folder containing the log directory to writeable without checking if this is required. When supposedly reverting it any write permissions will be removed even if they have been there before.

Similar the write permissions of the log directory are removed even when the installation was stopped.

This adds the neccessary checks.
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel added the bug fix label Feb 12, 2025
@boegel boegel added this to the release after 4.9.4 milestone Feb 12, 2025
@boegel boegel changed the title Avoid making builddir read-only Avoid making build directory read-only Feb 12, 2025
@boegel boegel merged commit a0c1816 into easybuilders:develop Feb 12, 2025
37 checks passed
@Flamefire Flamefire deleted the patch-1 branch February 12, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants