ostree-finalize-staged fails with SELinux error

remember this blast from the past? I originally had that problem on my Bazzite rig... which I've let go idle (it dual boots) because I couldn't solve and seems I need to reinstall. But now... I've run into it on a uCore(bOS) system! 😦
421 Replies
bsherman
bshermanOP2w ago
@M2 we should probably thread this as I'm now more motivated to try to understand this... it shouldn't be happening
M2
M22w ago
Yay....
bsherman
bshermanOP2w ago
1) i really want a want to recover when this happens
M2
M22w ago
Again for mine it was due to SELinux labels no longer existing in a new image
bsherman
bshermanOP2w ago
2) i'd like to prevent it from happening... and so far, it's been on my boS images, so i guess I stopped installing something which had installed SElinux label configs ?
M2
M22w ago
Likely. For me specifically the cause was the following. I had swtpm installed. I then mutated the file itself to fix the SELinux label. Then I tried to remove swtpm from my image, but it couldnt finalize the deployment I then readded swtpm back to the image and that seemed to fix it I haven't removed swtpm since I suppose this is one of the things composefs is likely trying to fix. I also haven't had this happen since I started rechunking my images, but again my problem package of swtpm has been on every single image of mine since then
bsherman
bshermanOP2w ago
hmm... I'm rechunking, so I don't think that helps
# /usr/bin/ostree admin finalize-staged -v
OT: root_is_ostree_booted: 1
OT: remounted /sysroot writable
OT: remounted /boot writable
OT: using fuse: 0
OT: Target rootdev key backing-root-device-inode found
OT: Deployment 65bd69a25430389e0f8b6a28ca70558a1626be29812657988960d001ad513f9c.0 unlocked=0
OT: Deployment b7f6f79964d08901f33431e676b982851915c685d38e8cf55fc555c27ca3f9d7.0 unlocked=0
Copying /etc changes: 444 modified, 1 removed, 73 added
Problems processing filecon rules
Failed post db handling
Post process failed
semodule: Failed!
error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
# /usr/bin/ostree admin finalize-staged -v
OT: root_is_ostree_booted: 1
OT: remounted /sysroot writable
OT: remounted /boot writable
OT: using fuse: 0
OT: Target rootdev key backing-root-device-inode found
OT: Deployment 65bd69a25430389e0f8b6a28ca70558a1626be29812657988960d001ad513f9c.0 unlocked=0
OT: Deployment b7f6f79964d08901f33431e676b982851915c685d38e8cf55fc555c27ca3f9d7.0 unlocked=0
Copying /etc changes: 444 modified, 1 removed, 73 added
Problems processing filecon rules
Failed post db handling
Post process failed
semodule: Failed!
error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
ugh, once again, it doesn't tell me why just bringing this link here for easy reference: https://discussion.fedoraproject.org/t/ostree-finalize-staged-fails-with-an-selinux-error/97734/8
M2
M22w ago
My reading of this is that it's something to do with /usr/etc merge
bsherman
bshermanOP2w ago
i got busy with work, but thanks for that link too... i'm going to have to crack this nut eventually
jmac
jmac6d ago
i too have come across this. oddly enough its with my ucore image. one system updated to that image with no problem, the other did not..
semodule -B -vv
semodule -B -vv
gives some output to much to paste in here
bsherman
bshermanOP6d ago
good, we've both hit it on ucore and i've hit it on bazzite and m2 hit it on bluefin, so it's generic to ostree/container-navtive probably and I realized I have this happening on a VM, so i've cloned the disk and I'm going to use that as a place to test/troubleshoot in a retryable manner
jmac
jmac6d ago
SELinux is preventing bootc from getattr access on the file /run/ostree-booted. For complete SELinux messages run: sealert -l 6facffd2-f4db-4726-b178-73f283964978
SELinux is preventing bootc from getattr access on the file /run/ostree-booted. For complete SELinux messages run: sealert -l 6facffd2-f4db-4726-b178-73f283964978
ya definitely an odd error
bsherman
bshermanOP6d ago
oh, that's interesting
jmac
jmac6d ago
SELinux is preventing bootc from getattr access on the file /run/ostree-booted.

***** Plugin catchall (100. confidence) suggests **************************

If you believe that bootc should be allowed getattr access on the ostree-booted file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'bootc' --raw | audit2allow -M my-bootc
# semodule -X 300 -i my-bootc.pp
SELinux is preventing bootc from getattr access on the file /run/ostree-booted.

***** Plugin catchall (100. confidence) suggests **************************

If you believe that bootc should be allowed getattr access on the ostree-booted file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'bootc' --raw | audit2allow -M my-bootc
# semodule -X 300 -i my-bootc.pp
granted those steps didnt shit, just posting what i am finding and of course this is happening on my supermicro board system.. so reboots are slllooooooooooooww rpm -V selinux-policy selinux-policy-targeted shows a ton of missing policies eh nevermind, same as on my system that is ok. hmm
jmac
jmac6d ago
GitHub
GitHub - hhd-dev/rechunk
Contribute to hhd-dev/rechunk development by creating an account on GitHub.
jmac
jmac6d ago
maybe something with the rechunking that is causing this? interesting, second system is now doing it as well.
bsherman
bshermanOP6d ago
M2 had a situation where he thought rechunking actually HELPED the problem On my test VM, I just attempted a bootc update rebooted and got the error. Reverted to a snapshot I took specifically to be able to restore to the broken state and... Yes. I can reproduce the issue with a revert. This is all the time I can give at this moment. but it's progress to not just have a place to try to fix, but also being to reproduce.
M2
M26d ago
@jmac are you rechunking your ucore image?
jmac
jmac5d ago
i was, i just disabled it in hopes of it offering a solution so one one server with issues i reverted to an old build and just updated that server is fixed hmm i cannot for the life of me get the other system fixed though ok i was able to get the other server up. i rolledback again and that seemed to work really odd im going to setup a vm to see if i can repeat this going to reenable rechunking on my builds and see what happens i cannot get it to error out again
bsherman
bshermanOP5d ago
Yeah. That’s why I got a reproducible place for the big. I’ve got. Some time to test today. I’ll try disabling rechunkkng also
jmac
jmac5d ago
i cant say for sure if that is what fixed my issue like i said, i rolledback and snagged a newer version both seemed to be stuck on an early march version, so who knows how long the issue was persisting prior to me noticing i didnt have an update i only found it because i was trying to get the 389 package in and ran across the issue.
bsherman
bshermanOP5d ago
i can't seem to even build my images when i disable rechunker there's a lot of stuff going on in the Justfile which seems dependent on previous steps
M2
M25d ago
You shouldn't need the rechunker. But if you are not using the rechunker, you need to not use the load images step And not build the images as root I'm assuming you are using my justfile
bsherman
bshermanOP5d ago
Yep. I figured out the not using rechunker or load images steps It took me a while to realize to not use root Then I still think there was a bug but I updated from you latest Justfile changes. I think it’s better. Need to go verify my test Nope I get this error https://github.com/bsherman/bos/actions/runs/14048060735/job/39333054037#step:7:1 error: Recipe get-tags could not be run because of an IO error while trying to create a temporary directory or write a file to that directory: Permission denied (os error 13) at path "/run/user/1001/just/just-dd8nhV" Maybe I’m still doing sudo/root in the workflow
M2
M25d ago
No description
M2
M25d ago
I would definitely say so
bsherman
bshermanOP5d ago
been working on this in between other things today splitting focus is not my strong suit 🙂 @M2 why this? https://github.com/bsherman/bos/blob/main/Justfile#L185-L189 that seems odd
M2
M25d ago
Oh I would remove the base image after building. Thoughts were to always pull the base image for builds + on the github action remove the base image once the build was complete so that there would be space for rechunk You'll also notice that the unrechunked image is removed here https://github.com/bsherman/bos/blob/c612b7436deae17c265a766044236f887e4c2fbc/Justfile#L250 after you create the tree
bsherman
bshermanOP5d ago
right, but if I'm not rechunking...
M2
M25d ago
If you're not rechunking.... then removing the base image doesn't really do anything
bsherman
bshermanOP5d ago
right
M2
M25d ago
it removes the ref. But your build is just another layer on top of it, so removing it does nothing since your local image is built on top
bsherman
bshermanOP5d ago
i got a a green build now, i'm good bleh, no... it doesn't push
M2
M25d ago
https://github.com/bsherman/bos/actions/runs/14048743564/job/39335032959#step:6:90 You only tag the build with the name and not the name + version.
GitHub
bOS Build Server · bsherman/bos@c612b74
Customized OS images based on Universal Blue. Contribute to bsherman/bos development by creating an account on GitHub.
M2
M25d ago
You probably should generate the tags and tag your original build with all of the tags
M2
M25d ago
GitHub
chore: cleanup justfile by m2Giles · Pull Request #770 · ublue-os...
Gets this working again. Does not have an ISO builder yet as we are between several options right now. This also has most of the stuff necessary to convert the github workflow to use the justfile f...
bsherman
bshermanOP5d ago
sorry, i didn'g get these notifications, but i've got it working i realized what was missing i was trying to minimize changes so i could easily switch back to rechunking ok, so rechunked images are definitely smaller but whatever for my personal use now to see if my ostree-selinux issue is resolved by not rechunking nope removal of rechunker did NOT fix it and rolling back to an image from december 31 and then upgrading... does not fix how did you see this? when you say this "reverted" did you "upgrade" (rpm-ostree rebase/bootc switch) to an old image, or just do a rollback? i'm digging into the C code for ostree finalize-staged/sysroot-deploy under the hood, it seems to be doing a bwrap exec of semodule -N --refresh in the staged ostree dir hmm... come to think of it, i think i'm in the wrong section of code yeah, what i'm seeing we aren't even hitting yet ok, yeah this looks more correct... it tries to do an ostree_sepolicy_restorecon this will only last a day, but it's a diff of the changes i'm trying to apply, nothing stands out to me in removed package list https://paste.centos.org/view/90e491a7 @Kyle Gospo just for context of what I was telling you about on our call the other night, this is the issue I'm trying to solve on a work VM server running ucore and on my bazzite desktop I did just re read https://discussion.fedoraproject.org/t/ostree-finalize-staged-fails-with-an-selinux-error/97734/4 and the solution to Jean-Baptiste's issue was rebasing to upstream (sericea in his case) then back to custom image. So... I'm going to try that. well, something like that. no dice, i can't even go back to upstream coreos I tried setting up bwrap to enter the staged deployment dir but i am a bit lost, i end up in a context where sestatus thinks that selinux is disabled, so I can't even try to restorecon etc and this is where i landed in the C code https://github.com/ostreedev/ostree/blob/4154366766fc910f54f4be5b0d816deaaade2379/src/libostree/ostree-sepolicy.c#L614 but not really getting anywhere hmm... same thing if i do a naive chroot, something is odd, and i'm missing it oh! this ucore system has composefs is that significant? no wonder things seem a bit different than last time i dug deep /me sigh i was hoping that disabling composefs might at least change behavior... but no
RoyalOughtness
i heard selinux so I popped in, but it seems yall are in deep at any point did you have an AVC
bsherman
bshermanOP5d ago
if there is an AVC, it happens at shutdown and is not logged... but i can manually run the finalize operation and don't get one see this output for what i get https://discord.com/channels/1072614816579063828/1352341718942482615/1352349176775839746
RoyalOughtness
not logged
it should be written to disk and readable on next boot? hmm did you have anything layered also what triggered the issue or do we not know that yet
RoyalOughtness
also was this happening before policy 41.33
No description
bsherman
bshermanOP5d ago
yep, I understand. I don't think one is happening... Based on reading the ostree code, and M2's experience, I think that there's a missing label, and it's trying to relable/restore contexts, and it fails. no idea I can boot to my bazzite machine to check but i'm sure it's not going to have the same versions of that package changing
RoyalOughtness
right
bsherman
bshermanOP5d ago
i can reproduce this in that i have a VM disk image with a snapshot I pulled out of my work server
RoyalOughtness
i guess im more asking, when did this first start occurring
bsherman
bshermanOP5d ago
so even if we destroy the disk or fix it
RoyalOughtness
because there are a lot of selinux package changes in that diff
bsherman
bshermanOP5d ago
I personally first saw it on my bazzite image end of January/early Feb
RoyalOughtness
also a massive ostree upgrade ah okay nvm
ostree 2024.9-1.fc41 -> 2025.1-1.fc41
ostree 2024.9-1.fc41 -> 2025.1-1.fc41
bsherman
bshermanOP5d ago
and that was getting updated weekly
RoyalOughtness
wait, is this related?
bsherman
bshermanOP5d ago
this VM's uCore... i just updated a few days ago after a few months with no update... (last successful update was december 31 that's on Jmcgee's ucore instance I don't know if/how it's related
RoyalOughtness
it would be confusing because that avc is pointing to a var_run_t file whereas your code link points to libostree/ostree-sepolicy.c which would be unrelated
bsherman
bshermanOP5d ago
yeah, i'm not sure that's related at all and i never had an avc on bazzite or my ucore instance
RoyalOughtness
his is a getattr whereas if this is happening in ostree_sepolicy_restorecon it'd be a relabel
bsherman
bshermanOP5d ago
oh and another answer to you... i don't layer locally... i'm big time against that 🙂 thus custom images
RoyalOughtness
do you have the full stacktrace
bsherman
bshermanOP5d ago
right, this is where i suspect it's happening, but i'm not sure
RoyalOughtness
ostree_sepolicy_restorecon is a helper function
bsherman
bshermanOP5d ago
no stack trace, I haven't been able to get any more logs
RoyalOughtness
would be good to know what parameters it was called with damn let me check all the invocations
bsherman
bshermanOP5d ago
if i had strace, i thought i could run that, but it's not on the machine, maybe I could install live
RoyalOughtness
isn't it already borked 🫠
bsherman
bshermanOP5d ago
yeah, i can't hurt it, i can always rollback to the snapshot
RoyalOughtness
could you curl a portable strace? to be safe
bsherman
bshermanOP5d ago
that'd work too but, i think it's installing fine hard to hurt it more 😉
RoyalOughtness
also that was from this, right
bsherman
bshermanOP5d ago
this is a manual run
RoyalOughtness
where is the ostree-sepolicy.c from the line number you had
bsherman
bshermanOP5d ago
that's more or less what happens on shutdown
RoyalOughtness
asking cause ostree_sepolicy_restorecon isn't called inside ostree
bsherman
bshermanOP5d ago
i was just searching the code to try to find stuff related,
RoyalOughtness
so it must be called by rpm-ostree or bootc? oh i see your error message says semodule failed which could involve changing contexts but sounds more like it's trying to install a policy file and that's failing
Problems processing filecon rules
Failed post db handling
Post process failed
semodule: Failed!
Problems processing filecon rules
Failed post db handling
Post process failed
semodule: Failed!
ah it's both i see yeah some filecon in some module :thonk:
bsherman
bshermanOP5d ago
every other reference i can find to this online (including M2's experience) there's a file and/or package referenced in that output but not in mine eg https://discussion.fedoraproject.org/t/ostree-finalize-staged-fails-with-an-selinux-error/97734/4
RoyalOughtness
yeah yours is different in that these errors are unrelated to ostree @bsherman these are strings from selinux
bsherman
bshermanOP5d ago
yep
RoyalOughtness
we need like 1 hint 😅
bsherman
bshermanOP5d ago
i know
RoyalOughtness
these error logs are not helpful
bsherman
bshermanOP5d ago
this is why i'm going crazy trying to figure ANYTHING out
RoyalOughtness
"something is wrong"
bsherman
bshermanOP5d ago
i abandoned my bazzite install, though I haven't wiped and reinstalled because I just didn't have the energy
RoyalOughtness
when you first saw this in january, was it identical
bsherman
bshermanOP5d ago
but when this issue popped up here... now i'm concerned
RoyalOughtness
also, you never rebase between ucore and ublue, right?
bsherman
bshermanOP5d ago
i think so, there's some history of my chats in #💾ublue-dev that's heresy, my friend
RoyalOughtness
lol yeah just making sure do you have the exact log like this with a timestamp
bsherman
bshermanOP5d ago
sure well, no sorry when this happens on shutdown that doesn't even get logged, i'll provide a fresh example in a moment that message only shows when running manually so, here's current state:
root@ostreeselinux:~# bootc update
No changes in ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal => sha256:6895488053c1a70a121f211c50b952132e55ca6650d9bd8c27afd1f6896e18b0
Deploying: done (4 seconds) Pruned images: 0 (layers: 0, objsize: 31.0 MB)
Queued for next boot: ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Version: ucore-minimal-41.20250325
Digest: sha256:6895488053c1a70a121f211c50b952132e55ca6650d9bd8c27afd1f6896e18b0
Total new layers: 53 Size: 1.3 GB
Removed layers: 61 Size: 1.1 GB
Added layers: 52 Size: 1.3 GB
root@ostreeselinux:~# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:6895488053c1a70a121f211c50b952132e55ca6650d9bd8c27afd1f6896e18b0
Version: ucore-minimal-41.20250325 (2025-03-25T01:21:23Z)
Diff: 206 upgraded, 71 removed, 5 added

● ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)

ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)

AvailableUpdate:
Timestamp: 2025-03-25T01:21:23Z
Commit: 92777cbca17c9f2c3b6c54724684b75f5b6dae2fb4a2acbd12feb0cc74dcefda
SecAdvisories: 2 low, 7 moderate, 4 important, 1 critical
Diff: 206 upgraded, 71 removed, 6 added
root@ostreeselinux:~# bootc update
No changes in ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal => sha256:6895488053c1a70a121f211c50b952132e55ca6650d9bd8c27afd1f6896e18b0
Deploying: done (4 seconds) Pruned images: 0 (layers: 0, objsize: 31.0 MB)
Queued for next boot: ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Version: ucore-minimal-41.20250325
Digest: sha256:6895488053c1a70a121f211c50b952132e55ca6650d9bd8c27afd1f6896e18b0
Total new layers: 53 Size: 1.3 GB
Removed layers: 61 Size: 1.1 GB
Added layers: 52 Size: 1.3 GB
root@ostreeselinux:~# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:6895488053c1a70a121f211c50b952132e55ca6650d9bd8c27afd1f6896e18b0
Version: ucore-minimal-41.20250325 (2025-03-25T01:21:23Z)
Diff: 206 upgraded, 71 removed, 5 added

● ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)

ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)

AvailableUpdate:
Timestamp: 2025-03-25T01:21:23Z
Commit: 92777cbca17c9f2c3b6c54724684b75f5b6dae2fb4a2acbd12feb0cc74dcefda
SecAdvisories: 2 low, 7 moderate, 4 important, 1 critical
Diff: 206 upgraded, 71 removed, 6 added
I'll reboot now. hmmm https://forums.almalinux.org/t/dnf-upgrade-problem-with-selinux-policy-targeted-38-1-11-2-el9-2-on-amavis-new/2428 a quote from this page...
Running scriptlet: selinux-policy-targeted-38.1.11-2.el9_2.2.noarch 7/52
Problems processing filecon rules
Failed post db handling
Post process failed
/usr/sbin/semodule: Failed!
Running scriptlet: selinux-policy-targeted-38.1.11-2.el9_2.2.noarch 7/52
Problems processing filecon rules
Failed post db handling
Post process failed
/usr/sbin/semodule: Failed!
So yeah, this aligns with your comment about it looks like an rpm install failing
RoyalOughtness
can you post the diff db diff i want to see what those upgrades are
bsherman
bshermanOP5d ago
it's what was in the pastebin
RoyalOughtness
wait but that selinux-policy is ancient ah okay
bsherman
bshermanOP5d ago
i know, it's just an example of the same error messages
RoyalOughtness
it could be one of the commits between 41.26 and 41.33
bsherman
bshermanOP5d ago
hmm...
RoyalOughtness
without knowing which of these it is though, it's just guesswork Problems processing filecon rules
RoyalOughtness
GitHub
Update the bootupd policy · fedora-selinux/selinux-policy@d307fa8
In particular, the following permissions were allowed: - allow read files in /sysroot, which have root_t type - allow read udev pid files in case lsblk was executed from bootupd so no transition ...
RoyalOughtness
there are months of commits between those versions
bsherman
bshermanOP5d ago
so... i could try upgrading to a specific version much closer to the date of the current deployed image
RoyalOughtness
wdym version of?
bsherman
bshermanOP5d ago
the oci image that's deployed is from December 31
RoyalOughtness
ah
bsherman
bshermanOP5d ago
i could try bootc switch to an image that's only a week after for example
RoyalOughtness
yes i suspect that would work 41.33 shipped in february if that works, it would at least give some weight to the theory
bsherman
bshermanOP5d ago
ok,
root@ostreeselinux:~# rpm-ostree status -b
State: idle
Warning: failed to finalize previous deployment
error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
check `journalctl -b -1 -u ostree-finalize-staged.service`
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
BootedDeployment:
● ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)
root@ostreeselinux:~# rpm-ostree status -b
State: idle
Warning: failed to finalize previous deployment
error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
check `journalctl -b -1 -u ostree-finalize-staged.service`
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
BootedDeployment:
● ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)
and then
root@ostreeselinux:~# journalctl -b -1 -u ostree-finalize-staged.service
Mar 25 04:29:54 ostreeselinux systemd[1]: Finished ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:30:23 ostreeselinux systemd[1]: Stopping ostree-finalize-staged.service - OSTree Finalize Staged Deployment...
Mar 25 04:30:23 ostreeselinux ostree[1486]: Finalizing staged deployment
Mar 25 04:30:24 ostreeselinux ostree[1486]: Copying /etc changes: 445 modified, 3 removed, 63 added
Mar 25 04:30:24 ostreeselinux ostree[1486]: Copying /etc changes: 445 modified, 3 removed, 63 added
Mar 25 04:30:24 ostreeselinux ostree[1486]: Refreshing SELinux policy
Mar 25 04:30:27 ostreeselinux ostree[1496]: Problems processing filecon rules
Mar 25 04:30:27 ostreeselinux ostree[1496]: Failed post db handling
Mar 25 04:30:27 ostreeselinux ostree[1496]: Post process failed
Mar 25 04:30:27 ostreeselinux ostree[1496]: semodule: Failed!
Mar 25 04:30:27 ostreeselinux ostree[1486]: Refreshed SELinux policy in 3519 ms
Mar 25 04:30:27 ostreeselinux ostree[1486]: error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
Mar 25 04:30:27 ostreeselinux systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
Mar 25 04:30:27 ostreeselinux systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
Mar 25 04:30:27 ostreeselinux systemd[1]: Stopped ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:30:27 ostreeselinux systemd[1]: ostree-finalize-staged.service: Consumed 3.915s CPU time, 312.5M memory peak.
root@ostreeselinux:~# journalctl -b -1 -u ostree-finalize-staged.service
Mar 25 04:29:54 ostreeselinux systemd[1]: Finished ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:30:23 ostreeselinux systemd[1]: Stopping ostree-finalize-staged.service - OSTree Finalize Staged Deployment...
Mar 25 04:30:23 ostreeselinux ostree[1486]: Finalizing staged deployment
Mar 25 04:30:24 ostreeselinux ostree[1486]: Copying /etc changes: 445 modified, 3 removed, 63 added
Mar 25 04:30:24 ostreeselinux ostree[1486]: Copying /etc changes: 445 modified, 3 removed, 63 added
Mar 25 04:30:24 ostreeselinux ostree[1486]: Refreshing SELinux policy
Mar 25 04:30:27 ostreeselinux ostree[1496]: Problems processing filecon rules
Mar 25 04:30:27 ostreeselinux ostree[1496]: Failed post db handling
Mar 25 04:30:27 ostreeselinux ostree[1496]: Post process failed
Mar 25 04:30:27 ostreeselinux ostree[1496]: semodule: Failed!
Mar 25 04:30:27 ostreeselinux ostree[1486]: Refreshed SELinux policy in 3519 ms
Mar 25 04:30:27 ostreeselinux ostree[1486]: error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
Mar 25 04:30:27 ostreeselinux systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
Mar 25 04:30:27 ostreeselinux systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
Mar 25 04:30:27 ostreeselinux systemd[1]: Stopped ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:30:27 ostreeselinux systemd[1]: ostree-finalize-staged.service: Consumed 3.915s CPU time, 312.5M memory peak.
oh yeah, so it does have the timestamp 😄 i'll try it, no reason not to
RoyalOughtness
which stamp oh you mean 12-31 yeah if you can, try upgrading one selinux policy version at a time from here to 41.27, then 41.28, etc until it breaks if it is that package, that will narrow it down a lot
bsherman
bshermanOP5d ago
yeah, i'l just going to the earliest image i can find for now
RoyalOughtness
kk really hoping at least the first one doesn't break
bsherman
bshermanOP5d ago
root@ostreeselinux:~# rpm-ostree status
State: idle
Warning: failed to finalize previous deployment
error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
check `journalctl -b -1 -u ostree-finalize-staged.service`
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-20250109
Digest: sha256:898056f08f54290c2f8d8d9ef64a0574bea124397f8d422402705aae1b70de4b
Version: 41-20250109-16:38:04 (2025-01-09T16:38:12Z)
Diff: 80 upgraded

● ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)
root@ostreeselinux:~# rpm-ostree status
State: idle
Warning: failed to finalize previous deployment
error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
check `journalctl -b -1 -u ostree-finalize-staged.service`
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-20250109
Digest: sha256:898056f08f54290c2f8d8d9ef64a0574bea124397f8d422402705aae1b70de4b
Version: 41-20250109-16:38:04 (2025-01-09T16:38:12Z)
Diff: 80 upgraded

● ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)
no selinux changes in that diff Thank you for coming to look at this with me 🙂
RoyalOughtness
and identical error? damn. well that rules that out :/ what is in that diff
bsherman
bshermanOP5d ago
Even if we don't solve it ... it's nice to have someone else's perspective it worked!
RoyalOughtness
⁉️ what worked!?
bsherman
bshermanOP5d ago
root@ostreeselinux:~# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
● ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-20250109
Digest: sha256:898056f08f54290c2f8d8d9ef64a0574bea124397f8d422402705aae1b70de4b
Version: 41-20250109-16:38:04 (2025-01-09T16:38:12Z)

ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)
root@ostreeselinux:~# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
● ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-20250109
Digest: sha256:898056f08f54290c2f8d8d9ef64a0574bea124397f8d422402705aae1b70de4b
Version: 41-20250109-16:38:04 (2025-01-09T16:38:12Z)

ostree-image-signed:docker://ghcr.io/bsherman/bos:ucore-minimal
Digest: sha256:53b2cb2bfce804a1f6348918985e687a317a3e962da837452fbb1dd92b8bddc7
Version: 41-20241231-06:20:03 (2024-12-31T06:20:09Z)
RoyalOughtness
i thought it broke!? what is this ⁉️ ‼️ 😛
bsherman
bshermanOP5d ago
that's the output from the last attempt to do an update to current image version
RoyalOughtness
ohhh previous deployment
bsherman
bshermanOP5d ago
this is the status after bootc switch ghcr.io/bsherman/bos:ucore-minimal-20250109
RoyalOughtness
okay okay okay so we're in business
bsherman
bshermanOP5d ago
and there was no selinux package change so
RoyalOughtness
and you booted into it okay okay
bsherman
bshermanOP5d ago
yep
RoyalOughtness
bootc switch but dont reboot until the selinux-policy package upgrades maybe 1-2 days at a time?
bsherman
bshermanOP5d ago
so it's at least possible now that the problem is the selinux-policy package itself good idea
RoyalOughtness
selinux-policy 41.27 shipped in december
bsherman
bshermanOP5d ago
i have weekly builds, so i'll try this and call out when i have a diff
RoyalOughtness
shouldn't have taken too long to get through the pipeline kk
bsherman
bshermanOP5d ago
yep
RoyalOughtness
if we can narrow it down to a specific version we can probably ID the commit
bsherman
bshermanOP5d ago
yep found it selinux-policy-targeted 41.26-1.fc41 -> 41.27-1.fc41 rebooting on this image update ostree finalize and reboot success
RoyalOughtness
ahh shit time for the next one
bsherman
bshermanOP5d ago
yep
bsherman
bshermanOP5d ago
but hey, this is progress also this is NOT possible on traditional distro 🙂 i'm amazed this can be done!
RoyalOughtness
can you tell i've used this method before 😛
bsherman
bshermanOP5d ago
lol selinux-policy-targeted 41.27-1.fc41 -> 41.28-1.fc41
RoyalOughtness
🧑‍🔬 great success?
bsherman
bshermanOP5d ago
reboot success
RoyalOughtness
getting closer to the bad one...
bsherman
bshermanOP5d ago
yep
RoyalOughtness
theoretical bad one at least what if we get to latest and it works 🫠 it's possible
bsherman
bshermanOP5d ago
i wonder too if there might be a scenario where if upgraded in sequence there's no problem, but you can't make a big leap
RoyalOughtness
that there was some policy change that assumes some file exists or something yup still though that shouldn't matter *in theory i think 41.29 is the one that will break @bsherman this may be it
I made some more investigations, and reported https://bugzilla.redhat.com/show_bug.cgi?id=2342260. This really is specific to updating selinux-policy together with some other foo-selinux in the same dnf run. Updating separately works. The observable difference other than the "policy rejections" is that "semodule -l" has an additional "extra_binsbin" policy in the broken case.
wait this explains it perfectly tbh selinux-policy is probably not aware of policy changes made by other packages so then the new FCs clash
bsherman
bshermanOP5d ago
oh?
RoyalOughtness
but they don't if the DB already contains them
bsherman
bshermanOP5d ago
where is this quote from ?
RoyalOughtness
let's see seems very plausible
bsherman
bshermanOP5d ago
yeah, i'm booting the bazzite to check versions there
RoyalOughtness
considering it's literally a case of "you waited to long to upgrade and now you have multiple selinux packages upgrading at the same time" versions on disk or in the db?
bsherman
bshermanOP5d ago
yes
RoyalOughtness
it would need to be selinux-policy + some other *-selinux package in the db diff but i dont want to jump to conclusions too soon
bsherman
bshermanOP5d ago
ok here(still on the ucore instance) i have an selinux change but a diferent package
passt-selinux 0^20241211.g09478d5-1.fc41 -> 0^20250121.g4f2c8e7-2.fc41
passt-selinux 0^20241211.g09478d5-1.fc41 -> 0^20250121.g4f2c8e7-2.fc41
so rebooting for that one
RoyalOughtness
this and an selinux change? selinux-policy or just that one
bsherman
bshermanOP5d ago
that was the only selinux reference in the diff
selinux-policy 41.28-1.fc41 -> 41.32-1.fc41
selinux-policy-targeted 41.28-1.fc41 -> 41.32-1.fc41
selinux-policy 41.28-1.fc41 -> 41.32-1.fc41
selinux-policy-targeted 41.28-1.fc41 -> 41.32-1.fc41
OK, rebooting for these updates
RoyalOughtness
woah that's a big jump
bsherman
bshermanOP5d ago
fail i'm going to backup a week
RoyalOughtness
were there any other policy changes in that diff or just those time to look at some commits 🔍
bsherman
bshermanOP5d ago
i think just those
RoyalOughtness
hm okay scratch my previous theory can you post the full db diff for my sanity
bsherman
bshermanOP5d ago
ok, paste bin with full diff as I don't trust my eyes right now (you messaged before i could finish typing the same thing) https://paste.centos.org/view/72e1f47c and reboot on that fails to finalize
RoyalOughtness
the error is identical right about filecons
bsherman
bshermanOP5d ago
yes
root@ostreeselinux:~# journalctl -b -1 -u ostree-finalize-staged.service
Mar 25 04:57:21 ostreeselinux systemd[1]: Finished ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:58:40 ostreeselinux systemd[1]: Stopping ostree-finalize-staged.service - OSTree Finalize Staged Deployment...
Mar 25 04:58:40 ostreeselinux ostree[1638]: Finalizing staged deployment
Mar 25 04:58:40 ostreeselinux ostree[1638]: Copying /etc changes: 445 modified, 3 removed, 62 added
Mar 25 04:58:40 ostreeselinux ostree[1638]: Copying /etc changes: 445 modified, 3 removed, 62 added
Mar 25 04:58:41 ostreeselinux ostree[1638]: Refreshing SELinux policy
Mar 25 04:58:44 ostreeselinux ostree[1648]: Problems processing filecon rules
Mar 25 04:58:44 ostreeselinux ostree[1648]: Failed post db handling
Mar 25 04:58:44 ostreeselinux ostree[1648]: Post process failed
Mar 25 04:58:44 ostreeselinux ostree[1648]: semodule: Failed!
Mar 25 04:58:44 ostreeselinux ostree[1638]: Refreshed SELinux policy in 3507 ms
Mar 25 04:58:44 ostreeselinux ostree[1638]: error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
Mar 25 04:58:44 ostreeselinux systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
Mar 25 04:58:44 ostreeselinux systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
Mar 25 04:58:44 ostreeselinux systemd[1]: Stopped ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:58:44 ostreeselinux systemd[1]: ostree-finalize-staged.service: Consumed 3.904s CPU time, 294.8M memory peak.
root@ostreeselinux:~# journalctl -b -1 -u ostree-finalize-staged.service
Mar 25 04:57:21 ostreeselinux systemd[1]: Finished ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:58:40 ostreeselinux systemd[1]: Stopping ostree-finalize-staged.service - OSTree Finalize Staged Deployment...
Mar 25 04:58:40 ostreeselinux ostree[1638]: Finalizing staged deployment
Mar 25 04:58:40 ostreeselinux ostree[1638]: Copying /etc changes: 445 modified, 3 removed, 62 added
Mar 25 04:58:40 ostreeselinux ostree[1638]: Copying /etc changes: 445 modified, 3 removed, 62 added
Mar 25 04:58:41 ostreeselinux ostree[1638]: Refreshing SELinux policy
Mar 25 04:58:44 ostreeselinux ostree[1648]: Problems processing filecon rules
Mar 25 04:58:44 ostreeselinux ostree[1648]: Failed post db handling
Mar 25 04:58:44 ostreeselinux ostree[1648]: Post process failed
Mar 25 04:58:44 ostreeselinux ostree[1648]: semodule: Failed!
Mar 25 04:58:44 ostreeselinux ostree[1638]: Refreshed SELinux policy in 3507 ms
Mar 25 04:58:44 ostreeselinux ostree[1638]: error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
Mar 25 04:58:44 ostreeselinux systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
Mar 25 04:58:44 ostreeselinux systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
Mar 25 04:58:44 ostreeselinux systemd[1]: Stopped ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
Mar 25 04:58:44 ostreeselinux systemd[1]: ostree-finalize-staged.service: Consumed 3.904s CPU time, 294.8M memory peak.
RoyalOughtness
GitHub
Label /usr/bin/dnf5 with rpm_exec_t · fedora-selinux/selinux-polic...
Unlike dnf 3, which uses the /usr/bin/dnf-3 as a filename, dnf 5 started to use /usr/bin/dnf5. dnf 4 is just a symlink. The file context pattern was simplified. Additionally, /usr/lib/sysimage/dnf...
RoyalOughtness
wtf is rpm-sequoia
bsherman
bshermanOP5d ago
And here's the current Bazzite install (from Feb 04) and it's next available update from Feb 09
$ rpm-ostree status
State: idle
Deployments:
ostree-unverified-registry:ghcr.io/bsherman/bos:bazzite-nvidia-41.20250209
Digest: sha256:cb65fb7a1f82d5c82a787a126801001d7c6faf97d0743ef1771cc6f9ddfda6c5
Version: bazzite-nvidia-41.20250209 (2025-02-09T06:57:10Z)
Diff: 113 upgraded, 23 downgraded, 229 removed, 47 added

● ostree-unverified-registry:ghcr.io/bsherman/bos:bazzite-nvidia
Digest: sha256:4870feb9f3d568ce6313ecc866e55d318026a8f317b9666777371e3c909e365a
Version: bazzite-nvidia-41.20250204.3 (2025-02-04T22:59:14Z)

ostree-unverified-registry:ghcr.io/bsherman/bos:bazzite-nvidia
Digest: sha256:0ad4ae201900b372a7f16960f51e394e44c6a80666027a511e2e1dd5812e336b
Version: bazzite-nvidia-41.20250204.1 (2025-02-04T16:57:05Z)

anduril in ~ took 32s
$ rpm-ostree status -v |grep selin
selinux-policy 41.28-1.fc41 -> 41.31-1.fc41
selinux-policy-targeted 41.28-1.fc41 -> 41.31-1.fc41
nbdkit-selinux-1.40.4-1.fc41.noarch
$ rpm-ostree status
State: idle
Deployments:
ostree-unverified-registry:ghcr.io/bsherman/bos:bazzite-nvidia-41.20250209
Digest: sha256:cb65fb7a1f82d5c82a787a126801001d7c6faf97d0743ef1771cc6f9ddfda6c5
Version: bazzite-nvidia-41.20250209 (2025-02-09T06:57:10Z)
Diff: 113 upgraded, 23 downgraded, 229 removed, 47 added

● ostree-unverified-registry:ghcr.io/bsherman/bos:bazzite-nvidia
Digest: sha256:4870feb9f3d568ce6313ecc866e55d318026a8f317b9666777371e3c909e365a
Version: bazzite-nvidia-41.20250204.3 (2025-02-04T22:59:14Z)

ostree-unverified-registry:ghcr.io/bsherman/bos:bazzite-nvidia
Digest: sha256:0ad4ae201900b372a7f16960f51e394e44c6a80666027a511e2e1dd5812e336b
Version: bazzite-nvidia-41.20250204.1 (2025-02-04T16:57:05Z)

anduril in ~ took 32s
$ rpm-ostree status -v |grep selin
selinux-policy 41.28-1.fc41 -> 41.31-1.fc41
selinux-policy-targeted 41.28-1.fc41 -> 41.31-1.fc41
nbdkit-selinux-1.40.4-1.fc41.noarch
RoyalOughtness
nvm, unrelated librpm_sequoia wait so one failed going from 28 -> 31
bsherman
bshermanOP5d ago
similar, but not same version changes yep
RoyalOughtness
one from 28 -> 32?
bsherman
bshermanOP5d ago
yep
RoyalOughtness
hold up that eliminates some candidates
bsherman
bshermanOP5d ago
we are looking at 29, 30, 31, but not 32
RoyalOughtness
yep down to 6 this still assumes this is the package at fault it's a reasonable assumption but still an assumption
bsherman
bshermanOP5d ago
yeah
bsherman
bshermanOP5d ago
yep
RoyalOughtness
this is just adding another homedir for thumbs probably not switcheroo-control either?
bsherman
bshermanOP5d ago
🤷‍♂️
RoyalOughtness
and the kerberos one just removes regex syntax
RoyalOughtness
GitHub
Label /dev/pmem[0-9]+ with fixed_disk_device_t · fedora-selinux/se...
Non-Volatile Dual In-line Memory Modules (NVDIMM) is a persistent memory technology which combines the durability of storage with the low access latency and the high bandwidth of dynamic RAM. In th...
GitHub
Label /usr/bin/dnf5 with rpm_exec_t · fedora-selinux/selinux-polic...
Unlike dnf 3, which uses the /usr/bin/dnf-3 as a filename, dnf 5 started to use /usr/bin/dnf5. dnf 4 is just a symlink. The file context pattern was simplified. Additionally, /usr/lib/sysimage/dnf...
GitHub
Label /dev/iio:device[0-9]+ devices · fedora-selinux/selinux-polic...
The Industrial I/O core offers a way for continuous data capture based on a trigger source. Multiple data channels can be read at once from /dev/iio:deviceX character device node, thus reducing the...
RoyalOughtness
one of these three imo
bsherman
bshermanOP5d ago
confirmed that Bazzite failed the ostree finalize staged with this diff
RoyalOughtness
dnf one is still interesting same filecon error?
bsherman
bshermanOP5d ago
yes, same error
RoyalOughtness
the weird thing is if this is really a policy issue why is it only happening on some hardware right?
bsherman
bshermanOP5d ago
right, i use the same build process for my bluefin image, but it never had a problem updating
RoyalOughtness
i wonder if it has something to do with the availability of these hardware devices
bsherman
bshermanOP5d ago
i think the bazzite update happens to include that massive changeover Kyle did in Feb
RoyalOughtness
can you ls -lZ /dev/iio
bsherman
bshermanOP5d ago
hmm... well, the VM has very little available hardware
RoyalOughtness
oh vm yeah..
bsherman
bshermanOP5d ago
my laptop and desktop have much more in common
RoyalOughtness
hmmm
bsherman
bshermanOP5d ago
root@ostreeselinux:~# ls -lZ /dev/iio
ls: cannot access '/dev/iio': No such file or directory
root@ostreeselinux:~# ls -lZ /dev/iio
ls: cannot access '/dev/iio': No such file or directory
RoyalOughtness
same for pmem ?
bsherman
bshermanOP5d ago
root@ostreeselinux:~# ls -lZ /dev/pmem*
ls: cannot access '/dev/pmem*': No such file or directory
root@ostreeselinux:~# ls -lZ /dev/pmem
ls: cannot access '/dev/pmem': No such file or directory
root@ostreeselinux:~# ls -lZ /dev/pmem*
ls: cannot access '/dev/pmem*': No such file or directory
root@ostreeselinux:~# ls -lZ /dev/pmem
ls: cannot access '/dev/pmem': No such file or directory
RoyalOughtness
yeah idk why the dnf one would be an issue... does ostree use libdnf oh.... bootc does, right?
bsherman
bshermanOP5d ago
i think bootc does yes,a nd thus rpm-ostree under the hood now
ls: cannot access '/dev/pmem': No such file or directory
root@ostreeselinux:~# ls -lZ /usr/bin/dnf*
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Nov 13 17:59 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 3 root root system_u:object_r:bin_t:s0 1445016 Jan 1 1970 /usr/bin/dnf5
root@ostreeselinux:~# ls -lZ /usr/lib/sysimage/dnf/* /usr/lib/sysimage/libdnf5/*
ls: cannot access '/usr/lib/sysimage/dnf/*': No such file or directory
-rw-r--r--. 3 root root system_u:object_r:usr_t:s0 32 Jan 1 1970 /usr/lib/sysimage/libdnf5/environments.toml
-rw-r--r--. 3 root root system_u:object_r:usr_t:s0 26 Jan 1 1970 /usr/lib/sysimage/libdnf5/groups.toml
-rw-r--r--. 3 root root system_u:object_r:usr_t:s0 27 Jan 1 1970 /usr/lib/sysimage/libdnf5/modules.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 2068 Jan 1 1970 /usr/lib/sysimage/libdnf5/nevras.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 1440 Jan 1 1970 /usr/lib/sysimage/libdnf5/packages.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 110 Jan 1 1970 /usr/lib/sysimage/libdnf5/system.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 139264 Jan 1 1970 /usr/lib/sysimage/libdnf5/transaction_history.sqlite
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 32768 Jan 1 1970 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-shm
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 543872 Jan 1 1970 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-wal

/usr/lib/sysimage/libdnf5/comps_groups:
total 0
ls: cannot access '/dev/pmem': No such file or directory
root@ostreeselinux:~# ls -lZ /usr/bin/dnf*
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Nov 13 17:59 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 3 root root system_u:object_r:bin_t:s0 1445016 Jan 1 1970 /usr/bin/dnf5
root@ostreeselinux:~# ls -lZ /usr/lib/sysimage/dnf/* /usr/lib/sysimage/libdnf5/*
ls: cannot access '/usr/lib/sysimage/dnf/*': No such file or directory
-rw-r--r--. 3 root root system_u:object_r:usr_t:s0 32 Jan 1 1970 /usr/lib/sysimage/libdnf5/environments.toml
-rw-r--r--. 3 root root system_u:object_r:usr_t:s0 26 Jan 1 1970 /usr/lib/sysimage/libdnf5/groups.toml
-rw-r--r--. 3 root root system_u:object_r:usr_t:s0 27 Jan 1 1970 /usr/lib/sysimage/libdnf5/modules.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 2068 Jan 1 1970 /usr/lib/sysimage/libdnf5/nevras.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 1440 Jan 1 1970 /usr/lib/sysimage/libdnf5/packages.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 110 Jan 1 1970 /usr/lib/sysimage/libdnf5/system.toml
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 139264 Jan 1 1970 /usr/lib/sysimage/libdnf5/transaction_history.sqlite
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 32768 Jan 1 1970 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-shm
-rw-r--r--. 2 root root system_u:object_r:usr_t:s0 543872 Jan 1 1970 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-wal

/usr/lib/sysimage/libdnf5/comps_groups:
total 0
RoyalOughtness
yeah that's expected prior to this upgrade i wonder if either
bsherman
bshermanOP5d ago
so that policy needs to change those labels
RoyalOughtness
1. bootc/rpm-ostree fucks with the policy for those dirs in some way or
bsherman
bshermanOP5d ago
there needs to be a relabel
RoyalOughtness
2. changing the filecon for libs in-use is causing issues when you upgrade, are you using bootc or rpm-ostree, or both
bsherman
bshermanOP5d ago
my bluefin
anguirel in ~/code
$ ls -lZ /usr/bin/dnf*
lrwxrwxrwx. 7 root root system_u:object_r:bin_t:s0 4 Nov 4 00:07 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 2 root root system_u:object_r:rpm_exec_t:s0 1496968 Dec 31 1969 /usr/bin/dnf5

anguirel in ~/code took 3s
$ ls -lZ /usr/lib/sysimage/dnf/* /usr/lib/sysimage/libdnf5/*
ls: cannot access '/usr/lib/sysimage/dnf/*': No such file or directory
-rw-r--r--. 3 root root system_u:object_r:rpm_var_lib_t:s0 32 Dec 31 1969 /usr/lib/sysimage/libdnf5/environments.toml
-rw-r--r--. 3 root root system_u:object_r:rpm_var_lib_t:s0 26 Dec 31 1969 /usr/lib/sysimage/libdnf5/groups.toml
-rw-r--r--. 3 root root system_u:object_r:rpm_var_lib_t:s0 27 Dec 31 1969 /usr/lib/sysimage/libdnf5/modules.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 76989 Dec 31 1969 /usr/lib/sysimage/libdnf5/nevras.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 56615 Dec 31 1969 /usr/lib/sysimage/libdnf5/packages.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 110 Dec 31 1969 /usr/lib/sysimage/libdnf5/system.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 405504 Dec 31 1969 /usr/lib/sysimage/libdnf5/transaction_history.sqlite
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 32768 Dec 31 1969 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-shm
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 2785152 Dec 31 1969 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-wal

/usr/lib/sysimage/libdnf5/comps_groups:
total 0
anguirel in ~/code
$ ls -lZ /usr/bin/dnf*
lrwxrwxrwx. 7 root root system_u:object_r:bin_t:s0 4 Nov 4 00:07 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 2 root root system_u:object_r:rpm_exec_t:s0 1496968 Dec 31 1969 /usr/bin/dnf5

anguirel in ~/code took 3s
$ ls -lZ /usr/lib/sysimage/dnf/* /usr/lib/sysimage/libdnf5/*
ls: cannot access '/usr/lib/sysimage/dnf/*': No such file or directory
-rw-r--r--. 3 root root system_u:object_r:rpm_var_lib_t:s0 32 Dec 31 1969 /usr/lib/sysimage/libdnf5/environments.toml
-rw-r--r--. 3 root root system_u:object_r:rpm_var_lib_t:s0 26 Dec 31 1969 /usr/lib/sysimage/libdnf5/groups.toml
-rw-r--r--. 3 root root system_u:object_r:rpm_var_lib_t:s0 27 Dec 31 1969 /usr/lib/sysimage/libdnf5/modules.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 76989 Dec 31 1969 /usr/lib/sysimage/libdnf5/nevras.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 56615 Dec 31 1969 /usr/lib/sysimage/libdnf5/packages.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 110 Dec 31 1969 /usr/lib/sysimage/libdnf5/system.toml
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 405504 Dec 31 1969 /usr/lib/sysimage/libdnf5/transaction_history.sqlite
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 32768 Dec 31 1969 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-shm
-rw-r--r--. 2 root root system_u:object_r:rpm_var_lib_t:s0 2785152 Dec 31 1969 /usr/lib/sysimage/libdnf5/transaction_history.sqlite-wal

/usr/lib/sysimage/libdnf5/comps_groups:
total 0
RoyalOughtness
yeah i have this too
bsherman
bshermanOP5d ago
i haven't specifically tested with both, but mostly i've been doing bootc update/switch
RoyalOughtness
can you try with rpm-ostree upgrade or rpm-ostree rebase for sanity if it fails the same way, then it's unrelated but if it doesn't then there's some bootc issue with libdnf and i wonder if others didn't see this issue because rpm-ostreed just upgraded in the background without bootc
bsherman
bshermanOP5d ago
root@ostreeselinux:~# rpm-ostree rebase ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-41.20250309
Pulling manifest: ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-41.20250309
Staging deployment... done
Pruned images: 0 (layers: 52)
Freed: 1.4 GB (pkgcache branches: 1)
Upgraded:
aardvark-dns 2:1.13.1-1.fc41 -> 2:1.14.0-1.fc41
afterburn 5.7.0-1.fc41 -> 5.7.0-3.fc41
afterburn-dracut 5.7.0-1.fc41 -> 5.7.0-3.fc41
bash-completion 1:2.13-2.fc41 -> 1:2.16-1.fc41
bind-libs 32:9.18.30-1.fc41 -> 32:9.18.33-1.fc41
bind-utils 32:9.18.30-1.fc41 -> 32:9.18.33-1.fc41
bootupd 0.2.25-1.fc41 -> 0.2.26-1.fc41
catatonit 0.1.7-23.fc41 -> 0.2.1-1.fc41
clevis-pin-tpm2 0.5.3-7.fc41 -> 0.5.3-9.fc41
cockpit-files 16-1.fc41 -> 17-1.fc41
cockpit-podman 101-1.fc41 -> 102-1.fc41
coreos-installer 0.23.0-1.fc41 -> 0.23.0-2.fc41
coreos-installer-bootinfra 0.23.0-1.fc41 -> 0.23.0-2.fc41
crun 1.19.1-1.fc41 -> 1.20-2.fc41
crun-wasm 1.19.1-1.fc41 -> 1.20-2.fc41
crypto-policies 20241029-1.git8baf557.fc41 -> 20250124-1.git4d262e7.fc41
erofs-utils 1.8.4-2.fc41 -> 1.8.5-2.fc41
fwupd 1.9.27-1.fc41 -> 1.9.28-1.fc41
hwdata 0.391-1.fc41 -> 0.392-1.fc41
ignition 2.20.0-2.fc41 -> 2.20.0-5.fc41
kernel 6.12.10-200.fc41 -> 6.12.13-200.fc41
kernel-core 6.12.10-200.fc41 -> 6.12.13-200.fc41
kernel-modules 6.12.10-200.fc41 -> 6.12.13-200.fc41
kernel-modules-core 6.12.10-200.fc41 -> 6.12.13-200.fc41
krb5-libs 1.21.3-3.fc41 -> 1.21.3-4.fc41
libipa_hbac 2.10.1-1.fc41 -> 2.10.2-1.fc41
libnfsidmap 1:2.8.1-5.rc2.fc41 -> 1:2.8.1-7.rc2.fc41
libsss_certmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
libsss_idmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
libsss_nss_idmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
libsss_sudo 2.10.1-1.fc41 -> 2.10.2-1.fc41
libusb1 1.0.27-6.fc41 -> 1.0.27-9.fc41
netavark 2:1.13.1-1.fc41 -> 2:1.14.0-1.fc41
nfs-utils-coreos 1:2.8.1-5.rc2.fc41 -> 1:2.8.1-7.rc2.fc41
nmstate 2.2.39-1.fc41 -> 2.2.40-1.fc41
openssl 1:3.2.2-11.fc41 -> 1:3.2.4-1.fc41
openssl-libs 1:3.2.2-11.fc41 -> 1:3.2.4-1.fc41
policycoreutils 3.7-6.fc41 -> 3.7-7.fc41
policycoreutils-python-utils 3.7-6.fc41 -> 3.7-7.fc41
python3-policycoreutils 3.7-6.fc41 -> 3.7-7.fc41
qemu-guest-agent 2:9.1.2-3.fc41 -> 2:9.1.3-1.fc41
rpm-sequoia 1.7.0-3.fc41 -> 1.7.0-5.fc41
selinux-policy 41.28-1.fc41 -> 41.32-1.fc41
selinux-policy-targeted 41.28-1.fc41 -> 41.32-1.fc41
sssd-ad 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-client 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-common 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-common-pac 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-ipa 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-krb5 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-krb5-common 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-ldap 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-nfs-idmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
stalld 1.19.6-1.fc41 -> 1.19.8-1.fc41
tailscale 1.80.2-1 -> 1.80.3-1
tzdata 2024b-1.fc41 -> 2025a-1.fc41
vim-data 2:9.1.1000-1.fc41 -> 2:9.1.1081-1.fc41
vim-minimal 2:9.1.1000-1.fc41 -> 2:9.1.1081-1.fc41
zincati 0.0.27-3.fc41 -> 0.0.29-1.fc41
Changes queued for next boot. Run "systemctl reboot" to start a reboot
root@ostreeselinux:~# rpm-ostree rebase ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-41.20250309
Pulling manifest: ostree-unverified-registry:ghcr.io/bsherman/bos:ucore-minimal-41.20250309
Staging deployment... done
Pruned images: 0 (layers: 52)
Freed: 1.4 GB (pkgcache branches: 1)
Upgraded:
aardvark-dns 2:1.13.1-1.fc41 -> 2:1.14.0-1.fc41
afterburn 5.7.0-1.fc41 -> 5.7.0-3.fc41
afterburn-dracut 5.7.0-1.fc41 -> 5.7.0-3.fc41
bash-completion 1:2.13-2.fc41 -> 1:2.16-1.fc41
bind-libs 32:9.18.30-1.fc41 -> 32:9.18.33-1.fc41
bind-utils 32:9.18.30-1.fc41 -> 32:9.18.33-1.fc41
bootupd 0.2.25-1.fc41 -> 0.2.26-1.fc41
catatonit 0.1.7-23.fc41 -> 0.2.1-1.fc41
clevis-pin-tpm2 0.5.3-7.fc41 -> 0.5.3-9.fc41
cockpit-files 16-1.fc41 -> 17-1.fc41
cockpit-podman 101-1.fc41 -> 102-1.fc41
coreos-installer 0.23.0-1.fc41 -> 0.23.0-2.fc41
coreos-installer-bootinfra 0.23.0-1.fc41 -> 0.23.0-2.fc41
crun 1.19.1-1.fc41 -> 1.20-2.fc41
crun-wasm 1.19.1-1.fc41 -> 1.20-2.fc41
crypto-policies 20241029-1.git8baf557.fc41 -> 20250124-1.git4d262e7.fc41
erofs-utils 1.8.4-2.fc41 -> 1.8.5-2.fc41
fwupd 1.9.27-1.fc41 -> 1.9.28-1.fc41
hwdata 0.391-1.fc41 -> 0.392-1.fc41
ignition 2.20.0-2.fc41 -> 2.20.0-5.fc41
kernel 6.12.10-200.fc41 -> 6.12.13-200.fc41
kernel-core 6.12.10-200.fc41 -> 6.12.13-200.fc41
kernel-modules 6.12.10-200.fc41 -> 6.12.13-200.fc41
kernel-modules-core 6.12.10-200.fc41 -> 6.12.13-200.fc41
krb5-libs 1.21.3-3.fc41 -> 1.21.3-4.fc41
libipa_hbac 2.10.1-1.fc41 -> 2.10.2-1.fc41
libnfsidmap 1:2.8.1-5.rc2.fc41 -> 1:2.8.1-7.rc2.fc41
libsss_certmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
libsss_idmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
libsss_nss_idmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
libsss_sudo 2.10.1-1.fc41 -> 2.10.2-1.fc41
libusb1 1.0.27-6.fc41 -> 1.0.27-9.fc41
netavark 2:1.13.1-1.fc41 -> 2:1.14.0-1.fc41
nfs-utils-coreos 1:2.8.1-5.rc2.fc41 -> 1:2.8.1-7.rc2.fc41
nmstate 2.2.39-1.fc41 -> 2.2.40-1.fc41
openssl 1:3.2.2-11.fc41 -> 1:3.2.4-1.fc41
openssl-libs 1:3.2.2-11.fc41 -> 1:3.2.4-1.fc41
policycoreutils 3.7-6.fc41 -> 3.7-7.fc41
policycoreutils-python-utils 3.7-6.fc41 -> 3.7-7.fc41
python3-policycoreutils 3.7-6.fc41 -> 3.7-7.fc41
qemu-guest-agent 2:9.1.2-3.fc41 -> 2:9.1.3-1.fc41
rpm-sequoia 1.7.0-3.fc41 -> 1.7.0-5.fc41
selinux-policy 41.28-1.fc41 -> 41.32-1.fc41
selinux-policy-targeted 41.28-1.fc41 -> 41.32-1.fc41
sssd-ad 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-client 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-common 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-common-pac 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-ipa 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-krb5 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-krb5-common 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-ldap 2.10.1-1.fc41 -> 2.10.2-1.fc41
sssd-nfs-idmap 2.10.1-1.fc41 -> 2.10.2-1.fc41
stalld 1.19.6-1.fc41 -> 1.19.8-1.fc41
tailscale 1.80.2-1 -> 1.80.3-1
tzdata 2024b-1.fc41 -> 2025a-1.fc41
vim-data 2:9.1.1000-1.fc41 -> 2:9.1.1081-1.fc41
vim-minimal 2:9.1.1000-1.fc41 -> 2:9.1.1081-1.fc41
zincati 0.0.27-3.fc41 -> 0.0.29-1.fc41
Changes queued for next boot. Run "systemctl reboot" to start a reboot
RoyalOughtness
it worked??
bsherman
bshermanOP5d ago
that would be plausible it failed the same way
RoyalOughtness
aw where's the fail oh on reboot right ok scratch that
bsherman
bshermanOP5d ago
yep, on reboot
RoyalOughtness
all my theories 😔
bsherman
bshermanOP5d ago
i am at least validated that having this VM for testing is much easier than a full bazzite desktop so much faster to iterate and our set of changes can be narrowed somewhat
RoyalOughtness
wait when you say fails at reboot do you mean as it's shutting down or as it's booting up the next time also are these both custom images and if so, can you link me the repo i have a new (probably shitty) theory
bsherman
bshermanOP5d ago
the journal entry i keep sharing different versions of... i believe that comes from the ostree-finalize-staged.service which runs at host shutdown when there is a pending deployment yes, custom images, all from same repo in fact
RoyalOughtness
link pls i now suspect it's one of your layered packages cloud layered i saw nfs-utils and got spooked
RoyalOughtness
that package has caused me nightmares
bsherman
bshermanOP5d ago
oh? nfs-utils is in ucore upstream of my custom
RoyalOughtness
yeah nvm it's only on your server image anyhow wait a fuckin sec
cockpit-selinux
bsherman
bshermanOP5d ago
well, it's on bazzite too
RoyalOughtness
ah
bsherman
bshermanOP5d ago
i think maybe pulled in by libvirt stuff?
RoyalOughtness
i assume you already confirmed that rebasing to "plain bazzite" works?
bsherman
bshermanOP5d ago
nope
RoyalOughtness
that would be good to check
bsherman
bshermanOP5d ago
because rebasing to "plain coreos" does not work at least, not current stable
RoyalOughtness
plain coreos meaning fedora's or ucore
bsherman
bshermanOP5d ago
both both fail in the same manner as we've seen
bsherman
bshermanOP5d ago
oh i could try rebasing to a ucore that's closer to this timestamp than my custom maybe get smaller incremental changes
RoyalOughtness
this is so far the most perplexing part it's one thing if it's something you're adding that isn't in a common install but if it repros on an official image with like 350 packages
bsherman
bshermanOP5d ago
ok i'm rebasing from my bos:ucore-minimal 20250302 to ucore-minimal-20250302
RoyalOughtness
then it's not something you're doing alright im just bummed because this means i can throw that theory out the window it doesn't make sense though other people aren't seeing this how is it not a package you're adding :thonk:
bsherman
bshermanOP5d ago
my assumption (based on other's experiences like M2) has always been i've got a file with a label in a place not expected and when the policy changes and that label no longer exists, the relabel fails some how
RoyalOughtness
but we would see that label disappearing in the policy commits no?
bsherman
bshermanOP5d ago
true
RoyalOughtness
wait also
bsherman
bshermanOP5d ago
but this was M2's original experience, he removed a package which provided a policy
RoyalOughtness
you're not using some unique filesystems or anything right?
bsherman
bshermanOP5d ago
xfs stock
RoyalOughtness
xfs 👀
bsherman
bshermanOP5d ago
that's CoreOS standard
RoyalOughtness
oh
bsherman
bshermanOP5d ago
bazzite is btrfs
RoyalOughtness
when did that change
bsherman
bshermanOP5d ago
it's always been that way CoreOS has never defaulted to btrfs one of the reasons we tell people not to rebase across 😄 reboot successful with this. i'm going to move forward incrementally
RoyalOughtness
oh i see yeah nvm it is xfs ucore-minimal doesn't have cockpit stuff right?
bsherman
bshermanOP5d ago
not as much it has
root@ostreeselinux:~# rpm -qa |grep cockpit
cockpit-bridge-333-1.fc41.x86_64
cockpit-system-333-1.fc41.noarch
cockpit-selinux-333-1.fc41.noarch
cockpit-networkmanager-333-1.fc41.noarch
cockpit-podman-101-1.fc41.noarch
root@ostreeselinux:~# rpm -qa |grep cockpit
cockpit-bridge-333-1.fc41.x86_64
cockpit-system-333-1.fc41.noarch
cockpit-selinux-333-1.fc41.noarch
cockpit-networkmanager-333-1.fc41.noarch
cockpit-podman-101-1.fc41.noarch
RoyalOughtness
hmm even further upstream would be even better to eliminate more variables but this is fine i guess there's a coreos-bootc image on quay right
bsherman
bshermanOP5d ago
yes, but also quay.io/fedora/fedora-coreos:stable which is what we base on
RoyalOughtness
ah yeah that works
bsherman
bshermanOP5d ago
but i feel like there's something going on with the "custom" images
RoyalOughtness
you already verified it repros on fedora coreos though
bsherman
bshermanOP5d ago
because no one has reported this before ... just me, jmac, m2
RoyalOughtness
the issue repros that was my theory too but you said you can repro on upstream
bsherman
bshermanOP5d ago
when attempting to switch to latest stable image, yes
RoyalOughtness
damn
bsherman
bshermanOP5d ago
yeah, but from a custom
RoyalOughtness
wait wait yeah
bsherman
bshermanOP5d ago
ok, here's the interesting ucore update
RoyalOughtness
rebase from custom:oldtag -> noncustom:oldtag then noncustom:oldtag -> noncustom:latest
bsherman
bshermanOP5d ago
https://paste.centos.org/view/bc182d82 this one has the selinux policy jumps
RoyalOughtness
and it failed?
bsherman
bshermanOP5d ago
and it WORKED
RoyalOughtness
ah okay yeah
bsherman
bshermanOP5d ago
so now...
RoyalOughtness
you did this?
bsherman
bshermanOP5d ago
i bet i can go backto my custom and be good
RoyalOughtness
yes but if you go back to oldtag on custom it will repro i think what did you do exactly what path was followed
bsherman
bshermanOP5d ago
custom:oldtag > custom:latest | fails ---- custom:oldtag > noncustom:oldtag | works noncustom:oldtag > noncustom:newerbutnotlatest | works this is where we are now
RoyalOughtness
yep makes sense so some change on custom breaks it
bsherman
bshermanOP5d ago
right ima try rebasing bazzite to something oldtag
RoyalOughtness
wait hold up
bsherman
bshermanOP5d ago
ok
RoyalOughtness
do you still have the db diff from custom:oldtag > noncustom:oldtag | works or is that gone
bsherman
bshermanOP5d ago
hold
RoyalOughtness
wait a sec
# Remove wrapped binaries
rm -f \
/usr/bin/yum \
/usr/bin/dnf \
/usr/bin/kernel-install
# Remove wrapped binaries
rm -f \
/usr/bin/yum \
/usr/bin/dnf \
/usr/bin/kernel-install
could it be because you removed a file that had its context changed? 🙂
bsherman
bshermanOP5d ago
that should be conditional
RoyalOughtness
it's at the top of build.sh
bsherman
bshermanOP5d ago
one moment
RoyalOughtness
Unlike dnf 3, which uses the /usr/bin/dnf-3 as a filename, dnf 5 started to use /usr/bin/dnf5. dnf 4 is just a symlink. The file context pattern was simplified. Additionally, /usr/lib/sysimage/dnf and /usr/lib/sysimage/libdnf5 were labeled with rpm_var_lib_t, similar to /usr/lib/sysimage/rpm.
https://github.com/fedora-selinux/selinux-policy/commit/7a19b319a1e9809c0765282a2eb06496c711a2de 95% sure this is it
bsherman
bshermanOP5d ago
https://paste.centos.org/view/f0fcf81f - custom:old > noncustom:old WORKS
RoyalOughtness
rm'ing that bin corrupted the selinux db i believe
bsherman
bshermanOP5d ago
yes, but
#!/usr/bin/bash

if [[ ! -d /usr/libexec/rpm-ostree/wrapped ]]; then
echo "cliwrap is not setup, skipping..."
exit 0
fi
#!/usr/bin/bash

if [[ ! -d /usr/libexec/rpm-ostree/wrapped ]]; then
echo "cliwrap is not setup, skipping..."
exit 0
fi
RoyalOughtness
hmm
bsherman
bshermanOP5d ago
that's happening (or was happening) in all the ublue image builds
RoyalOughtness
and you're sure that dir wouldn't exist at that time
bsherman
bshermanOP5d ago
m2os and I tested that before putting it into bluefin/main/bazzite, etc
RoyalOughtness
i see
bsherman
bshermanOP5d ago
that dir only exists at buildtime if rpm-ostree wrap was used it MIGHT be the issue
RoyalOughtness
do the build logs for your build from 0305 still exist
bsherman
bshermanOP5d ago
i'm not sure
RoyalOughtness
if that log is in there
bsherman
bshermanOP5d ago
lets look
RoyalOughtness
then we can rule it out
bsherman
bshermanOP5d ago
https://github.com/bsherman/bos/actions/runs/13670135659/job/38218624134 i think upstream had already made that change but
RoyalOughtness
echo is absent though :thonk:
bsherman
bshermanOP5d ago
ah! yep and no -x you are right it ran that there ok so... now, that i'm on that same version of policy
bsherman
bshermanOP5d ago
OMG that's it
RoyalOughtness
what did you confirm
bsherman
bshermanOP5d ago
root@ostreeselinux:~# rpm-ostree status -v
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
ostree-unverified-registry:ghcr.io/ublue-os/ucore-minimal:stable-20250309 (index: 0)
Digest: sha256:0b3d22a8f4aa13e303361782fe79db26142e38b3ce15b580725b8a57cbc2dac7
Version: 41.20250215.3.0 (2025-03-09T02:52:46Z)
Commit: af2c28dbab83cfd8f3ff1c9f89863cae4340426665585d6c01afe825bc9d9b6c
Staged: yes
StateRoot: fedora-coreos
Upgraded: cockpit-podman 101-1.fc41 -> 102-1.fc41

● ostree-unverified-registry:ghcr.io/ublue-os/ucore-minimal:stable-20250306 (index: 1)
Digest: sha256:beb3ffe10c4970004309ab4bcc5d30e5c5add79b8721126cdbae50922adeb6f8
Version: 41.20250215.3.0 (2025-03-06T03:04:55Z)
Commit: 0f4935b68643023d32003d89fc14fe162cd521b7730130fdd6c7d1ba912bead7
StateRoot: fedora-coreos

ostree-unverified-registry:ghcr.io/ublue-os/ucore-minimal:stable-20250305 (index: 2)
Digest: sha256:6465b263d2a30615f5d8750d3b8bb4ab176fa67ecf2aecc04afa97fba856a6de
Version: 41.20250130.3.0 (2025-03-05T03:04:33Z)
Commit: 9cd8fa5ab4aceed6af2cd08cea61c3fe611f49b5883bb183827619f409c296c0
StateRoot: fedora-coreos
root@ostreeselinux:~# ls /usr/libexec/rpm-ostree/wrapped
dnf dracut kernel-install rpm yum
root@ostreeselinux:~# rpm-ostree status -v
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
ostree-unverified-registry:ghcr.io/ublue-os/ucore-minimal:stable-20250309 (index: 0)
Digest: sha256:0b3d22a8f4aa13e303361782fe79db26142e38b3ce15b580725b8a57cbc2dac7
Version: 41.20250215.3.0 (2025-03-09T02:52:46Z)
Commit: af2c28dbab83cfd8f3ff1c9f89863cae4340426665585d6c01afe825bc9d9b6c
Staged: yes
StateRoot: fedora-coreos
Upgraded: cockpit-podman 101-1.fc41 -> 102-1.fc41

● ostree-unverified-registry:ghcr.io/ublue-os/ucore-minimal:stable-20250306 (index: 1)
Digest: sha256:beb3ffe10c4970004309ab4bcc5d30e5c5add79b8721126cdbae50922adeb6f8
Version: 41.20250215.3.0 (2025-03-06T03:04:55Z)
Commit: 0f4935b68643023d32003d89fc14fe162cd521b7730130fdd6c7d1ba912bead7
StateRoot: fedora-coreos

ostree-unverified-registry:ghcr.io/ublue-os/ucore-minimal:stable-20250305 (index: 2)
Digest: sha256:6465b263d2a30615f5d8750d3b8bb4ab176fa67ecf2aecc04afa97fba856a6de
Version: 41.20250130.3.0 (2025-03-05T03:04:33Z)
Commit: 9cd8fa5ab4aceed6af2cd08cea61c3fe611f49b5883bb183827619f409c296c0
StateRoot: fedora-coreos
root@ostreeselinux:~# ls /usr/libexec/rpm-ostree/wrapped
dnf dracut kernel-install rpm yum
RoyalOughtness
what am i looking at here oh it's there i see
bsherman
bshermanOP5d ago
so... this shows that my current system is March09
RoyalOughtness
yeah yup
bsherman
bshermanOP5d ago
and the rpm-ostree/wrapped is present BUT this also has the new policy stuff
RoyalOughtness
right well
bsherman
bshermanOP5d ago
so, now... if i go back,
root@ostreeselinux:~# ls -lZ /usr/bin/dnf*
-rwxr-xr-x. 4 root root system_u:object_r:rpm_exec_t:s0 251 Jan 1 1970 /usr/bin/dnf
-rwxr-xr-x. 3 root root system_u:object_r:rpm_exec_t:s0 1445016 Jan 1 1970 /usr/bin/dnf5
root@ostreeselinux:~# ls -lZ /usr/libexec/rpm-ostree/wrapped/
total 180
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Nov 13 17:59 dnf -> dnf5
-rwxr-xr-x. 4 root root system_u:object_r:bin_t:s0 95809 Jan 1 1970 dracut
-rwxr-xr-x. 4 root root system_u:object_r:bin_t:s0 60200 Jan 1 1970 kernel-install
-rwxr-xr-x. 4 root root system_u:object_r:bin_t:s0 20600 Jan 1 1970 rpm
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Nov 13 17:59 yum -> dnf5
root@ostreeselinux:~# ls -lZ /usr/bin/dnf*
-rwxr-xr-x. 4 root root system_u:object_r:rpm_exec_t:s0 251 Jan 1 1970 /usr/bin/dnf
-rwxr-xr-x. 3 root root system_u:object_r:rpm_exec_t:s0 1445016 Jan 1 1970 /usr/bin/dnf5
root@ostreeselinux:~# ls -lZ /usr/libexec/rpm-ostree/wrapped/
total 180
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Nov 13 17:59 dnf -> dnf5
-rwxr-xr-x. 4 root root system_u:object_r:bin_t:s0 95809 Jan 1 1970 dracut
-rwxr-xr-x. 4 root root system_u:object_r:bin_t:s0 60200 Jan 1 1970 kernel-install
-rwxr-xr-x. 4 root root system_u:object_r:bin_t:s0 20600 Jan 1 1970 rpm
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Nov 13 17:59 yum -> dnf5
RoyalOughtness
march 6th but yeah
bsherman
bshermanOP5d ago
back to custom image, should work i think lol
RoyalOughtness
to the latest on the custom image?
bsherman
bshermanOP5d ago
rpm-ostree wrapped was cursed from day one
RoyalOughtness
uhh
bsherman
bshermanOP5d ago
i hated that
RoyalOughtness
the issue here is rming binaries that selinux is aware of 😅 you should remove those rms 😛 it will make selinux angry
bsherman
bshermanOP5d ago
well, i dunno you CAN rm a file it's fine
RoyalOughtness
also rming files provided by an rpm is kind of cursed anyhow
bsherman
bshermanOP5d ago
there's something else in play
RoyalOughtness
wdym
bsherman
bshermanOP5d ago
they weren't though
RoyalOughtness
dnf is and selinux is trying to relabel it because the filecon changed right? but the file is removed so it fails?
bsherman
bshermanOP5d ago
rpm-ostree wrap literally created a directory /usr/libexec/rpm-ostree/wrapped/ and moved the rpm files into it... replacing them with stubs my script just undoes that mess and tries to put things back the way rpm wanted it that's why i say it was cursed
RoyalOughtness
but did the wrapped stubs have the right filecontext i think the issue might be you need to restorecon after you mv -f actually can you check the filecon on the cliwrapped versions
bsherman
bshermanOP5d ago
i think this is probably the case...
RoyalOughtness
oh you did
bsherman
bshermanOP5d ago
look here
RoyalOughtness
they're bin_t yeah that's the issue
bsherman
bshermanOP5d ago
yep so this IS probably a global ublue issue for any image which is still using this ... and we can test it
RoyalOughtness
im not entirely sure it's the issue tbf because dnf itself didn't have its label changed but dnf5 did
bsherman
bshermanOP5d ago
yeah, but we can still test it
RoyalOughtness
wait.. then why is no one else seeing this
bsherman
bshermanOP5d ago
first, i'm switching back to my custom image from non-custom:0309 to custom:0309 make sure this works i think there was a small window where this was happening at least in upstreams like bluefin/bazzite/main the test will be... rollback my VM to known "bad" old custom rebuild my custom image with a restorecon added in after the mv see if upgrade works
RoyalOughtness
welllll but the issue might be in the old image that's the thing
bsherman
bshermanOP5d ago
yeah, that's the concern
RoyalOughtness
like it might be the label going from wrong -> right
bsherman
bshermanOP5d ago
but, even if... at least we have a workaround
RoyalOughtness
right
bsherman
bshermanOP5d ago
find the point where this occurs, and rebase to that on upstream, upgrade, then switch back to custom but i was LOST before you have helped SO Much
RoyalOughtness
no prob i still think we dont fully have a root cause because the change in the policy is on dnf5 not dnf but also dnf5 is modified in that script :thonk:
bsherman
bshermanOP5d ago
i'm installing dnf5
RoyalOughtness
there's something more at play here right...
bsherman
bshermanOP5d ago
ok, test VM is on custom:latest success
RoyalOughtness
or maybe the modification to dnf triggers selinux to relabel the whole dir or something
bsherman
bshermanOP5d ago
essentially following the workaround solution ok, so it looks like my latest build is still doing manual rpm-ostree unwrap https://github.com/bsherman/bos/actions/runs/14049430082/job/39336910290#step:6:169 doing another build with -x to verify https://github.com/bsherman/bos/actions/runs/14052705620/job/39345858075 and then i'll add restorecon
RoyalOughtness
and then try to upgrade from :oldtag to the new build?
bsherman
bshermanOP5d ago
exactly
RoyalOughtness
hopefully that works but if it doesn't you're kinda SOL still because there are too many moving variables
bsherman
bshermanOP5d ago
well, at least i won't be creating possibly bad images, and we'll know if we CAN restorecon
RoyalOughtness
restorecon should also spit out info into the build logs if it's doing something relevant i suspect it'll work though since this is happening on the finalize step i think it was just a matter of time until someone touched the selinux policy for dnf and once that happened, this bug was bound to surface that combined with for some reason this script is running despite the cliwrap stuff having supposed to have been removed
bsherman
bshermanOP5d ago
hmm
bsherman
bshermanOP5d ago
🙂
RoyalOughtness
not really a swiss cheese model tbh but ¯\_(ツ)_/¯
bsherman
bshermanOP5d ago
https://github.com/bsherman/bos/actions/runs/14052705620/job/39345858075#step:6:179 we have logging of it moving this bug has been very de-motivating for me 🙂 sometimes problems are good challenges ... sometimes they sit in the back of your mind and haunt you
RoyalOughtness
yup
bsherman
bshermanOP5d ago
and it didn't help i just didn't feel I had the time to sit down and tackle it for over a month but when it popped up end of last week on a work server ... i was very concerned... because my gaming rig, ok, maybe I fiddled once and forgot but i don't fiddle with the work server 😄
RoyalOughtness
when in doubt, i made selinux angry somehow it's always angry 😔
bsherman
bshermanOP5d ago
I am slowly learning
RoyalOughtness
ive been writing policies for confining Trivalent very fun 🫠
bsherman
bshermanOP5d ago
for so long i just turned it off
RoyalOughtness
let's just say, the interfaces fedora provides are very useful
bsherman
bshermanOP5d ago
but i refused to do that from day one with ublue... before i even realized it could be very very bad to do so LOL such as? 😄
bsherman
bshermanOP5d ago
LOL
Every time you run setenforce 0, you make Dan Walsh weep.
RoyalOughtness
https://github.com/secureblue/secureblue/blob/live/files/scripts/selinux/trivalent/trivalent.te#L166 so many interfaces so... many... 😵‍💫 chromium-based browsers need access to so much shit it's crazy
kernel_read_system_state(trivalent_t)
kernel_read_system_state(trivalent_t)
but why
bsherman
bshermanOP5d ago
hmmm....
RoyalOughtness
and yet it needs it also pretty much everything in userspace is unconfined... so
# required to connect to wayland
unconfined_stream_connect(trivalent_t)
# required to connect to wayland
unconfined_stream_connect(trivalent_t)
sad
RoyalOughtness
the hell? can you rebase and check if the label changed if it didnt then there goes that theory 🫠
bsherman
bshermanOP5d ago
testing an upgrade from custom:old to that custom:new image i now expect failure 😭 and my expectation was correct
RoyalOughtness
rats
bsherman
bshermanOP5d ago
but also
bsherman
bshermanOP5d ago
GitHub
fix: should restorecon /usr/bin after un-cliwrap · bsherman/bos@f0...
Customized OS images based on Universal Blue. Contribute to bsherman/bos development by creating an account on GitHub.
bsherman
bshermanOP5d ago
bazzite does not run this code, at least not today
RoyalOughtness
so now we're back to "it's something custom, but not dnf"
bsherman
bshermanOP5d ago
no
RoyalOughtness
ok that puts the nail on that one
bsherman
bshermanOP5d ago
i think it could still be this thing
RoyalOughtness
? how so if bazzite isn't touching dnf
bsherman
bshermanOP5d ago
if the old image is wrong? today what about a month and ahalf ago
RoyalOughtness
im lost oh you mean like in the past if bazzite was tampering with dnf
RoyalOughtness
^^? aha
bsherman
bshermanOP5d ago
so
RoyalOughtness
well wait 0209 is what your machine is on right? oh
bsherman
bshermanOP5d ago
bazzite and ucore have different dates
RoyalOughtness
maybe the tampered filecon persisted can you check the filecon for /usr/bin/dnf on the bazzite machine
bsherman
bshermanOP5d ago
yeah, so that's kinda my thought... if the old image has bad filecon
RoyalOughtness
if it's bin_t that all but confirms it
bsherman
bshermanOP5d ago
then even a good new image can't handle updating bad label and migrating policy at the same time?
anduril in ~ took 35m29s
$ ls -lZ /usr/bin/dnf*
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Jan 2 16:37 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 3 root root system_u:object_r:bin_t:s0 1445016 Dec 31 1969 /usr/bin/dnf5
anduril in ~ took 35m29s
$ ls -lZ /usr/bin/dnf*
lrwxrwxrwx. 10 root root system_u:object_r:bin_t:s0 4 Jan 2 16:37 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 3 root root system_u:object_r:bin_t:s0 1445016 Dec 31 1969 /usr/bin/dnf5
Version: bazzite-nvidia-41.20250204.3 (2025-02-04T22:59:14Z)
RoyalOughtness
that im not exactly sure about but selinux tends to shit itself at the slightest db corruption
RoyalOughtness
that's why any rm /usr/bin/* makes me quake in my boots not worth the risk of selinux db corruption
bsherman
bshermanOP5d ago
it's not exactly a solid theory but
RoyalOughtness
yeah we haven't confirmed it but also it's not ruled out exactly
bsherman
bshermanOP5d ago
its a plausible hypothesis maybe, with a workaround for the bug
RoyalOughtness
yeah it'd be nice to confirm it do you have a time machine
bsherman
bshermanOP5d ago
let me check
RoyalOughtness
this thread
bsherman
bshermanOP5d ago
pretty much i'm just super, super happy to have a workaround i'm going to test the bazzite update now
RoyalOughtness
sweet let me know how it goes
bsherman
bshermanOP5d ago
sudo bootc switch ghcr.io/ublue-os/bazzite-gnome-nvidia:stable-41.20250127 in the works bazzite on desktop, so much slower to test than VM with ucore 😄 so while waiting for that real hardware to do things... ucore test reproduced the workaround solution: from ucore-minimal-custom:stable-20250209 bootc switch ghcr.io/ublue-os/ucore-minimal:stable-20250209 # reboot bootc switch ghcr.io/ublue-os/ucore-minimal #reboot should now be on current ucore-minimal no problems bootc switch ghcr.io/mycustom/ucore-minimal-custom:stable #reboot should now be on current custom ucore-minimal no problems verified success bazzite tested workaround solution: from bazzite-custom:stable-20250204 bootc switch ghcr.io/ublue-os/bazzite-gnome-nvidia:stable-20250127 # reboot bootc switch ghcr.io/ublue-os/bazzite-gnome-nvidia:stable # reboot should now be on current bazzite-gnome-nvidia no problems bootc switch ghcr.io/mycustom/bazzite-custom:stable # reboot now be on current custom ucore-minimal no problems see above, it works
M2
M25d ago
Can you provide dates? For stuff based on main in the past couple of months we removed cli-wrap from main images. I also think this is different than my experience. But I'm now wondering if this bug is affecting more people and they simply don't know it
M2
M25d ago
20 Feb. This also would of only affected your Bazzite build. And Ucore I believe has never used cli-wrap
jmac
jmac4d ago
did a rollback When i get home i can check my history, i think i just found that in journald when checking auditd issues looks like it got solved and explains why a rollback fixed it, from what i could gather from quickly perusing the history of last nights chat. 🙂
bsherman
bshermanOP4d ago
I think there are likely multi ways to reach the broken state. Example, I doubt Jean-Baptistse’s problem was tied to the un-cliwrap. Dates are in thread. I can dig more closely. I think the common factor is the upgrade of selinux-targeted-policy and the cli wrap stuff being on old image. At least that’s the hunch. We found other examples online where people hit the same basic error message when updating the package even on older Alma. So if something was out of whack, it could happen In ucore, yeah I think we did/do cliwrap and as evidenced by my build logs. And the timing of the issue on my server was waiting for an upgrade from an old image, but I could upgrade up until the date where that selinux policy package updated but not past it. Similarly with Bazzite. When that package updated (incidentally during the big Bazzite stable upgrade in Feb which included removing cliwrap) that’s where I got stuck. But the cli wrap stuff could be a red herring? However, it does correlate and matches a change in the selinux policy package And that package update definitely seems to be in play. The failure seemed to come from a rpm upgrade’s post section failing on restorecon or something.
M2
M24d ago
I feel like cli-wrap is a red herring. I wonder if we've experienced different failure conditions
bsherman
bshermanOP4d ago
the main thing is it correlates with a policy change in the package which updated related to dnf paths, and my un-cliwrap script was mucking with those specific paths... but yeah, it's not conclusive https://discord.com/channels/1072614816579063828/1352341718942482615/1353954043101446185 which is a quote from https://bodhi.fedoraproject.org/updates/FEDORA-2025-e7a319968a indicates someone saw the same kind of problem elsewhere probably just in a dnf run, maybe not in an ostree context just changes to selinux-policy-targeted and some other foo-selinux in the same dnf run and I narrowed down the problem to both ucore and bazzite updating from: selinux-policy-targeted 41.26-1.fc41 to 41.31-1.fc41 and 41.32-1.fc41 respectively while also upgrading selinux-policy
RoyalOughtness
it's definitely possible
RoyalOughtness
cockpit is still another potential culprit @bsherman do your machines pull in freeipa-selinux

Did you find this page helpful?