Fix problem updating packages in Fedora/Korora due to broken SELinux update

Unfortunately an update to the SELinux policy package in Fedora 20 (and therefore Korora 20) caused RPM scriptlets to fail when updating packages.

This bug only affects systems that have SELinux mode set to enforcing (which is the default) and were updated to version 3.12.1-116 of the selinux-policy package. If you have seen the following sort of error when updating packages, then this bug may affect you:

warning: %post(libkcompactdisc-4.12.1-1.fc20.x86_64) scriptlet failed, exit status 127
Non-fatal POSTIN scriptlet failure in rpm package libkcompactdisc-4.12.1-1.fc20.x86_64

Below are the commands to resolve this issue (which has been fixed in an updated 3.12.1-117 version of selinux-policy).

sudo setenforce 0
sudo yum clean expire-cache
sudo yum update selinux-policy\*
sudo setenforce 1

The first command disables SELinux enforcement for the current session and the subsequent commands expire the yum cache and install the SELinux policy update which fixes this issue. The last command re-enables SELinux enforcement.

If you previously installed any packages which failed with scriptlet errors like above, you can reinstall them using the following command:

sudo yum reinstall

You can find out what packages were installed after the broken update using a command like this:

sudo sed '1,/selinux-policy-3.12.1-116/d' /var/log/yum.log

If you require any assistance please don’t hesitate to ask for help using Engage or jump onto the #korora channel in IRC freenode.net servers.

6 Responses to “Fix problem updating packages in Fedora/Korora due to broken SELinux update”


  • For me it is looks more serious issue. After fixed some of the packages by reinstall, I can still see a lot like this

    Loaded plugins: langpacks, refresh-packagekit
    Skipping the running kernel: kernel-3.12.7-300.fc20.x86_64
    Installed package kernel-3.12.6-300.fc20.x86_64 (from updates) not available.
    Installed package kernel-3.12.8-300.fc20.x86_64 (from updates) not available.
    Installed package kernel-3.12.5-302.fc20.x86_64 (from updates) not available.
    Error: Nothing to do

  • That looks OK to me, all bu 3.12.8 are old kernels which have been taken out of the repository now.

    See the canonical update server here:
    https://dl.fedoraproject.org/pub/fedora/linux/updates/20/x86_64/

    Note that only kernel-3.12.8 exists, which is an update for you not a re-install as you’re currently running 3.12.7.

    Hope that helps!

    -c

  • That fixed it for me. Thanks for the help!

  • Hello chris,

    I run the command:

    # sudo sed ‘1,/selinux-policy-3.12.1-116/d’ /var/log/yum.log
    Jan 17 04:16:23 Updated: rhino-1.7R4-7.fc20.noarch
    Jan 17 04:16:32 Updated: 1:java-1.7.0-openjdk-headless-1.7.0.60-2.4.4.0.fc20.x86_64
    Jan 17 04:16:34 Updated: 1:java-1.7.0-openjdk-1.7.0.60-2.4.4.0.fc20.x86_64
    Jan 17 04:16:36 Updated: 1:libreoffice-ure-4.1.4.2-4.fc20.x86_64
    Jan 17 04:16:37 Updated: p11-kit-0.20.2-1.fc20.x86_64
    Jan 17 04:16:38 Updated: 1:NetworkManager-glib-0.9.9.0-24.git20131003.fc20.x86_64
    Jan 17 04:16:40 Updated: 1:libreoffice-opensymbol-fonts-4.1.4.2-4.fc20.noarch
    Jan 17 04:17:44 Updated: 1:libreoffice-core-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:46 Updated: 1:libreoffice-writer-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:49 Updated: 1:libreoffice-calc-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:50 Updated: 1:libreoffice-base-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:52 Updated: 1:libreoffice-pyuno-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:53 Updated: 1:libreoffice-emailmerge-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:54 Updated: 1:libreoffice-impress-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:55 Updated: 1:libreoffice-math-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:56 Updated: 1:libreoffice-graphicfilter-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:57 Updated: 1:libreoffice-draw-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:58 Updated: 1:libreoffice-pdfimport-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:58 Updated: 1:libreoffice-4.1.4.2-4.fc20.x86_64
    Jan 17 04:17:58 Updated: 1:libreoffice-langpack-en-4.1.4.2-4.fc20.x86_64
    Jan 17 04:18:01 Updated: 1:NetworkManager-0.9.9.0-24.git20131003.fc20.x86_64
    Jan 17 04:18:03 Updated: p11-kit-trust-0.20.2-1.fc20.x86_64
    Jan 17 04:18:51 Updated: selinux-policy-targeted-3.12.1-116.fc20.noarch
    Jan 17 04:19:14 Updated: selinux-policy-devel-3.12.1-116.fc20.noarch
    Jan 18 10:38:33 Updated: ibus-libs-1.5.5-1.fc20.x86_64
    Jan 18 10:38:34 Updated: ibus-gtk2-1.5.5-1.fc20.x86_64
    Jan 18 10:38:35 Updated: ibus-setup-1.5.5-1.fc20.noarch
    Jan 18 10:38:36 Updated: ibus-gtk3-1.5.5-1.fc20.x86_64
    Jan 18 10:38:39 Updated: ibus-1.5.5-1.fc20.x86_64
    Jan 18 10:38:39 Updated: ibus-wayland-1.5.5-1.fc20.x86_64
    Jan 18 10:38:41 Updated: file-libs-5.14-14.fc20.x86_64
    Jan 18 10:38:41 Updated: file-5.14-14.fc20.x86_64
    Jan 18 10:38:42 Updated: python-magic-5.14-14.fc20.noarch
    Jan 18 10:38:44 Updated: gnome-abrt-0.3.5-1.fc20.x86_64
    Jan 18 10:38:46 Updated: 14:libpcap-1.5.3-1.fc20.x86_64
    Jan 18 10:38:46 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 18 10:38:55 Updated: firefox-26.0-5.fc20.x86_64
    Jan 20 15:03:56 Updated: 32:bind-license-9.9.4-11.P2.fc20.noarch
    Jan 20 15:03:58 Updated: selinux-policy-3.12.1-117.fc20.noarch
    Jan 20 15:04:00 Updated: 32:bind-libs-9.9.4-11.P2.fc20.x86_64
    Jan 20 15:04:00 Updated: libudisks2-2.1.2-1.fc20.x86_64
    Jan 20 15:04:04 Updated: udisks2-2.1.2-1.fc20.x86_64
    Jan 20 15:04:05 Updated: 32:bind-utils-9.9.4-11.P2.fc20.x86_64
    Jan 20 15:04:06 selinux-policy-targeted-3.12.1-117.fc20.noarch: 100
    Jan 20 15:04:12 Updated: selinux-policy-devel-3.12.1-117.fc20.noarch
    Jan 20 15:04:13 Updated: 32:bind-libs-lite-9.9.4-11.P2.fc20.x86_64
    Jan 20 15:04:15 Updated: firewalld-0.3.9.2-1.fc20.noarch
    Jan 20 15:04:16 Updated: perl-Glib-1.304-1.fc20.x86_64
    Jan 20 15:04:20 Updated: gstreamer1-plugins-good-1.2.2-2.fc20.x86_64
    Jan 20 15:04:20 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 20 15:04:22 Updated: libldb-1.1.16-4.fc20.x86_64
    Jan 20 15:04:22 initscripts-9.51-1.fc20.x86_64: 100
    Jan 20 15:04:22 14:tcpdump-4.5.1-1.fc20.x86_64: 100
    Jan 20 15:04:24 Updated: yum-3.4.3-130.fc20.noarch
    Jan 20 15:04:26 selinux-policy-3.12.1-116.fc20.noarch: ts_done name in te is selinux-policy-targeted should be selinux-policy-3.12.1-116.fc20.noarch
    Jan 20 15:04:29 udisks2-2.1.1-1.fc20.x86_64: ts_done name in te is selinux-policy should be udisks2-2.1.1-1.fc20.x86_64
    Jan 20 15:04:31 32:bind-utils-9.9.4-8.fc20.x86_64: ts_done name in te is firewalld should be 32:bind-utils-9.9.4-8.fc20.x86_64
    Jan 20 15:04:32 32:bind-libs-9.9.4-8.fc20.x86_64: ts_done name in te is yum should be 32:bind-libs-9.9.4-8.fc20.x86_64
    Jan 20 15:04:34 32:bind-libs-lite-9.9.4-8.fc20.x86_64: ts_done name in te is udisks2 should be 32:bind-libs-lite-9.9.4-8.fc20.x86_64
    Jan 20 15:04:37 32:bind-license-9.9.4-8.fc20.noarch: ts_done name in te is bind-utils should be 32:bind-license-9.9.4-8.fc20.noarch
    Jan 20 15:04:37 libudisks2-2.1.1-1.fc20.x86_64: ts_done name in te is bind-libs should be libudisks2-2.1.1-1.fc20.x86_64
    Jan 20 15:04:39 perl-Glib-1.280-4.fc20.x86_64: ts_done name in te is bind-libs-lite should be perl-Glib-1.280-4.fc20.x86_64
    Jan 20 15:04:40 gstreamer1-plugins-good-1.2.2-1.fc20.x86_64: ts_done name in te is bind-license should be gstreamer1-plugins-good-1.2.2-1.fc20.x86_64
    Jan 20 15:04:42 libldb-1.1.16-3.fc20.x86_64: ts_done name in te is libudisks2 should be libldb-1.1.16-3.fc20.x86_64
    Jan 21 09:29:05 Updated: audit-libs-2.3.3-1.fc20.x86_64
    Jan 21 09:29:12 Updated: 1:java-1.7.0-openjdk-headless-1.7.0.60-2.4.4.1.fc20.x86_64
    Jan 21 09:29:13 Updated: 1:java-1.7.0-openjdk-1.7.0.60-2.4.4.1.fc20.x86_64
    Jan 21 09:29:14 Updated: 1:NetworkManager-glib-0.9.9.0-25.git20131003.fc20.x86_64
    Jan 21 09:29:18 Updated: 1:NetworkManager-0.9.9.0-25.git20131003.fc20.x86_64
    Jan 21 09:29:23 Updated: audit-2.3.3-1.fc20.x86_64
    Jan 21 09:29:24 Updated: audit-libs-python-2.3.3-1.fc20.x86_64
    Jan 21 09:29:26 Updated: kernel-headers-3.12.8-300.fc20.x86_64
    Jan 21 09:29:26 initscripts-9.51-1.fc20.x86_64: 100
    Jan 21 09:29:44 Installed: kernel-devel-3.12.8-300.fc20.x86_64
    Jan 21 09:29:44 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 21 09:29:45 selinux-policy-targeted-3.12.1-117.fc20.noarch: 100
    Jan 21 09:29:55 Installed: kernel-3.12.8-300.fc20.x86_64
    Jan 21 09:29:56 14:tcpdump-4.5.1-1.fc20.x86_64: 100
    Jan 21 09:31:00 kernel-devel-3.12.5-302.fc20.x86_64: ts_done name in te is selinux-policy-targeted should be kernel-devel-3.12.5-302.fc20.x86_64
    Jan 21 09:31:06 1:java-1.7.0-openjdk-headless-1.7.0.60-2.4.4.0.fc20.x86_64: ts_done name in te is kernel should be 1:java-1.7.0-openjdk-headless-1.7.0.60-2.4.4.0.fc20.x86_64
    Jan 21 09:31:09 1:java-1.7.0-openjdk-1.7.0.60-2.4.4.0.fc20.x86_64: ts_done name in te is kernel-devel should be 1:java-1.7.0-openjdk-1.7.0.60-2.4.4.0.fc20.x86_64
    Jan 21 09:31:12 audit-libs-python-2.3.2-1.fc20.x86_64: ts_done name in te is java-1.7.0-openjdk-headless should be audit-libs-python-2.3.2-1.fc20.x86_64
    Jan 21 09:31:16 1:NetworkManager-glib-0.9.9.0-24.git20131003.fc20.x86_64: ts_done name in te is java-1.7.0-openjdk should be 1:NetworkManager-glib-0.9.9.0-24.git20131003.fc20.x86_64
    Jan 21 09:31:21 audit-libs-2.3.2-1.fc20.x86_64: ts_done name in te is audit-libs-python should be audit-libs-2.3.2-1.fc20.x86_64
    Jan 21 09:32:21 14:tcpdump-4.5.1-1.fc20.x86_64: 100
    Jan 21 09:32:21 initscripts-9.51-1.fc20.x86_64: 100
    Jan 21 09:32:22 selinux-policy-targeted-3.12.1-117.fc20.noarch: 100
    Jan 21 09:32:22 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 21 09:36:46 14:tcpdump-4.5.1-1.fc20.x86_64: 100
    Jan 21 09:36:46 initscripts-9.51-1.fc20.x86_64: 100
    Jan 21 09:36:46 selinux-policy-targeted-3.12.1-117.fc20.noarch: 100
    Jan 21 09:36:46 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 21 09:37:09 14:tcpdump-4.5.1-1.fc20.x86_64: 100
    Jan 21 09:37:09 initscripts-9.51-1.fc20.x86_64: 100
    Jan 21 09:37:09 selinux-policy-targeted-3.12.1-117.fc20.noarch: 100
    Jan 21 09:37:09 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 21 09:54:57 14:tcpdump-4.5.1-1.fc20.x86_64: 100
    Jan 21 09:54:57 initscripts-9.51-1.fc20.x86_64: 100
    Jan 21 09:54:57 selinux-policy-targeted-3.12.1-117.fc20.noarch: 100
    Jan 21 09:54:57 1:nfs-utils-1.2.9-2.1.fc20.x86_64: 100
    Jan 21 10:00:33 Updated: selinux-policy-targeted-3.12.1-117.fc20.noarch
    Jan 21 10:00:54 Updated: 14:tcpdump-4.5.1-1.fc20.x86_64
    Jan 21 10:00:57 Updated: initscripts-9.51-1.fc20.x86_64
    Jan 21 10:00:58 Updated: 1:nfs-utils-1.2.9-2.1.fc20.x86_64
    Jan 21 10:05:27 Erased: kernel-3.12.5-302.fc20.x86_64
    Jan 21 10:30:25 Installed: ibus-libs-1.5.4-2.fc20.x86_64
    Jan 21 10:30:26 Installed: ibus-gtk3-1.5.4-2.fc20.x86_64
    Jan 21 10:30:27 Installed: ibus-gtk2-1.5.4-2.fc20.x86_64
    Jan 21 10:30:27 Installed: ibus-wayland-1.5.4-2.fc20.x86_64
    Jan 21 10:30:29 Installed: ibus-1.5.4-2.fc20.x86_64
    Jan 21 10:30:30 Installed: ibus-setup-1.5.4-2.fc20.noarch
    Jan 21 10:30:31 Installed: file-libs-5.14-12.fc20.x86_64
    Jan 21 10:30:32 Installed: file-5.14-12.fc20.x86_64
    Jan 21 10:30:33 Installed: python-magic-5.14-12.fc20.noarch
    Jan 21 10:30:35 Installed: 1:nfs-utils-1.2.8-6.0.fc20.x86_64
    Jan 21 10:31:10 Installed: 32:bind-license-9.9.4-8.fc20.noarch
    Jan 21 10:31:11 Installed: 32:bind-libs-9.9.4-8.fc20.x86_64
    Jan 21 10:31:12 Installed: libudisks2-2.1.1-1.fc20.x86_64
    Jan 21 10:31:13 Installed: udisks2-2.1.1-1.fc20.x86_64
    Jan 21 10:31:14 Installed: 32:bind-utils-9.9.4-8.fc20.x86_64
    Jan 21 10:31:15 Installed: 32:bind-libs-lite-9.9.4-8.fc20.x86_64
    Jan 21 10:31:17 Installed: perl-Glib-1.280-4.fc20.x86_64
    Jan 21 10:31:19 Installed: initscripts-9.50-1.fc20.x86_64
    Jan 21 10:31:20 Installed: libldb-1.1.16-3.fc20.x86_64
    Jan 21 10:31:21 Installed: 14:tcpdump-4.5.0-1.20131108gitb07944a.fc20.x86_64
    Jan 21 10:49:26 Erased: teamviewer-9.0.24147-1.i686
    Jan 21 10:49:51 Updated: ibus-libs-1.5.5-1.fc20.x86_64
    Jan 21 10:49:52 Updated: 32:bind-license-9.9.4-11.P2.fc20.noarch
    Jan 21 10:49:53 Updated: 32:bind-libs-9.9.4-11.P2.fc20.x86_64
    Jan 21 10:49:54 Updated: ibus-gtk2-1.5.5-1.fc20.x86_64
    Jan 21 10:49:55 Updated: ibus-setup-1.5.5-1.fc20.noarch
    Jan 21 10:49:56 Updated: ibus-gtk3-1.5.5-1.fc20.x86_64
    Jan 21 10:49:57 Updated: ibus-1.5.5-1.fc20.x86_64
    Jan 21 10:49:58 Updated: ibus-wayland-1.5.5-1.fc20.x86_64
    Jan 21 10:49:59 Updated: libudisks2-2.1.2-1.fc20.x86_64
    Jan 21 10:50:00 Updated: file-libs-5.14-14.fc20.x86_64
    Jan 21 10:50:01 Updated: file-5.14-14.fc20.x86_64
    Jan 21 10:50:02 Updated: python-magic-5.14-14.fc20.noarch
    Jan 21 10:50:04 Updated: udisks2-2.1.2-1.fc20.x86_64
    Jan 21 10:50:05 Updated: 32:bind-utils-9.9.4-11.P2.fc20.x86_64
    Jan 21 10:50:06 Updated: 32:bind-libs-lite-9.9.4-11.P2.fc20.x86_64
    Jan 21 10:50:07 Updated: perl-Glib-1.304-1.fc20.x86_64
    Jan 21 10:50:10 Updated: 1:nfs-utils-1.2.9-2.1.fc20.x86_64
    Jan 21 10:50:11 Updated: libldb-1.1.16-4.fc20.x86_64
    Jan 21 10:50:14 Updated: initscripts-9.51-1.fc20.x86_64
    Jan 21 10:50:15 Updated: 14:tcpdump-4.5.1-1.fc20.x86_64
    Jan 22 02:51:45 Updated: nss-util-3.15.4-1.fc20.x86_64
    Jan 22 02:51:46 Updated: nss-softokn-freebl-3.15.4-1.fc20.x86_64
    Jan 22 02:51:47 Updated: nss-softokn-3.15.4-1.fc20.x86_64
    Jan 22 02:51:48 Updated: nss-3.15.4-1.fc20.x86_64
    Jan 22 02:51:49 Updated: nss-sysinit-3.15.4-1.fc20.x86_64
    Jan 22 02:51:53 Updated: libvirt-client-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:54 Updated: libvirt-daemon-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:55 Updated: libvirt-daemon-driver-network-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:56 Updated: libvirt-daemon-driver-qemu-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:57 Updated: libvirt-daemon-driver-storage-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:58 Updated: libvirt-daemon-driver-interface-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:58 Updated: libvirt-daemon-driver-nodedev-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:59 Updated: libvirt-daemon-driver-nwfilter-1.1.3.3-1.fc20.x86_64
    Jan 22 02:51:59 Updated: libvirt-daemon-driver-secret-1.1.3.3-1.fc20.x86_64
    Jan 22 02:52:00 Updated: libvirt-daemon-kvm-1.1.3.3-1.fc20.x86_64
    Jan 22 02:52:01 Updated: nss-tools-3.15.4-1.fc20.x86_64
    Jan 22 02:52:02 Updated: hwdata-0.260-1.fc20.noarch
    Jan 22 02:52:03 Updated: gperftools-libs-2.1-4.fc20.x86_64
    Jan 22 02:52:04 Updated: nss-softokn-freebl-3.15.4-1.fc20.i686
    Jan 23 05:05:48 Updated: system-config-date-1.10.7-1.fc20.noarch

    How do I solve this?
    Re-install them using:

    sudo yum reinstall

    with all of those package one by one?

    thank you before…

  • Not all of them need to be re-installed, just ones that had scriptlets fail. But anyway, I guess you could do something like:
    sudo yum reinstall $(sudo sed '1,/selinux-policy-3.12.1-116/d' /var/log/yum.log |awk '{print $5}')

    Does that look right?

  • Thanks a lot. Last script worked perfectly.

Leave a Reply