summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <perfinion@gentoo.org>2017-12-25 16:06:21 +0800
committerJason Zaman <perfinion@gentoo.org>2017-12-25 16:07:17 +0800
commit4461eeb47657ebadad7b84311c6fb3d2bb8d52ef (patch)
tree880119506bc31400772f1167432549a1c6395db0 /sec-policy/selinux-apm/selinux-apm-2.20170805-r4.ebuild
parentdev-libs/ding-libs: amd64 stable (diff)
downloadgentoo-4461eeb47657ebadad7b84311c6fb3d2bb8d52ef.tar.gz
gentoo-4461eeb47657ebadad7b84311c6fb3d2bb8d52ef.tar.bz2
gentoo-4461eeb47657ebadad7b84311c6fb3d2bb8d52ef.zip
sec-policy: Release of SELinux policies 2.20170805-r4
Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'sec-policy/selinux-apm/selinux-apm-2.20170805-r4.ebuild')
-rw-r--r--sec-policy/selinux-apm/selinux-apm-2.20170805-r4.ebuild36
1 files changed, 36 insertions, 0 deletions
diff --git a/sec-policy/selinux-apm/selinux-apm-2.20170805-r4.ebuild b/sec-policy/selinux-apm/selinux-apm-2.20170805-r4.ebuild
new file mode 100644
index 000000000000..d389ead90e00
--- /dev/null
+++ b/sec-policy/selinux-apm/selinux-apm-2.20170805-r4.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+IUSE=""
+MODS="acpi"
+
+inherit selinux-policy-2
+
+DESCRIPTION="SELinux policy for acpi"
+
+if [[ ${PV} != 9999* ]] ; then
+ KEYWORDS="~amd64 -arm ~arm64 ~mips ~x86"
+fi
+
+pkg_postinst() {
+ # "apm" module got renamed to "acpi", must remove apm first
+ # the contexts are okay even tho the modules are not
+ # replaced in the same command (doesnt become unlabeled_t)
+ for i in ${POLICY_TYPES}; do
+ if semodule -s "${i}" -l | grep apm >/dev/null 2>&1; then
+ semodule -s "${i}" -r apm
+ fi
+ done
+ selinux-policy-2_pkg_postinst
+}
+
+pkg_postrm() {
+ for i in ${POLICY_TYPES}; do
+ if semodule -s "${i}" -l | grep apm >/dev/null 2>&1; then
+ semodule -s "${i}" -r apm
+ fi
+ done
+ selinux-policy-2_pkg_postrm
+}