F34 Update warning: %triggerpostun(container-selinux-2:2.162.1-3.fc34.noarch) scriptlet failed, exit status 255

Received following error during update on Fedora 34 running on VM

Running scriptlet: container-selinux-2:2.160.0-2.fc34.noarch 223/262
Fixing Rootless SELinux labels in homedir
warning: %triggerpostun(container-selinux-2:2.162.1-3.fc34.noarch) scriptlet failed, exit status 255

Error in scriptlet in rpm package container-selinux

Can someone let me know the importance of this message and if it’s something to worry about.

Thanks for any assistance!

2 Likes

You can ignore it. The scriptlet does:

if %{_sbindir}/selinuxenabled ; then
    echo "Fixing Rootless SELinux labels in homedir"
    %{_sbindir}/restorecon -R /home/*/.local/share/containers/storage/overlay*  2> /dev/null
fi

which should ignore outputting any errors, but doesn’t quite ignore errors themselves. TBH, this is a pretty inadvisable thing to put in an RPM scriptlet, but whatever.

If you want to be sure those files are correctly labelled, you can run it yourself manually:

$ sudo restorecon -R /home/*/.local/share/containers/storage/overlay*

(though maybe it failed because you never had any of those files in the first place, again a reason this should not be done.)

3 Likes

You were “spot on” in that I have none of these files as verified by a manual run of the command you suggested.

SU: # restorecon -R /home//.local/share/containers/storage/overlay
restorecon: SELinux: Could not get canonical path for /home//.local/share/containers/storage/overlay restorecon: No such file or directory.

Thanks for the assist, I was wondering if the update was successful or not.