Index: rpm-4.17.1.1/plugins/selinux.c =================================================================== --- rpm-4.17.1.1.orig/plugins/selinux.c +++ rpm-4.17.1.1/plugins/selinux.c @@ -7,6 +7,7 @@ #include #include #include "lib/rpmplugin.h" +#include #include "debug.h" @@ -165,9 +166,15 @@ static rpmRC selinux_fsm_file_prepare(rp char *scon = NULL; if (selabel_lookup_raw(sehandle, &scon, dest, file_mode) == 0) { int conrc = lsetfilecon(path, scon); - if (conrc == 0 || (conrc < 0 && errno == EOPNOTSUPP)) rc = RPMRC_OK; + else { + char *tup = getenv("TRANSACTIONAL_UPDATE"); + if ( tup != NULL && ! strncmp( tup, "true", 4 ) ) { + rpmlog(RPMLOG_DEBUG, "lsetfilecon failed, will be healed upon reboot (transactional update): (%s, %s)\n", path, scon); + rc = RPMRC_OK; + } + } rpmlog(loglvl(rc != RPMRC_OK), "lsetfilecon: (%s, %s) %s\n", path, scon, (conrc < 0 ? strerror(errno) : ""));