* [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-apm/
@ 2017-06-15 9:37 Jason Zaman
0 siblings, 0 replies; 2+ messages in thread
From: Jason Zaman @ 2017-06-15 9:37 UTC (permalink / raw
To: gentoo-commits
commit: ede41569dc9356f959088d2399ca95879bba1f1e
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 15 09:03:06 2017 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Thu Jun 15 09:37:06 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ede41569
sec-policy/selinux-apm: apm module files were renamed to acpi
Package-Manager: Portage-2.3.5, Repoman-2.3.1
sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild | 2 +-
sec-policy/selinux-apm/selinux-apm-9999.ebuild | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild b/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild
index 8ee829fe33e..469df11cc54 100644
--- a/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild
+++ b/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild
@@ -3,7 +3,7 @@
EAPI="6"
IUSE=""
-MODS="apm"
+MODS="acpi"
inherit selinux-policy-2
diff --git a/sec-policy/selinux-apm/selinux-apm-9999.ebuild b/sec-policy/selinux-apm/selinux-apm-9999.ebuild
index 8ee829fe33e..469df11cc54 100644
--- a/sec-policy/selinux-apm/selinux-apm-9999.ebuild
+++ b/sec-policy/selinux-apm/selinux-apm-9999.ebuild
@@ -3,7 +3,7 @@
EAPI="6"
IUSE=""
-MODS="apm"
+MODS="acpi"
inherit selinux-policy-2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-apm/
@ 2017-06-18 16:27 Jason Zaman
0 siblings, 0 replies; 2+ messages in thread
From: Jason Zaman @ 2017-06-18 16:27 UTC (permalink / raw
To: gentoo-commits
commit: 5a73a622fe4f7336a995e1659ee93dfed5835b23
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 18 08:58:45 2017 +0000
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
CommitDate: Sun Jun 18 16:27:34 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a73a622
sec-policy/selinux-apm: remove old apm module from store
"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)
Package-Manager: Portage-2.3.5, Repoman-2.3.1
.../selinux-apm/selinux-apm-2.20170204-r4.ebuild | 23 +++++++++++++++++++++-
sec-policy/selinux-apm/selinux-apm-9999.ebuild | 23 +++++++++++++++++++++-
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild b/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild
index 469df11cc54..1008927338d 100644
--- a/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild
+++ b/sec-policy/selinux-apm/selinux-apm-2.20170204-r4.ebuild
@@ -7,8 +7,29 @@ MODS="acpi"
inherit selinux-policy-2
-DESCRIPTION="SELinux policy for apm"
+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
+}
diff --git a/sec-policy/selinux-apm/selinux-apm-9999.ebuild b/sec-policy/selinux-apm/selinux-apm-9999.ebuild
index 469df11cc54..1008927338d 100644
--- a/sec-policy/selinux-apm/selinux-apm-9999.ebuild
+++ b/sec-policy/selinux-apm/selinux-apm-9999.ebuild
@@ -7,8 +7,29 @@ MODS="acpi"
inherit selinux-policy-2
-DESCRIPTION="SELinux policy for apm"
+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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-18 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 9:37 [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-apm/ Jason Zaman
-- strict thread matches above, loose matches on Subject: below --
2017-06-18 16:27 Jason Zaman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox