Immutable packaging fix: Do not package the log directory under /var (jsc#PED-14910)#168
Merged
Conversation
The log methods will create it on the fly just fine. Packaging for Immutable Mode - Best Practices: > This is particularly problematic for any packages that currently manipulate content in filesystem areas belonging to users (eg. /var , /opt ) as these areas are not mounted during transactional-update. > This is to prevent package operations affecting the running system, but if the RPM spec file requires manipulation of files in these areas, it is liable to fail installing or act unexpectedly on Immutable Mode.
kobliha
approved these changes
Jan 28, 2026
kobliha
left a comment
Member
There was a problem hiding this comment.
LGTM, except the changes file
| Wed Jan 28 15:36:19 UTC 2026 - Martin Vidner <mvidner@suse.com> | ||
|
|
||
| - Immutable packaging fix: Do not package the log directory | ||
| under /var (PED#14910) |
Member
There was a problem hiding this comment.
I'd say it's actually jsc#PED-14910
1546dda to
b4c58ae
Compare
|
✅ Autosubmission job #21471146277 successfully finished |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
https://jira.suse.com/browse/PED-14910
In immutable mode, if you want to install yast2-core (as a dependency of something) it fails because it wants to create
/var/log/YaST2but/varis read only.Solution
Adjust the spec file to omit the log directory.
The logging code already contains logic to create that directory if it is missing.
Testing
Manual test that
/var/log/YaST2is gone:Screenshots
No