From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1R3Clf-0004Bp-Bz for garchives@archives.gentoo.org; Mon, 12 Sep 2011 20:06:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7CE921C020; Mon, 12 Sep 2011 20:06:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6098721C020 for ; Mon, 12 Sep 2011 20:06:03 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BB5FB1B402A for ; Mon, 12 Sep 2011 20:06:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 23AD180042 for ; Mon, 12 Sep 2011 20:06:02 +0000 (UTC) From: "Sven Vermeulen" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Vermeulen" Message-ID: <1e536e66ba492818c058129461454522d8929da9.SwifT@gentoo> Subject: [gentoo-commits] proj/hardened-dev:master commit in: sys-apps/policycoreutils/ X-VCS-Repository: proj/hardened-dev X-VCS-Files: sys-apps/policycoreutils/ChangeLog sys-apps/policycoreutils/metadata.xml sys-apps/policycoreutils/policycoreutils-2.1.0-r1.ebuild X-VCS-Directories: sys-apps/policycoreutils/ X-VCS-Committer: SwifT X-VCS-Committer-Name: Sven Vermeulen X-VCS-Revision: 1e536e66ba492818c058129461454522d8929da9 Date: Mon, 12 Sep 2011 20:06:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 9a633659e1f6617cfe5c2077fe6f9064 commit: 1e536e66ba492818c058129461454522d8929da9 Author: Sven Vermeulen siphos be> AuthorDate: Mon Sep 12 20:04:44 2011 +0000 Commit: Sven Vermeulen siphos be> CommitDate: Mon Sep 12 20:04:44 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/hardened-dev.= git;a=3Dcommit;h=3D1e536e66 Support semanage permissive feature --- sys-apps/policycoreutils/ChangeLog | 455 ++++++++++++++= ++++++ sys-apps/policycoreutils/metadata.xml | 17 + .../policycoreutils-2.1.0-r1.ebuild | 119 +++++ 3 files changed, 591 insertions(+), 0 deletions(-) diff --git a/sys-apps/policycoreutils/ChangeLog b/sys-apps/policycoreutil= s/ChangeLog new file mode 100644 index 0000000..ae5c492 --- /dev/null +++ b/sys-apps/policycoreutils/ChangeLog @@ -0,0 +1,455 @@ +# ChangeLog for sys-apps/policycoreutils +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/ChangeLog,v = 1.89 2011/08/12 18:46:59 blueness Exp $ + + 12 Sep 2011; +policycoreutils-2.1.0-r1.ebuild, + +metadata.xml: + Support for semodule permissive + +*policycoreutils-2.1.0-r1 (04 Sep 2011) + + 04 Sep 2011; +policycoreutils-2.1.0-r1.ebuild, + +metadata.xml: + Add keepdir on /var/lib/selinux to keep permissive definitions + + 12 Aug 2011; Anthony G. Basile + -policycoreutils-2.0.55.ebuild, -policycoreutils-2.0.69.ebuild, + -policycoreutils-2.0.69-r1.ebuild, -policycoreutils-2.0.69-r2.ebuild, + -files/policycoreutils-2.0.69-setfiles.diff: + Removed deprecated versions + +*policycoreutils-2.1.0 (03 Aug 2011) + + 03 Aug 2011; Anthony G. Basile + +policycoreutils-2.1.0.ebuild: + Bump to 20110727 SELinux userspace release + +*policycoreutils-2.0.85 (15 Jul 2011) + + 15 Jul 2011; Anthony G. Basile + +policycoreutils-2.0.85.ebuild, + +files/policycoreutils-2.0.85-fix-seunshare-vuln.patch.gz, + +files/policycoreutils-2.0.85-sesandbox.patch.gz: + Add fix for bug #374897 and initial support for python3 + + 08 Jul 2011; Samuli Suominen + policycoreutils-2.0.55.ebuild, policycoreutils-2.0.69.ebuild, + policycoreutils-2.0.69-r1.ebuild, policycoreutils-2.0.69-r2.ebuild: + Convert from "useq" to "use". + +*policycoreutils-2.0.82-r1 (30 Jun 2011) + + 30 Jun 2011; Anthony G. Basile + +policycoreutils-2.0.82-r1.ebuild: + Overwrite invalid .po files with valid ones, fixes bug #372807 + + 16 Jun 2011; Anthony G. Basile + policycoreutils-2.0.82.ebuild: + Drop use_nls dependency on gettext. Its mandatory. See bug #299681. + Also put gettext in COMMON_DEPS, it is more than a RDEPEND. + + 28 May 2011; Anthony G. Basile + policycoreutils-2.0.82.ebuild: + Stable amd64 x86 + + 16 Apr 2011; Anthony G. Basile metadata.xml: + Updated metadata info. + + 08 Feb 2011; Arfrever Frehtes Taifersar Arahesis + policycoreutils-2.0.82.ebuild: + Set SUPPORT_PYTHON_ABIS (bug #353762). Fix dependencies. Fix installat= ion + with FEATURES=3D"multilib-strict". + +*policycoreutils-2.0.82 (05 Feb 2011) + + 05 Feb 2011; Anthony G. Basile + +policycoreutils-2.0.82.ebuild: + New upstream release. + +*policycoreutils-2.0.69-r2 (05 Feb 2011) + + 05 Feb 2011; Anthony G. Basile + +policycoreutils-2.0.69-r2.ebuild, + +files/policycoreutils-2.0.69-setfiles.diff: + Fixed bug #300613 + + 04 Apr 2010; Arfrever Frehtes Taifersar Arahesis + policycoreutils-2.0.55.ebuild, policycoreutils-2.0.69.ebuild, + policycoreutils-2.0.69-r1.ebuild: + Delete calls to deprecated python_version(). + +*policycoreutils-2.0.69-r1 (20 Sep 2009) + + 20 Sep 2009; Chris PeBenito + +policycoreutils-2.0.69-r1.ebuild: + Update rlpkg for ext4 and btrfs. + + 14 Sep 2009; Chris PeBenito + policycoreutils-2.0.69.ebuild: + Fix libsemanage DEP. + + 02 Aug 2009; Chris PeBenito + policycoreutils-2.0.55.ebuild, policycoreutils-2.0.69.ebuild: + Add python_need_rebuild. + +*policycoreutils-2.0.69 (02 Aug 2009) + + 02 Aug 2009; Chris PeBenito + +policycoreutils-2.0.69.ebuild: + New upstream release. + + 18 Jul 2009; Chris PeBenito + -policycoreutils-1.34.15.ebuild, policycoreutils-2.0.55.ebuild: + Mark stable. Remove old ebuilds. + +*policycoreutils-2.0.55 (03 Oct 2008) + + 03 Oct 2008; Chris PeBenito + +policycoreutils-2.0.55.ebuild: + Initial commit of policycoreutils 2.0. + + 29 May 2008; Ali Polatel + policycoreutils-1.34.15.ebuild: + python_mod_optimize is ROOT aware. Fixed python_mod_cleanup. + + 26 May 2008; Chris PeBenito + policycoreutils-1.34.15.ebuild: + Fix libsemanage dependency. + + 13 May 2008; Chris PeBenito + -files/policycoreutils-1.28-quietlp.diff, + -files/policycoreutils-1.32-quietlp.diff, + -files/policycoreutils-unsigned-char-ppc.diff, + -policycoreutils-1.28.ebuild, -policycoreutils-1.30-r1.ebuild, + -policycoreutils-1.34.1.ebuild, -policycoreutils-1.34.11.ebuild, + policycoreutils-1.34.15.ebuild: + Mark 1.34.15 stable, clear old ebuilds. + +*policycoreutils-1.34.15 (29 Jan 2008) + + 29 Jan 2008; Chris PeBenito + +policycoreutils-1.34.15.ebuild: + New upstream bugfix release. + + 19 Oct 2007; Chris PeBenito + policycoreutils-1.34.11.ebuild: + Fix quoting in unpack. + +*policycoreutils-1.34.11 (18 Oct 2007) + + 18 Oct 2007; Chris PeBenito + +policycoreutils-1.34.11.ebuild: + New upstream release. + + 04 Jun 2007; Chris PeBenito + policycoreutils-1.34.1.ebuild: + Mark stable. + +*policycoreutils-1.34.1 (15 Feb 2007) + + 15 Feb 2007; Chris PeBenito + +policycoreutils-1.34.1.ebuild: + New upstream release. + + 24 Oct 2006; Chris PeBenito + policycoreutils-1.30.30.ebuild: + Fix glibc handling. + + 09 Oct 2006; Chris PeBenito + policycoreutils-1.30.30.ebuild: + Stable to make repoman happy. + +*policycoreutils-1.30.30 (05 Oct 2006) + + 05 Oct 2006; Chris PeBenito + +files/policycoreutils-1.32-quietlp.diff, +policycoreutils-1.30.30.ebu= ild: + Add SVN snapshot and updated extras in preparation for reference polic= y. + + 31 Jul 2006; Chris PeBenito + policycoreutils-1.30-r1.ebuild: + Mark stable, long overdue. + +*policycoreutils-1.30-r1 (28 Mar 2006) + + 28 Mar 2006; Chris PeBenito + -policycoreutils-1.30.ebuild, +policycoreutils-1.30-r1.ebuild: + Fix install location of python site packages. + + 22 Feb 2006; Stephen Bennett policycoreutils-1.28.ebu= ild: + Alpha stable + + 19 Feb 2006; Joshua Kinard policycoreutils-1.28.ebu= ild: + Marked stable on mips. + +*policycoreutils-1.30 (18 Mar 2006) + + 18 Mar 2006; Chris PeBenito + +policycoreutils-1.30.ebuild: + New upstream release. + + 05 Feb 2006; Chris PeBenito + +files/policycoreutils-unsigned-char-ppc.diff, + policycoreutils-1.28.ebuild: + Add patch to fix #121689. + + 17 Jan 2006; Chris PeBenito + policycoreutils-1.28.ebuild: + Mark stable, x86, amd64, ppc, sparc. + + 14 Jan 2006; Stephen Bennett policycoreutils-1.28.ebu= ild: + Added ~alpha + + 15 Dec 2005; Chris PeBenito + policycoreutils-1.22.ebuild, policycoreutils-1.24-r2.ebuild, + policycoreutils-1.28.ebuild: + Tighten up versioning to try to prevent mismatch problems as seen in #= 112348. + +*policycoreutils-1.28 (09 Dec 2005) + + 09 Dec 2005; Chris PeBenito + +files/policycoreutils-1.28-quietlp.diff, -policycoreutils-1.24-r1.ebu= ild, + +policycoreutils-1.28.ebuild: + New upstream release. + +*policycoreutils-1.24-r2 (08 Dec 2005) + + 08 Dec 2005; Chris PeBenito + +policycoreutils-1.24-r2.ebuild: + Add compatability symlink for genhomedircon. + +*policycoreutils-1.24-r1 (09 Sep 2005) + + 09 Sep 2005; Chris PeBenito + +policycoreutils-1.24-r1.ebuild: + Update for fixed selinuxconfig source policy path. + + 11 Jul 2005; Chris PeBenito + policycoreutils-1.22.ebuild, policycoreutils-1.24.ebuild: + Fix RDEPEND for building stages. Libsepol is required now. + +*policycoreutils-1.24 (25 Jun 2005) + + 25 Jun 2005; Chris PeBenito + +files/policycoreutils-1.24-genhomedircon-quiet.diff, + -policycoreutils-1.20-r1.ebuild, +policycoreutils-1.24.ebuild: + New upstream release. + + 10 May 2005; Stephen Bennett policycoreutils-1.22.ebu= ild: + mips stable + + 01 May 2005; Stephen Bennett policycoreutils-1.22.ebu= ild: + Added ~mips. + + 01 May 2005; Chris PeBenito + policycoreutils-1.22.ebuild: + Mark stable. + +*policycoreutils-1.22 (13 Mar 2005) + + 13 Mar 2005; Chris PeBenito + +files/policycoreutils-1.22-genhomedircon-quiet.diff, + +policycoreutils-1.22.ebuild: + New upstream release. + +*policycoreutils-1.20-r1 (13 Feb 2005) + + 13 Feb 2005; Chris PeBenito + -policycoreutils-1.16.ebuild, +policycoreutils-1.20-r1.ebuild, + -policycoreutils-1.20.ebuild: + Add back some tools deleted from upstream libselinux. + +*policycoreutils-1.20 (07 Jan 2005) + + 07 Jan 2005; Chris PeBenito + policycoreutils-1.18-r1.ebuild, +policycoreutils-1.20.ebuild: + New upstream release. Mark 1.18-r1 stable. + +*policycoreutils-1.18-r1 (03 Jan 2005) + + 03 Jan 2005; Chris PeBenito + +files/policycoreutils-nonls.diff, +policycoreutils-1.18-r1.ebuild: + Make pam and nls optional for embedded systems use. + + 22 Nov 2004; Chris PeBenito + policycoreutils-1.18.ebuild: + Ensure a few dirs and perms during stage1 build. + + 15 Nov 2004; Chris PeBenito + policycoreutils-1.18.ebuild: + Fix libsepol dep. + +*policycoreutils-1.18 (14 Nov 2004) + + 14 Nov 2004; Chris PeBenito + +policycoreutils-1.18.ebuild: + New upstream release. + +*policycoreutils-1.16 (07 Sep 2004) + + 07 Sep 2004; Chris PeBenito + +files/policycoreutils-1.16-genhomedircon-compat.diff, + +policycoreutils-1.16.ebuild: + New upstream release. + + 08 Aug 2004; Tom Martin policycoreutils-1.12-r1.eb= uild, + policycoreutils-1.12-r2.ebuild, policycoreutils-1.14.ebuild, + policycoreutils-1.4-r1.ebuild: + Typo in DESCRIPTION: utilites -> utilities. Bug 59717. + + 06 Jul 2004; Chris PeBenito + policycoreutils-1.14.ebuild: + Bump extras to fix free() bug in runscript_selinux.so. + +*policycoreutils-1.12-r2 (06 Jul 2004) + + 06 Jul 2004; Chris PeBenito + +files/runscript-selinux.diff, +policycoreutils-1.12-r2.ebuild: + Fix free() error in runscript_selinux.so. + + 03 Jul 2004; Chris PeBenito + policycoreutils-1.14.ebuild: + Update extras. + +*policycoreutils-1.14 (02 Jul 2004) + + 02 Jul 2004; Chris PeBenito + +files/policycoreutils-1.14-genhomedircon-compat.diff, + +policycoreutils-1.14.ebuild: + New upstream version. + +*policycoreutils-1.12-r1 (28 Jun 2004) + + 28 Jun 2004; Chris PeBenito + +policycoreutils-1.12-r1.ebuild: + Add toggle_bool to extras. + + 11 Jun 2004; Chris PeBenito + -policycoreutils-1.10-r1.ebuild, policycoreutils-1.12.ebuild: + Mark stable + +*policycoreutils-1.12 (14 May 2004) + + 14 May 2004; Chris PeBenito + +policycoreutils-1.12.ebuild: + New upstream release. + +*policycoreutils-1.10-r1 (28 Apr 2004) + + 28 Apr 2004; Chris PeBenito + +policycoreutils-1.10-r1.ebuild, -policycoreutils-1.10.ebuild, + -policycoreutils-1.8.ebuild: + Update extras and mark stable. + +*policycoreutils-1.10 (20 Apr 2004) + + 08 Apr 2004; Chris PeBenito + policycoreutils-1.4-r1.ebuild, policycoreutils-1.8.ebuild: + More specific versioning for libselinux. + + 08 Apr 2004; Chris PeBenito + policycoreutils-1.8.ebuild: + Mark stable for 2004.1 + + 15 Mar 2004; Chris PeBenito + policycoreutils-1.8.ebuild: + Update extras. + +*policycoreutils-1.8 (12 Mar 2004) + + 12 Mar 2004; Chris PeBenito + policycoreutils-1.8.ebuild: + New upstream release. + +*policycoreutils-1.6 (24 Feb 2004) + + 24 Feb 2004; Chris PeBenito + policycoreutils-1.4-r1.ebuild, policycoreutils-1.6.ebuild: + New upstream release. Mark 1.4-r1 stable. + +*policycoreutils-1.4-r1 (09 Feb 2004) + + 09 Feb 2004; Chris PeBenito + policycoreutils-1.4-r1.ebuild: + Move extras to mirrors, and add runscript_selinux.so. + + 31 Jan 2004; Chris PeBenito files/rlpkg: + Switch to portageq from inline python. Add missing quotes for complet= eness. + + 16 Dec 2003; Chris PeBenito + policycoreutils-1.4.ebuild: + Mark stable. + +*policycoreutils-1.4 (06 Dec 2003) + + 06 Dec 2003; Chris PeBenito + policycoreutils-1.4.ebuild: + New upstream version. + +*policycoreutils-1.2-r2 (23 Nov 2003) + + 23 Nov 2003; Chris PeBenito + policycoreutils-1.2-r2.ebuild: + Bump to add /sbin/seinit. + + 29 Oct 2003; Joshua Brindle + policycoreutils-1.2-r1.ebuild: + added sparc + +*policycoreutils-1.2-r1 (20 Oct 2003) + + 20 Oct 2003; Chris PeBenito + policycoreutils-1.2-r1.ebuild: + Remove unneeded -lattr linking from Makefiles. + + 07 Oct 2003; Chris PeBenito + policycoreutils-1.2.ebuild: + Mark stable. + +*policycoreutils-1.2 (03 Oct 2003) + + 03 Oct 2003; Chris PeBenito + policycoreutils-1.2.ebuild, files/policycoreutils-1.2-gentoo.diff: + New upstream version. + + 29 Sep 2003; Chris PeBenito + policycoreutils-1.1-r1.ebuild: + Add build USE flag; when asserted, only setfiles is built and merged. + + 22 Sep 2003; Chris PeBenito + policycoreutils-1.1-r1.ebuild: + Move selinux-base-policy RDEPEND to checkpolicy. No longer RDEPEND on + checkpolicy. + + 22 Sep 2003; metadata.xml: + Fix metadata.xml + + 24 Aug 2003; Chris PeBenito + policycoreutils-1.1-r1.ebuild, policycoreutils-1.1.ebuild: + Mark stable + +*policycoreutils-1.1-r1 (18 Aug 2003) + + 18 Aug 2003; Chris PeBenito metadata.xml, + policycoreutils-1.0.ebuild, policycoreutils-1.1-r1.ebuild, + files/avc_enforcing, files/avc_toggle, + files/policycoreutils-1.1-setfiles.diff: + Add setfiles patch for alternate root. Add avc_enforcing and avc_toggl= e + scripts for ease of use for old API users. Use package description fro= m RPM + spec file in metadata.xml long description. + +*policycoreutils-1.1 (14 Aug 2003) + + 14 Aug 2003; Chris PeBenito + policycoreutils-1.1.ebuild: + New upstream version + + 10 Aug 2003; Chris PeBenito + policycoreutils-1.0.ebuild, files/rlpkg: + Add mkinitrd RDEP, add rlpkg. + +*policycoreutils-1.0 (03 Aug 2003) + + 03 Aug 2003; Chris PeBenito metadata.xml, + policycoreutils-1.0.ebuild, files/policycoreutils-1.0-gentoo.diff: + Initial commit + diff --git a/sys-apps/policycoreutils/metadata.xml b/sys-apps/policycoreu= tils/metadata.xml new file mode 100644 index 0000000..87cddb0 --- /dev/null +++ b/sys-apps/policycoreutils/metadata.xml @@ -0,0 +1,17 @@ + + + + selinux + + Policycoreutils contains the policy core utilities that are required + for basic operation of a SELinux system. These utilities include + load_policy to load policies, setfiles to label filesystems, newrole + to switch roles, and run_init to run /etc/init.d scripts in the proper + context. + + Gentoo-specific tools include rlpkg for relabeling packages by name, + avc_toggle to toggle between enforcing and permissive modes, and + avc_enforcing to query the current mode of the system, enforcing or + permissive. + + diff --git a/sys-apps/policycoreutils/policycoreutils-2.1.0-r1.ebuild b/s= ys-apps/policycoreutils/policycoreutils-2.1.0-r1.ebuild new file mode 100644 index 0000000..0a53ca1 --- /dev/null +++ b/sys-apps/policycoreutils/policycoreutils-2.1.0-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/policycoreutils/policycoreut= ils-2.1.0.ebuild,v 1.1 2011/08/03 10:18:27 blueness Exp $ + +EAPI=3D"3" +PYTHON_DEPEND=3D"*" +PYTHON_USE_WITH=3D"xml" +SUPPORT_PYTHON_ABIS=3D"1" +RESTRICT_PYTHON_ABIS=3D"*-jython" + +inherit multilib python toolchain-funcs eutils + +EXTRAS_VER=3D"1.21" +SEMNG_VER=3D"2.1.0" +SELNX_VER=3D"2.1.0" +SEPOL_VER=3D"2.1.0" + +IUSE=3D"" + +DESCRIPTION=3D"SELinux core utilities" +HOMEPAGE=3D"http://userspace.selinuxproject.org" +SRC_URI=3D"http://userspace.selinuxproject.org/releases/20110727/devel/$= {P}.tar.gz + mirror://gentoo/policycoreutils-extra-${EXTRAS_VER}.tar.bz2 + mirror://gentoo/policycoreutils-2.0.85-python3.tar.gz" + +LICENSE=3D"GPL-2" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" + +COMMON_DEPS=3D">=3Dsys-libs/libselinux-${SELNX_VER}[python] + >=3Dsys-libs/glibc-2.4 + >=3Dsys-process/audit-1.5.1 + >=3Dsys-libs/libcap-1.10-r10 + sys-libs/pam + >=3Dsys-libs/libsemanage-${SEMNG_VER}[python] + sys-libs/libcap-ng + >=3Dsys-libs/libsepol-${SEPOL_VER} + sys-devel/gettext" + +# pax-utils for scanelf used by rlpkg +RDEPEND=3D"${COMMON_DEPS} + dev-python/sepolgen + app-misc/pax-utils" + +DEPEND=3D"${COMMON_DEPS}" + +S2=3D${WORKDIR}/policycoreutils-extra + +src_prepare() { + # rlpkg is more useful than fixfiles + sed -i -e '/^all/s/fixfiles//' "${S}/scripts/Makefile" \ + || die "fixfiles sed 1 failed" + sed -i -e '/fixfiles/d' "${S}/scripts/Makefile" \ + || die "fixfiles sed 2 failed" + # We currently do not support MCS, so the sandbox code in policycoreuti= ls + # is not usable yet. However, work for MCS is on the way and a reported + # vulnerability (bug #374897) might go by unnoticed if we ignore it now= . + # As such, we will + # - prepare support for switching name from "sandbox" to "sesandbox" + epatch "${FILESDIR}/policycoreutils-2.0.85-sesandbox.patch.gz" + # - patch the sandbox and seunshare code to fix the vulnerability + # (uses, with permission, extract from + # http://pkgs.fedoraproject.org/gitweb/?p=3Dpolicycoreutils.git;a=3Db= lob_plain;f=3Dpolicycoreutils-rhat.patch;hb=3DHEAD) + epatch "${FILESDIR}/policycoreutils-2.0.85-fix-seunshare-vuln.patch.gz" + # But for now, disable building sandbox code + sed -i -e 's/sandbox //' "${S}/Makefile" || die "failed removing sandbo= x" + # Overwrite gl.po, id.po and et.po with valid PO file + cp "${S}/po/sq.po" "${S}/po/gl.po" || die "failed to copy ${S}/po/sq.po= to gl.po" + cp "${S}/po/sq.po" "${S}/po/id.po" || die "failed to copy ${S}/po/sq.po= to id.po" + cp "${S}/po/sq.po" "${S}/po/et.po" || die "failed to copy ${S}/po/sq.po= to et.po" + # Fixed scripts for Python 3 support + cp "${WORKDIR}/seobject.py" "${S}/semanage/seobject.py" || die "failed = to copy seobject.py" + cp "${WORKDIR}/semanage" "${S}/semanage/semanage" || die "failed to cop= y semanage" + cp "${WORKDIR}/chcat" "${S}/scripts/chcat" || die "failed to copy chcat= " + cp "${WORKDIR}/audit2allow" "${S}/audit2allow/audit2allow" || die "fail= ed to copy audit2allow" +} + +src_compile() { + python_copy_sources semanage sandbox + building() { + einfo "Compiling policycoreutils" + emake -C "${S}" AUDIT_LOG_PRIVS=3D"y" CC=3D"$(tc-getCC)" PYLIBVER=3D"p= ython$(python_get_version)" || die + einfo "Compiling policycoreutils-extra" + emake -C "${S2}" AUDIT_LOG_PRIVS=3D"y" CC=3D"$(tc-getCC)" PYLIBVER=3D"= python$(python_get_version)" || die + } + python_execute_function -s --source-dir semanage building +} + +src_install() { + # Python scripts are present in many places. There are no extension mod= ules. + installation() { + einfo "Installing policycoreutils" + emake -C "${S}" DESTDIR=3D"${T}/images/${PYTHON_ABI}" AUDIT_LOG_PRIV=3D= "y" PYLIBVER=3D"python$(python_get_version)" install || return 1 + + einfo "Installing policycoreutils-extra" + emake -C "${S2}" DESTDIR=3D"${T}/images/${PYTHON_ABI}" SHLIBDIR=3D"${D= }$(get_libdir)/rc" install || return 1 + } + python_execute_function installation + python_merge_intermediate_installation_images "${T}/images" + + # remove redhat-style init script + rm -fR "${D}/etc/rc.d" + + # compatibility symlinks + dosym /sbin/setfiles /usr/sbin/setfiles + dosym /$(get_libdir)/rc/runscript_selinux.so /$(get_libdir)/rcscripts/r= unscript_selinux.so + + # location for permissive definitions + dodir /var/lib/selinux + keepdir /var/lib/selinux +} + +pkg_postinst() { + python_mod_optimize seobject.py +} + +pkg_postrm() { + python_mod_cleanup seobject.py +}