summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/sepolgen
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/sepolgen')
-rw-r--r--dev-python/sepolgen/Manifest3
-rw-r--r--dev-python/sepolgen/files/0030-default-path-for-tests-also-needed-bug-467264.patch12
-rw-r--r--dev-python/sepolgen/files/0040-have-test-run-with-PYTHON-variable-python-bug-467264.patch16
-rw-r--r--dev-python/sepolgen/metadata.xml9
-rw-r--r--dev-python/sepolgen/sepolgen-1.2.1-r1.ebuild74
-rw-r--r--dev-python/sepolgen/sepolgen-1.2.2.ebuild73
-rw-r--r--dev-python/sepolgen/sepolgen-9999.ebuild83
7 files changed, 270 insertions, 0 deletions
diff --git a/dev-python/sepolgen/Manifest b/dev-python/sepolgen/Manifest
new file mode 100644
index 000000000000..2d8159aed894
--- /dev/null
+++ b/dev-python/sepolgen/Manifest
@@ -0,0 +1,3 @@
+DIST patchbundle-sepolgen-1.2.1-r1.tar.gz 762 SHA256 f6c83b003df65cd2a11c689cb8a1f37e519bb706de17383fa0d9ff79e80adc11 SHA512 1eb83c118b4c6611c868213b802358c32e6863f2fc68cfed92d32f9e119de1ee9d128c3994bb1b71da1e36f1925d2fb71523498afb63cc3b5d2dd7c9290ebb8d WHIRLPOOL 37dd39a4ef28d8df3d6f2c031df556997ff836d8aa9962d69417dae2dc1ca82bd0d12d21df774231ce28b9f1ec2ecdfff710c452e69ee5de6dc0322b0b24f458
+DIST sepolgen-1.2.1.tar.gz 366214 SHA256 438c246bdc6b3cf1b12116831f4c601aaae6e93decb007dddab212a3c88781b0 SHA512 ec71126eaf6ecb18d989821753c04f3325de2188bafe161deff5733ebb95c3589e06198666f0502169cfa7d3a2b8ec509ff62098dc11b66b4f0883e1d8703a6e WHIRLPOOL efdbbb9771f68921a5fd3824267c7716ca48ab1f40395aea5c27ac4f7f3b8bf71f718da5ada40eed6c1b2de5341f3d5f10c7ad6086b5ac017d4898136ded6fe0
+DIST sepolgen-1.2.2.tar.gz 366343 SHA256 bebda8eeb2d386d26823d724ea320508a02b50828d44aff47c3f907cf54c2324 SHA512 83d56c31a87da8e271d6f436878a61f21c508ed8e26fa71f57ef109f432b10e310520c45bdb027f89a1edae12568d827ce3159bd8b6b9cf07c572b9a7225acee WHIRLPOOL 449f540caf2aa653bf2b2638ef310d2b710503744e1387119a66d3039253f537ea7ba987b0e5887e004f76485b1ae2e4a84c192a2e0e3423c9c8e61d8bb0198b
diff --git a/dev-python/sepolgen/files/0030-default-path-for-tests-also-needed-bug-467264.patch b/dev-python/sepolgen/files/0030-default-path-for-tests-also-needed-bug-467264.patch
new file mode 100644
index 000000000000..c8678604c4fd
--- /dev/null
+++ b/dev-python/sepolgen/files/0030-default-path-for-tests-also-needed-bug-467264.patch
@@ -0,0 +1,12 @@
+diff -uNr sepolgen-1.2.1.orig/src/sepolgen/defaults.py sepolgen-1.2.1/src/sepolgen/defaults.py
+--- sepolgen-1.2.1.orig/src/sepolgen/defaults.py 2013-11-04 22:24:13.620024022 +0100
++++ sepolgen-1.2.1/src/sepolgen/defaults.py 2013-11-04 22:25:05.619024133 +0100
+@@ -27,7 +27,7 @@
+ self.config = dict()
+ if not os.path.exists(pathname):
+ self.config_pathname = "(defaults)"
+- self.config["SELINUX_DEVEL_PATH"] = "/usr/share/selinux/default:/usr/share/selinux/mls:/usr/share/selinux/devel"
++ self.config["SELINUX_DEVEL_PATH"] = "/usr/share/selinux/strict/include:/usr/share/selinux/mcs/include:/usr/share/selinux/targeted/include:/usr/share/selinux/mls/include:/usr/share/selinux/default:/usr/share/selinux/mls:/usr/share/selinux/devel"
+ return
+ self.config_pathname = pathname
+ ignore = re.compile(r"^\s*(?:#.+)?$")
diff --git a/dev-python/sepolgen/files/0040-have-test-run-with-PYTHON-variable-python-bug-467264.patch b/dev-python/sepolgen/files/0040-have-test-run-with-PYTHON-variable-python-bug-467264.patch
new file mode 100644
index 000000000000..a039236bf8c9
--- /dev/null
+++ b/dev-python/sepolgen/files/0040-have-test-run-with-PYTHON-variable-python-bug-467264.patch
@@ -0,0 +1,16 @@
+diff -uNr sepolgen-1.2.1.orig/tests/Makefile sepolgen-1.2.1/tests/Makefile
+--- sepolgen-1.2.1.orig/tests/Makefile 2013-11-04 22:25:44.704024216 +0100
++++ sepolgen-1.2.1/tests/Makefile 2013-11-04 22:26:09.718024270 +0100
+@@ -1,3 +1,5 @@
++PYTHON ?= /usr/bin/python
++
+ clean:
+ rm -f *~ *.pyc
+ rm -f parser.out parsetab.py
+@@ -6,4 +8,4 @@
+ rm -f output
+
+ test:
+- python run-tests.py
+\ No newline at end of file
++ $(PYTHON) run-tests.py
diff --git a/dev-python/sepolgen/metadata.xml b/dev-python/sepolgen/metadata.xml
new file mode 100644
index 000000000000..0e4542860a13
--- /dev/null
+++ b/dev-python/sepolgen/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>selinux</herd>
+ <longdescription>Python module needed for audit2allow</longdescription>
+ <upstream>
+ <remote-id type="github">SELinuxProject/selinux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/sepolgen/sepolgen-1.2.1-r1.ebuild b/dev-python/sepolgen/sepolgen-1.2.1-r1.ebuild
new file mode 100644
index 000000000000..aced50b9f03b
--- /dev/null
+++ b/dev-python/sepolgen/sepolgen-1.2.1-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 eutils
+
+DESCRIPTION="SELinux policy generation library"
+HOMEPAGE="http://userspace.selinuxproject.org"
+SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20140506/${P}.tar.gz
+ http://dev.gentoo.org/~swift/patches/sepolgen/patchbundle-${P}-r1.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=sys-libs/libselinux-2.0[python]
+ app-admin/setools[python]
+ ${PYTHON_DEPS}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ EPATCH_MULTI_MSG="Applying sepolgen patches ... " \
+ EPATCH_SUFFIX="patch" \
+ EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
+ EPATCH_FORCE="yes" \
+ epatch
+
+ epatch_user
+
+ python_copy_sources
+}
+
+src_compile() {
+ :
+}
+
+src_test() {
+ if has_version sec-policy/selinux-base-policy; then
+ invoke_sepolgen_test() {
+ emake test
+ }
+ python_foreach_impl invoke_sepolgen_test
+ else
+ ewarn "Sepolgen requires sec-policy/selinux-base-policy to run tests."
+ fi
+}
+
+src_install() {
+ installation() {
+ emake DESTDIR="${D}" PYTHONLIBDIR="$(python_get_sitedir)" install
+ python_optimize
+ }
+ python_foreach_impl installation
+
+ # Create sepolgen.conf with different devel location definition
+ if [[ -f /etc/selinux/config ]];
+ then
+ local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ local selinuxtype="${POLICY_TYPES%% *}";
+ if [[ -n "${selinuxtype}" ]];
+ then
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
+ fi
+ fi
+}
diff --git a/dev-python/sepolgen/sepolgen-1.2.2.ebuild b/dev-python/sepolgen/sepolgen-1.2.2.ebuild
new file mode 100644
index 000000000000..9484ac359e6c
--- /dev/null
+++ b/dev-python/sepolgen/sepolgen-1.2.2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1 eutils
+
+MY_P="${P//_/-}"
+
+DESCRIPTION="SELinux policy generation library"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=sys-libs/libselinux-2.0[python]
+ app-admin/setools[python]
+ ${PYTHON_DEPS}"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}/0030-default-path-for-tests-also-needed-bug-467264.patch"
+
+ epatch_user
+
+ python_copy_sources
+}
+
+src_compile() {
+ :
+}
+
+src_test() {
+ if has_version sec-policy/selinux-base-policy; then
+ invoke_sepolgen_test() {
+ emake test
+ }
+ python_foreach_impl invoke_sepolgen_test
+ else
+ ewarn "Sepolgen requires sec-policy/selinux-base-policy to run tests."
+ fi
+}
+
+src_install() {
+ installation() {
+ emake DESTDIR="${D}" PYTHONLIBDIR="$(python_get_sitedir)" install
+ python_optimize
+ }
+ python_foreach_impl installation
+
+ # Create sepolgen.conf with different devel location definition
+ if [[ -f /etc/selinux/config ]];
+ then
+ local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ local selinuxtype="${POLICY_TYPES%% *}";
+ if [[ -n "${selinuxtype}" ]];
+ then
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
+ fi
+ fi
+}
diff --git a/dev-python/sepolgen/sepolgen-9999.ebuild b/dev-python/sepolgen/sepolgen-9999.ebuild
new file mode 100644
index 000000000000..549d87598e20
--- /dev/null
+++ b/dev-python/sepolgen/sepolgen-9999.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit python-r1 eutils
+
+MY_P="${P//_/-}"
+MY_RELEASEDATE="20150202"
+
+DESCRIPTION="SELinux policy generation library"
+HOMEPAGE="https://github.com/SELinuxProject/selinux/wiki"
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/SELinuxProject/selinux.git"
+ S="${WORKDIR}/${MY_P}/${PN}"
+else
+ SRC_URI="https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20150202/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_P}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=sys-libs/libselinux-2.0[python]
+ app-admin/setools[python(+)]
+ ${PYTHON_DEPS}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ if [[ ${PV} != 9999 ]] ; then
+ # If needed for live ebuilds please use /etc/portage/patches
+ epatch "${FILESDIR}/0030-default-path-for-tests-also-needed-bug-467264.patch"
+ fi
+
+ epatch_user
+
+ python_copy_sources
+}
+
+src_compile() {
+ :
+}
+
+src_test() {
+ if has_version sec-policy/selinux-base-policy; then
+ invoke_sepolgen_test() {
+ emake test
+ }
+ python_foreach_impl invoke_sepolgen_test
+ else
+ ewarn "Sepolgen requires sec-policy/selinux-base-policy to run tests."
+ fi
+}
+
+src_install() {
+ installation() {
+ emake DESTDIR="${D}" PYTHONLIBDIR="$(python_get_sitedir)" install
+ python_optimize
+ }
+ python_foreach_impl installation
+
+ # Create sepolgen.conf with different devel location definition
+ if [[ -f /etc/selinux/config ]];
+ then
+ local selinuxtype=$(awk -F'=' '/^SELINUXTYPE/ {print $2}' /etc/selinux/config);
+ mkdir -p "${D}"/etc/selinux || die "Failed to create selinux directory";
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ local selinuxtype="${POLICY_TYPES%% *}";
+ if [[ -n "${selinuxtype}" ]];
+ then
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/${selinuxtype}/include:/usr/share/selinux/${selinuxtype}" > "${D}"/etc/selinux/sepolgen.conf;
+ else
+ echo "SELINUX_DEVEL_PATH=/usr/share/selinux/strict/include:/usr/share/selinux/strict" > "${D}"/etc/selinux/sepolgen.conf;
+ fi
+ fi
+}