From 426fcce47a8266100cd9d6cb925d4aca5ae262d5 Mon Sep 17 00:00:00 2001 From: John Turner Date: Thu, 14 Aug 2025 20:10:28 -0400 Subject: add ebuild for spawns selinux policy --- sec-policy/spawns-policy/spawns-policy-9999.ebuild | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sec-policy/spawns-policy/spawns-policy-9999.ebuild diff --git a/sec-policy/spawns-policy/spawns-policy-9999.ebuild b/sec-policy/spawns-policy/spawns-policy-9999.ebuild new file mode 100644 index 0000000..8448858 --- /dev/null +++ b/sec-policy/spawns-policy/spawns-policy-9999.ebuild @@ -0,0 +1,42 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit git-r3 meson + +DESCRIPTION="Spawns personal selinux policy, based off of dssp5." +HOMEPAGE="https://jturnerusa.dev/cgit/selinux-policy" +EGIT_REPO_URI="https://jturnerusa.dev/cgit/selinux-policy/" + +BDEPEND="sys-apps/secilc" + +EGIT_SSH_KEYS=( + 'jturner.usa@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3D6QtWHDFV5agz2Ms/wPOAmRSuH3xGfsI/a8Nnex0c' +) + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +SELINUXTYPE="spawns" + +src_configure() { + local emesonargs=("-Dinstall_sources=true") + meson_src_configure +} + +pkg_postinst() { + local modules=$(find /usr/share/selinux/${SELINUXTYPE} -type f -name '*.cil') || die + + ebegin "loading modules" + semodule \ + --verbose \ + --priority=100 \ + --noreload \ + --preserve_tunables \ + --store ${SELINUXTYPE} \ + --install \ + ${modules[@]} + eend $? || die +} -- cgit v1.2.3