summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Vermeulen <swift@gentoo.org>2012-06-25 20:07:09 +0000
committerSven Vermeulen <swift@gentoo.org>2012-06-25 20:07:09 +0000
commit5f4d8fa8045d025c07d62d9a71fce29a6e97e334 (patch)
tree93558af7659336b6ece91af13be20c1105d5c5bc
parentFix python 3 support, needed for bugs #408179 and #415091 (diff)
downloadhistorical-5f4d8fa8045d025c07d62d9a71fce29a6e97e334.tar.gz
historical-5f4d8fa8045d025c07d62d9a71fce29a6e97e334.tar.bz2
historical-5f4d8fa8045d025c07d62d9a71fce29a6e97e334.zip
Fix python 3 and audit2allow support, needed for bugs #408179 and #415091
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
-rw-r--r--app-admin/setools/ChangeLog7
-rw-r--r--app-admin/setools/Manifest25
-rw-r--r--app-admin/setools/setools-3.3.7-r3.ebuild169
3 files changed, 179 insertions, 22 deletions
diff --git a/app-admin/setools/ChangeLog b/app-admin/setools/ChangeLog
index 377e357a7676..0deb1153450e 100644
--- a/app-admin/setools/ChangeLog
+++ b/app-admin/setools/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-admin/setools
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.74 2012/05/21 23:21:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.75 2012/06/25 20:07:09 swift Exp $
+
+*setools-3.3.7-r3 (25 Jun 2012)
+
+ 25 Jun 2012; <swift@gentoo.org> +setools-3.3.7-r3.ebuild:
+ Support Python3, fix audit2allow support, bug #415091 and bug #408179
21 May 2012; Mike Frysinger <vapier@gentoo.org> setools-3.3.7-r1.ebuild:
Inherit eutils for epatch.
diff --git a/app-admin/setools/Manifest b/app-admin/setools/Manifest
index 24cad301794f..5655d69ee492 100644
--- a/app-admin/setools/Manifest
+++ b/app-admin/setools/Manifest
@@ -1,26 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX fix-check-role_set_expand-libsepol-2.1.0.patch 1150 RMD160 6fec7f3fa1c9db1010cd760c56e458025e33ba60 SHA1 df5111346358adfa44990c96cb2f28eee8dc6169 SHA256 8b9bcb857a77ae446721a4c7387493d74500bced0c6e2fc967c991a488122b3f
AUX fix-implicit-def-fstat.patch 441 RMD160 acf643ff2dab2d96bef4b6fd0352a6df28aebf3e SHA1 a501b6b64bd6adb74e5dfa76a4c2354822d3243d SHA256 3d0c55580056353ab3ca575899fb8f669d0b7a3f00f62dedf3a643a7e0ea8a9b
+DIST setools-3.3.7-01-fedora-patches.tar.gz 29858 RMD160 375ab652f2505151978bbd50936133be869c61e2 SHA1 8233dd8582a5592a6af3da07cd2279cef46f211f SHA256 a36470e934f4b9bd8c61e8a25d286a4faf852b261dc3b3d55bb547f54efb6cea
+DIST setools-3.3.7-03-gentoo-patches.tar.gz 5889 RMD160 27e79122166542af9b697855464e0dfa1f557168 SHA1 9d00dc2d0acf2464039d2bc0c48d9c698d4a5083 SHA256 bcca7a53655a351915771577f802d3af60791c39da94cc819d3ccef49ae552d1
DIST setools-3.3.7.tar.bz2 940657 RMD160 0bc31e2a8a712d8b062e44a569814ddcee492bb8 SHA1 5117f4ffb7eb34dcb08760fae89c6d5a5d3bfd3b SHA256 2bfa0918746bdcc910b16b26a51109a4ffd07404c306141ada584cb36e3c895a
EBUILD setools-3.3.7-r1.ebuild 4287 RMD160 31e74b96ab366086a1ad1f53bab0a75ec0366379 SHA1 4df7e3e95354e6e64f8bebdad44a14233ea803e5 SHA256 d7fd80e34fdeb56deb5a5ff69532e4c0a4ac2e5a6be986a68cba153ecf4a8251
-MISC ChangeLog 10086 RMD160 6e0991da8e79b97c6daef13c62df4be286c7fa4e SHA1 3218e486e8b6d6f785c3a854ccc4286ea12e0c9f SHA256 7774a5b24b496c85fd65525546b7f4c9f6151b0143e22319c852460347820086
+EBUILD setools-3.3.7-r3.ebuild 4632 RMD160 88a643cc3acfa29ba20c4758fbf17962e50cf416 SHA1 f8b0b3b965aff841b45784fe65543e9057b34756 SHA256 49792cb048c33b6e97218a62ee1e5e942e98c6c0fbf7ec8d98ec68e30ecd4ee4
+MISC ChangeLog 10251 RMD160 a64bc065d4741e4d3e32c847ea8b961b80f0c0e7 SHA1 fa46c0c6dc26cf6dda4c1cc994db2f861132d590 SHA256 17f5d36478fe56bd0e90d0c895c761aa951455855fbdbcd826471f328019d960
MISC metadata.xml 228 RMD160 b905eec946a901453222cb4fec1ae02782fdc2c4 SHA1 385d1d3cfdb3233bd47fa645401c1fe2ca4be156 SHA256 bbcb1daec06953b214112a968d7691679891d41b620789200450e8fabf533951
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
-
-iQIcBAEBAgAGBQJPus5HAAoJELEHsLL7fEFWg8YP/1Jaf1mHlHncu76NCzQzEZD+
-zvAxpXvN+RyrX3DPLFbt05PETHsA4ulch7LhtAbsbtFJ4J2kc8NmV5dpfzC5pcjx
-Z1W00QQYd2DgZjm2S2nvBl8lROYErROgxClpOu3p6BfHjEnlPOPfWyQEMF83qUgu
-n3VQCH7YaVqXm8LuPCChkMWJFzpz4Ts2TkNWenBzUeF7FgQYQUm0o5sH1ExKkbpn
-0Xmp6RyeSqpj67QYTtGGDapQc5rul5uB7v79Oz/n7WKF7UkQ75z9eVD0yAj2A+kk
-iqS8Dxm5YoaUAiGp6CZHfYlzVm23U/e9UUaNNaLAi9sA2YrBexw5vNuCmywBJuO/
-idrKqzSXpVSrI9+JHi3zS9ZoZRzSmLrrkTG2Zzv2+jFHKgJVTv93dVUuyfovkg+Z
-Iq7xGCv7OugpSnA8NO+BoXJRNnV7l121batCjogN4xBL5a0zu1YBwrOVsN412TfB
-Ha729atyR2CDanEETKuveEfhsYhl9N9GS+jxxczexWQpfUhZJpAGSDh64EMQPIl6
-7ziKfB8iO9Jv1embAPYXk1XSPL4g77qlMmqZomrGT+/dJQbDPbA1pRzrNSeH76wt
-FIfXPNB1tCdLfVOBtdRhlvMSsAC68cHv6h0stQhkO7RmQt3YDutqO0VJUVCJKIxV
-RxpIchxBTESHF+BAuQOe
-=F0qP
------END PGP SIGNATURE-----
diff --git a/app-admin/setools/setools-3.3.7-r3.ebuild b/app-admin/setools/setools-3.3.7-r3.ebuild
new file mode 100644
index 000000000000..cba2191bb906
--- /dev/null
+++ b/app-admin/setools/setools-3.3.7-r3.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/setools-3.3.7-r3.ebuild,v 1.1 2012/06/25 20:07:09 swift Exp $
+
+EAPI="2"
+PYTHON_DEPEND="python? *"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython"
+
+inherit autotools java-pkg-opt-2 python eutils
+
+DESCRIPTION="SELinux policy tools"
+HOMEPAGE="http://www.tresys.com/selinux/selinux_policy_tools.shtml"
+SRC_URI="http://oss.tresys.com/projects/setools/chrome/site/dists/${P}/${P}.tar.bz2
+ http://dev.gentoo.org/~swift/patches/setools/${P}-01-fedora-patches.tar.gz
+ http://dev.gentoo.org/~swift/patches/setools/${P}-03-gentoo-patches.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X debug java python"
+
+DEPEND=">=sys-libs/libsepol-2.1.4
+ sys-libs/libselinux
+ sys-devel/bison
+ sys-devel/flex
+ >=dev-db/sqlite-3.2:3
+ dev-libs/libxml2:2
+ virtual/pkgconfig
+ java? (
+ >=dev-lang/swig-2.0.4
+ >=virtual/jdk-1.4
+ )
+ python? ( >=dev-lang/swig-2.0.4 )
+ X? (
+ >=dev-lang/tk-8.4.9
+ >=gnome-base/libglade-2.0
+ >=x11-libs/gtk+-2.8:2
+ )"
+
+RDEPEND=">=sys-libs/libsepol-2.1.4
+ sys-libs/libselinux
+ >=dev-db/sqlite-3.2:3
+ dev-libs/libxml2:2
+ java? ( >=virtual/jre-1.4 )
+ X? (
+ >=dev-lang/tk-8.4.9
+ >=dev-tcltk/bwidget-1.8
+ >=gnome-base/libglade-2.0
+ >=x11-libs/gtk+-2.8:2
+ )"
+
+RESTRICT="test"
+
+pkg_setup() {
+ if use java; then
+ java-pkg-opt-2_pkg_setup
+ fi
+
+ if use python; then
+ python_pkg_setup
+ PYTHON_DIRS="libapol/swig/python libpoldiff/swig/python libqpol/swig/python libseaudit/swig/python libsefs/swig/python python"
+ fi
+}
+
+src_prepare() {
+ EPATCH_MULTI_MSG="Applying various (Fedora-provided) setools fixes... " \
+ EPATCH_SUFFIX="patch" \
+ EPATCH_SOURCE="${WORKDIR}" \
+ EPATCH_FORCE="yes" \
+ epatch
+
+ EPATCH_MULTI_MSG="Applying various (Gentoo) setool fixes... " \
+ EPATCH_SUFFIX="patch" \
+ EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \
+ EPATCH_FORCE="yes" \
+ epatch
+
+ # Disable broken check for SWIG version.
+ sed -e "s/AC_PROG_SWIG(2.0.0)/AC_PROG_SWIG/" -i configure.ac || die "sed failed"
+ # Fix build failure due to double __init__.py installation
+ sed -e "s/^wrappedpy_DATA = qpol.py \$(pkgpython_PYTHON)/wrappedpy_DATA = qpol.py/" -i libqpol/swig/python/Makefile.am || die
+
+ local dir
+ for dir in ${PYTHON_DIRS}; do
+ # Python bindings are built/installed manually.
+ sed -e "s/MAYBE_PYSWIG = python/MAYBE_PYSWIG =/" -i ${dir%python}Makefile.am || die "sed failed"
+ # Make PYTHON_LDFLAGS replaceable during running `make`.
+ sed -e "/^AM_LDFLAGS =/s/@PYTHON_LDFLAGS@/\$(PYTHON_LDFLAGS)/" -i ${dir}/Makefile.am || die "sed failed"
+ done
+
+ eautoreconf
+
+ # Disable byte-compilation of Python modules.
+ echo '#!/bin/sh' > py-compile
+}
+
+src_configure() {
+ econf \
+ --with-java-prefix=${JAVA_HOME} \
+ --disable-selinux-check \
+ --disable-bwidget-check \
+ $(use_enable python swig-python) \
+ $(use_enable java swig-java) \
+ $(use_enable X swig-tcl) \
+ $(use_enable X gui) \
+ $(use_enable debug)
+
+ # work around swig c99 issues. it does not require
+ # c99 anyway.
+ sed -i -e 's/-std=gnu99//' "${S}/libseaudit/swig/python/Makefile"
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ local dir
+ for dir in ${PYTHON_DIRS}; do
+ python_copy_sources ${dir}
+ building() {
+ emake \
+ SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \
+ PYTHON_LDFLAGS="$(python_get_library -l)" \
+ pyexecdir="$(python_get_sitedir)" \
+ pythondir="$(python_get_sitedir)"
+ }
+ python_execute_function \
+ --action-message "Building of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version)" \
+ --failure-message "Building of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version) failed" \
+ -s --source-dir ${dir} \
+ building
+ done
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use python; then
+ local dir
+ for dir in ${PYTHON_DIRS}; do
+ installation() {
+ emake \
+ DESTDIR="${D}" \
+ pyexecdir="$(python_get_sitedir)" \
+ pythondir="$(python_get_sitedir)" \
+ install
+ }
+ python_execute_function \
+ --action-message "Installation of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version)" \
+ --failure-message "Installation of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version) failed" \
+ -s --source-dir ${dir} \
+ installation
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use python; then
+ python_mod_optimize setools
+ fi
+}
+
+pkg_postrm() {
+ if use python; then
+ python_mod_cleanup setools
+ fi
+}