Skip to content

Conversation

@Johan-Liebert1
Copy link
Collaborator

@Johan-Liebert1 Johan-Liebert1 commented Jan 21, 2026

Remove /var/lib/systemd/random-seed to prevent user. xattr diff
between dumpfile created from mounted fs and oci container

Also update to use fedora 43 for tests

@Johan-Liebert1
Copy link
Collaborator Author

Weird, hash computed from

RUN --mount=type=bind,from=base,target=/mnt/base <<EOF
    set -eux
    mkdir -p /tmp/sysroot/composefs
    COMPOSEFS_FSVERITY="$(cfsctl --repo /tmp/sysroot --hash sha256 compute-id --bootable /mnt/base)"
EOF

seems to mismatch hash computed from containers-storage

@Johan-Liebert1 Johan-Liebert1 force-pushed the ci-fix branch 2 times, most recently from 61868ba to 3912511 Compare January 21, 2026 11:43
@Johan-Liebert1
Copy link
Collaborator Author

I thought it was because of #209, but I guess not. Will need to debug it a bit more


mkdir -p /tmp/sysroot/composefs
COMPOSEFS_FSVERITY="$(cfsctl --repo /tmp/sysroot compute-id --bootable /mnt/base)"
COMPOSEFS_FSVERITY="$(cfsctl --repo /tmp/sysroot --hash sha256 compute-id --no-propagate-usr-to-root --bootable /mnt/base)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is a bootable digest we should not have --no-propagate-usr-to-root - why did you add it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this example was failing without this change as well; I thought maybe this was the issue

@Johan-Liebert1
Copy link
Collaborator Author

Okay the issue seems to be the following xattr diff

30263c30263
< /var/lib/systemd/random-seed 32 100600 1 0 0 0 1769000852.0 - \x10\x93\x81.\xa8\xae\xc7\xcbvxB9h\x86O\xca~m\xaa\xc4\xca\xfb?\xb1\xab\xda^N\xf6\xe3\xd2\xf3 - security.selinux=system_u:object_r:random_seed_t:s0 user.random-seed-creditable=1
---
> /var/lib/systemd/random-seed 32 100600 1 0 0 0 1769000852.0 - \x10\x93\x81.\xa8\xae\xc7\xcbvxB9h\x86O\xca~m\xaa\xc4\xca\xfb?\xb1\xab\xda^N\xf6\xe3\xd2\xf3 - security.selinux=system_u:object_r:random_seed_t:s0

@Johan-Liebert1
Copy link
Collaborator Author

I think the we need the xattr filter on the Oci subcommands as well

@cgwalters
Copy link
Collaborator

Ah hah! This is an interesting and relevant use of xattrs. I think in this case though, the correct thing is to delete that file at build time. It doesn't make any sense to include the random seed in images (especially generic base images).

This filtering is part of the bootc-base-imagectl builder for example, and bootc container lint also emits warnings about these things.

Bigger picture I think we will need to carefully balance the "show that composefs-rs (for bootable systems) can in theory be used outside of bootc" with "don't duplicate too much work".

Anyways basically I suggest rm -vf /var/lib/systemd/random-seed

@cgwalters
Copy link
Collaborator

I think the we need the xattr filter on the Oci subcommands as well

But yes this too

@Johan-Liebert1
Copy link
Collaborator Author

Anyways basically I suggest rm -vf /var/lib/systemd/random-seed

This sounds good a temp measure, but yeah we'll need the filter on all commands that do anything with filesystem

Remove `/var/lib/systemd/random-seed` to prevent `user.` xattr diff
between dumpfile created from mounted fs and oci container

Also update to use fedora 43 for tests

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Nice!

@cgwalters cgwalters merged commit 6cbdb42 into containers:main Jan 21, 2026
24 of 26 checks passed
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