Skip to content

Immutable packaging fix: Do not package the log directory under /var (jsc#PED-14910)#168

Merged
mvidner merged 2 commits into
masterfrom
immutable-without-var
Jan 29, 2026
Merged

Immutable packaging fix: Do not package the log directory under /var (jsc#PED-14910)#168
mvidner merged 2 commits into
masterfrom
immutable-without-var

Conversation

@mvidner

@mvidner mvidner commented Jan 28, 2026

Copy link
Copy Markdown
Member

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/YaST2 but /var is 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/YaST2 is gone:

# mv /var/log/YaST2{,.away}
# rpm -Uhv ./yast2-core-5.0.4-1.x86_64.rpm
...
# ls -ld /var/log/YaST2{,.away}
ls: cannot access '/var/log/YaST2': No such file or directory
drwx------ 1 root root 34 Jan 28 12:15 /var/log/YaST2.away

Screenshots

No

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 kobliha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, except the changes file

Comment thread package/yast2-core.changes Outdated
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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd say it's actually jsc#PED-14910

@mvidner mvidner force-pushed the immutable-without-var branch from 1546dda to b4c58ae Compare January 29, 2026 08:25
@mvidner mvidner merged commit ab3a468 into master Jan 29, 2026
2 checks passed
@mvidner mvidner deleted the immutable-without-var branch January 29, 2026 08:33
@mvidner mvidner changed the title Immutable packaging fix: Do not package the log directory under /var (PED#14910) Immutable packaging fix: Do not package the log directory under /var (jsc#PED-14910) Jan 29, 2026
@github-actions

Copy link
Copy Markdown

✅ Autosubmission job #21471146277 successfully finished
✅ Created submit request #1329776

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

Successfully merging this pull request may close these issues.

2 participants