From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6B714158086 for ; Sat, 1 Jan 2022 22:44:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B29DC2BC03B; Sat, 1 Jan 2022 22:44:14 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED4DB2BC03B for ; Sat, 1 Jan 2022 22:44:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B59F342F1A for ; Sat, 1 Jan 2022 22:44:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6906B219 for ; Sat, 1 Jan 2022 22:44:03 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1641076996.dff61709d44bbd83f843d88ff1c7c8069039069c.perfinion@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sec-policy/selinux-base-policy/ X-VCS-Repository: repo/gentoo X-VCS-Files: sec-policy/selinux-base-policy/selinux-base-policy-2.20210203-r1.ebuild sec-policy/selinux-base-policy/selinux-base-policy-2.20210908-r1.ebuild sec-policy/selinux-base-policy/selinux-base-policy-9999.ebuild X-VCS-Directories: sec-policy/selinux-base-policy/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: dff61709d44bbd83f843d88ff1c7c8069039069c X-VCS-Branch: master Date: Sat, 1 Jan 2022 22:44:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 534afe38-3f4f-422c-b8a2-6839598560ae X-Archives-Hash: a37d47edf1423a5d955c36f94c94d936 commit: dff61709d44bbd83f843d88ff1c7c8069039069c Author: Grzegorz Filo wp pl> AuthorDate: Wed Dec 29 19:53:34 2021 +0000 Commit: Jason Zaman gentoo org> CommitDate: Sat Jan 1 22:43:16 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dff61709 sec-policy/selinux-base-policy: Remove obsolete selinux modules Closes: https://github.com/gentoo/gentoo/pull/23568 Signed-off-by: Grzegorz Filo wp.pl> Signed-off-by: Jason Zaman gentoo.org> .../selinux-base-policy-2.20210203-r1.ebuild | 12 ++++++++++++ .../selinux-base-policy-2.20210908-r1.ebuild | 12 ++++++++++++ .../selinux-base-policy/selinux-base-policy-9999.ebuild | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20210203-r1.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20210203-r1.ebuild index 56db7e92b5d0..cb444f4de09d 100644 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20210203-r1.ebuild +++ b/sec-policy/selinux-base-policy/selinux-base-policy-2.20210203-r1.ebuild @@ -28,6 +28,7 @@ BDEPEND=" sys-devel/m4" MODS="application authlogin bootloader clock consoletype cron dmesg fstools getty hostname init iptables libraries locallogin logging lvm miscfiles modutils mount mta netutils nscd portage raid rsync selinuxutil setrans ssh staff storage su sysadm sysnetwork systemd tmpfiles udev userdomain usermanage unprivuser xdg" +DEL_MODS="hotplug" LICENSE="GPL-2" SLOT="0" S="${WORKDIR}/" @@ -60,6 +61,10 @@ src_prepare() { modfiles="$(find ${S}/refpolicy/policy/modules -iname $i.fc) $modfiles" done + for i in ${DEL_MODS}; do + [[ "${MODS}" != *${i}* ]] || die "Duplicate module in MODS and DEL_MODS: ${i}" + done + for i in ${POLICY_TYPES}; do mkdir "${S}"/${i} || die "Failed to create directory ${S}/${i}" cp "${S}"/refpolicy/doc/Makefile.example "${S}"/${i}/Makefile \ @@ -111,6 +116,13 @@ pkg_postinst() { cd "${ROOT}/usr/share/selinux/${i}" semodule ${root_opts} -s ${i} ${COMMAND} + + for mod in ${DEL_MODS}; do + if semodule ${root_opts} -s ${i} -l | grep -q "\b${mod}\b"; then + einfo "Removing obsolete ${i} ${mod} policy package" + semodule ${root_opts} -s ${i} -r ${mod} + fi + done done # Don't relabel when cross compiling diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-2.20210908-r1.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-2.20210908-r1.ebuild index 56db7e92b5d0..cb444f4de09d 100644 --- a/sec-policy/selinux-base-policy/selinux-base-policy-2.20210908-r1.ebuild +++ b/sec-policy/selinux-base-policy/selinux-base-policy-2.20210908-r1.ebuild @@ -28,6 +28,7 @@ BDEPEND=" sys-devel/m4" MODS="application authlogin bootloader clock consoletype cron dmesg fstools getty hostname init iptables libraries locallogin logging lvm miscfiles modutils mount mta netutils nscd portage raid rsync selinuxutil setrans ssh staff storage su sysadm sysnetwork systemd tmpfiles udev userdomain usermanage unprivuser xdg" +DEL_MODS="hotplug" LICENSE="GPL-2" SLOT="0" S="${WORKDIR}/" @@ -60,6 +61,10 @@ src_prepare() { modfiles="$(find ${S}/refpolicy/policy/modules -iname $i.fc) $modfiles" done + for i in ${DEL_MODS}; do + [[ "${MODS}" != *${i}* ]] || die "Duplicate module in MODS and DEL_MODS: ${i}" + done + for i in ${POLICY_TYPES}; do mkdir "${S}"/${i} || die "Failed to create directory ${S}/${i}" cp "${S}"/refpolicy/doc/Makefile.example "${S}"/${i}/Makefile \ @@ -111,6 +116,13 @@ pkg_postinst() { cd "${ROOT}/usr/share/selinux/${i}" semodule ${root_opts} -s ${i} ${COMMAND} + + for mod in ${DEL_MODS}; do + if semodule ${root_opts} -s ${i} -l | grep -q "\b${mod}\b"; then + einfo "Removing obsolete ${i} ${mod} policy package" + semodule ${root_opts} -s ${i} -r ${mod} + fi + done done # Don't relabel when cross compiling diff --git a/sec-policy/selinux-base-policy/selinux-base-policy-9999.ebuild b/sec-policy/selinux-base-policy/selinux-base-policy-9999.ebuild index 76791df9dcb2..adeb92d6f444 100644 --- a/sec-policy/selinux-base-policy/selinux-base-policy-9999.ebuild +++ b/sec-policy/selinux-base-policy/selinux-base-policy-9999.ebuild @@ -28,6 +28,7 @@ BDEPEND=" sys-devel/m4" MODS="application authlogin bootloader clock consoletype cron dmesg fstools getty hostname init iptables libraries locallogin logging lvm miscfiles modutils mount mta netutils nscd portage raid rsync selinuxutil setrans ssh staff storage su sysadm sysnetwork systemd tmpfiles udev userdomain usermanage unprivuser xdg" +DEL_MODS="hotplug" LICENSE="GPL-2" SLOT="0" S="${WORKDIR}/" @@ -60,6 +61,10 @@ src_prepare() { modfiles="$(find ${S}/refpolicy/policy/modules -iname $i.fc) $modfiles" done + for i in ${DEL_MODS}; do + [[ "${MODS}" != *${i}* ]] || die "Duplicate module in MODS and DEL_MODS: ${i}" + done + for i in ${POLICY_TYPES}; do mkdir "${S}"/${i} || die "Failed to create directory ${S}/${i}" cp "${S}"/refpolicy/doc/Makefile.example "${S}"/${i}/Makefile \ @@ -111,6 +116,13 @@ pkg_postinst() { cd "${ROOT}/usr/share/selinux/${i}" semodule ${root_opts} -s ${i} ${COMMAND} + + for mod in ${DEL_MODS}; do + if semodule ${root_opts} -s ${i} -l | grep -q "\b${mod}\b"; then + einfo "Removing obsolete ${i} ${mod} policy package" + semodule ${root_opts} -s ${i} -r ${mod} + fi + done done # Don't relabel when cross compiling