From 1902176b93d8d882752f147e92d90ea67e8f8d89 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 28 Jul 2015 16:25:47 -0700 Subject: [PATCH] Disable semanage policy store migration This isn't necessary during out image builds, and is entirely irrelevant for out upgrade process. --- .../libsemanage/libsemanage-2.4-r1.ebuild | 21 ------------------- .../libsemanage/libsemanage-9999.ebuild | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-2.4-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-2.4-r1.ebuild index 3f644c9826..f70d55b62c 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-2.4-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-2.4-r1.ebuild @@ -104,24 +104,3 @@ multilib_src_install() { python_foreach_impl installation_py fi } - -pkg_postinst() { - # Migrate the SELinux semanage configuration store if not done already - local selinuxtype=$(awk -F'=' '/SELINUXTYPE=/ {print $2}' /etc/selinux/config); - if [ -n "${selinuxtype}" ] && [ ! -d /var/lib/selinux/${mcs}/active ] ; then - ewarn "Since the 2.4 SELinux userspace, the policy module store is moved" - ewarn "from /etc/selinux to /var/lib/selinux. The migration will be run now." - ewarn "If there are any issues, it can be done manually by running:" - ewarn "/usr/libexec/selinux/semanage_migrate_store" - ewarn "For more information, please see" - ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration" - fi - - # Run the store migration without rebuilds - for POLICY_TYPE in ${POLICY_TYPES} ; do - if [ ! -d "${ROOT}/var/lib/selinux/${POLICY_TYPE}/active" ] ; then - einfo "Migrating store ${POLICY_TYPE} (without policy rebuild)." - /usr/libexec/selinux/semanage_migrate_store -n -s "${POLICY_TYPE}" || die "Failed to migrate store ${POLICY_TYPE}" - fi - done -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-9999.ebuild index 2d8456d669..2ebe49a5a2 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-libs/libsemanage/libsemanage-9999.ebuild @@ -114,24 +114,3 @@ multilib_src_install() { python_foreach_impl installation_py fi } - -pkg_postinst() { - # Migrate the SELinux semanage configuration store if not done already - local selinuxtype=$(awk -F'=' '/SELINUXTYPE=/ {print $2}' /etc/selinux/config); - if [ -n "${selinuxtype}" ] && [ ! -d /var/lib/selinux/${mcs}/active ] ; then - ewarn "Since the 2.4 SELinux userspace, the policy module store is moved" - ewarn "from /etc/selinux to /var/lib/selinux. The migration will be run now." - ewarn "If there are any issues, it can be done manually by running:" - ewarn "/usr/libexec/selinux/semanage_migrate_store" - ewarn "For more information, please see" - ewarn "- https://github.com/SELinuxProject/selinux/wiki/Policy-Store-Migration" - fi - - # Run the store migration without rebuilds - for POLICY_TYPE in ${POLICY_TYPES} ; do - if [ ! -d "${ROOT}/var/lib/selinux/${POLICY_TYPE}/active" ] ; then - einfo "Migrating store ${POLICY_TYPE} (without policy rebuild)." - /usr/libexec/selinux/semanage_migrate_store -n -s "${POLICY_TYPE}" || die "Failed to migrate store ${POLICY_TYPE}" - fi - done -}