diff options
author | Kenton Groombridge <concord@gentoo.org> | 2022-09-03 20:09:27 -0400 |
---|---|---|
committer | Kenton Groombridge <concord@gentoo.org> | 2022-09-03 20:17:42 -0400 |
commit | a43f45474db207bd6a6e3bfa7ed6b27ab4f8b2e4 (patch) | |
tree | 0daddef3ac948afd1ffe663a222430ed20427603 /sec-policy/selinux-apm/selinux-apm-2.20220520-r1.ebuild | |
parent | sec-policy/selinux-mailman: drop 9999 (diff) | |
download | gentoo-a43f45474db207bd6a6e3bfa7ed6b27ab4f8b2e4.tar.gz gentoo-a43f45474db207bd6a6e3bfa7ed6b27ab4f8b2e4.tar.bz2 gentoo-a43f45474db207bd6a6e3bfa7ed6b27ab4f8b2e4.zip |
sec-policy: Release of SELinux policies 2.20220520-r1
Signed-off-by: Kenton Groombridge <concord@gentoo.org>
Diffstat (limited to 'sec-policy/selinux-apm/selinux-apm-2.20220520-r1.ebuild')
-rw-r--r-- | sec-policy/selinux-apm/selinux-apm-2.20220520-r1.ebuild | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sec-policy/selinux-apm/selinux-apm-2.20220520-r1.ebuild b/sec-policy/selinux-apm/selinux-apm-2.20220520-r1.ebuild new file mode 100644 index 000000000000..97146fc67fc6 --- /dev/null +++ b/sec-policy/selinux-apm/selinux-apm-2.20220520-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +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 +} |