Description of problem: The post install script for selinux-policy-targeted fails because it tries to run restorecon on /etc/NetworkManager/dispatcher.d which does not exist when NetworkManager is not installed. ``` Running scriptlet: selinux-policy-targeted-36.8-1.fc36.noarch 38/38 /usr/sbin/restorecon: lstat(/etc/NetworkManager/dispatcher.d) failed: No such file or directory warning: %posttrans(selinux-policy-targeted-36.8-1.fc36.noarch) scriptlet failed, exit status 255 Error in POSTTRANS scriptlet in rpm package selinux-policy-targeted ``` Version-Release number of selected component (if applicable): selinux-policy-targeted-36.8-1.fc36.noarch Additional info: I'm using systemd-networkd and have uninstalled NetworkManager from my system.
Matthew, Apart from the displayed error message, does also any other problem appear? Adding the -i switch to restorecon should address this issue, will be a part of the next build.
No other problems, the update completed successfully beside the above errors. The restorecon command is the last command in the post install script, so the "failure" shouldn't be impactful. Adding the -i switch seems reasonable. Just for good measure, here is the about of restorecon with -i on my system. [root@ink ~]# /usr/sbin/restorecon -Ri /usr/lib/sysimage/rpm /var/lib/rpm /etc/NetworkManager/dispatcher.d; echo $? 0
Thanks for confirmation.
This problem causes a F36 kickstart installation to halt, when NetworkManager is not included.
The build is on the way: https://src.fedoraproject.org/rpms/selinux-policy/pull-request/282
FEDORA-2022-148223ef3b has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-148223ef3b
FEDORA-2022-148223ef3b has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-148223ef3b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-148223ef3b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
The update in testing still halts a kickstart install. packaging.log reports a return code of 255. I tried the following with success: %{_sbindir}/restorecon -R /usr/lib/sysimage/rpm /var/lib/rpm if [ -d /etc/NetworkManager/dispatcher.d ]; then %{_sbindir}/restorecon -R /etc/NetworkManager/dispatcher.d fi I don't have a fedora account, so couldn't report in the feedback page.
FEDORA-2022-148223ef3b has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
Latest result of update selinux-policy: Running transaction Running scriptlet: selinux-policy-targeted-36.9-1.fc36.noarch 1/1 Preparing : 1/1 Upgrading : selinux-policy-36.9-1.fc36.noarch 1/4 Running scriptlet: selinux-policy-36.9-1.fc36.noarch 1/4 Running scriptlet: selinux-policy-targeted-36.9-1.fc36.noarch 2/4 Upgrading : selinux-policy-targeted-36.9-1.fc36.noarch 2/4 Running scriptlet: selinux-policy-targeted-36.9-1.fc36.noarch 2/4 Running scriptlet: selinux-policy-36.8-2.fc36.noarch 3/4 Cleanup : selinux-policy-36.8-2.fc36.noarch 3/4 Running scriptlet: selinux-policy-36.8-2.fc36.noarch 3/4 Cleanup : selinux-policy-targeted-36.8-2.fc36.noarch 4/4 Running scriptlet: selinux-policy-targeted-36.8-2.fc36.noarch 4/4 Running scriptlet: selinux-policy-targeted-36.9-1.fc36.noarch 4/4 /usr/sbin/restorecon: SELinux: Could not get canonical path for /etc/NetworkManager/dispatcher.d restorecon: No such file or directory. warning: %posttrans(selinux-policy-targeted-36.9-1.fc36.noarch) scriptlet failed, exit status 255 Error in POSTTRANS scriptlet in rpm package selinux-policy-targeted Running scriptlet: selinux-policy-targeted-36.8-2.fc36.noarch 4/4 Verifying : selinux-policy-36.9-1.fc36.noarch 1/4 Verifying : selinux-policy-36.8-2.fc36.noarch 2/4 Verifying : selinux-policy-targeted-36.9-1.fc36.noarch 3/4 Verifying : selinux-policy-targeted-36.8-2.fc36.noarch 4/4 Even whith the -i option we get an error. # /usr/sbin/restorecon -Ri /usr/lib/sysimage/rpm /var/lib/rpm /etc/NetworkManager/dispatcher.d /usr/sbin/restorecon: SELinux: Could not get canonical path for /etc/NetworkManager/dispatcher.d restorecon: No such file or directory.
FEDORA-2022-fd22b79a84 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fd22b79a84
FEDORA-2022-fd22b79a84 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-fd22b79a84` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-fd22b79a84 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-320775eb9a has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-320775eb9a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-320775eb9a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-139ec288ca has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-139ec288ca` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-139ec288ca See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-139ec288ca has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
You still get the error if /etc/NetworkManager does not exist -- even with the -i option Cleanup : selinux-policy-targeted-36.14-1.fc36.noarch 6/6 Running scriptlet: selinux-policy-targeted-36.14-1.fc36.noarch 6/6 /usr/sbin/restorecon: SELinux: Could not get canonical path for /etc/NetworkManager/dispatcher.d restorecon: No such file or directory. warning: %posttrans(selinux-policy-targeted-36.14-1.fc36.noarch) scriptlet failed, exit status 255 Error in POSTTRANS scriptlet in rpm package selinux-policy-targeted If /etc/NetworkManager exist, even if empty, you don't get an error. At least add "|| :" at the end of the command to make it nom-fatal.
(In reply to Villy Kruse from comment #16) > You still get the error if /etc/NetworkManager does not exist -- even with > the -i option > > Cleanup : selinux-policy-targeted-36.14-1.fc36.noarch > 6/6 > Running scriptlet: selinux-policy-targeted-36.14-1.fc36.noarch > 6/6 > /usr/sbin/restorecon: SELinux: Could not get canonical path for > /etc/NetworkManager/dispatcher.d restorecon: No such file or directory. > warning: %posttrans(selinux-policy-targeted-36.14-1.fc36.noarch) scriptlet > failed, exit status 255 > > Error in POSTTRANS scriptlet in rpm package selinux-policy-targeted > > If /etc/NetworkManager exist, even if empty, you don't get an error. > > At least add "|| :" at the end of the command to make it nom-fatal. My bad, it should have been gone completely and the change got lost somehow, sorry for that.
(In reply to Zdenek Pytela from comment #17) > My bad, it should have been gone completely and the change got lost somehow, > sorry for that. Branch rawhide looks good execpt for %posttrans minimum and %posttrans mls
*** Bug 2093594 has been marked as a duplicate of this bug. ***