Fix bug #378943 - setools-3.3.7 fails to build with new selinux userspace utilities...
authorSven Vermeulen <swift@gentoo.org>
Fri, 19 Aug 2011 17:16:46 +0000 (17:16 +0000)
committerSven Vermeulen <swift@gentoo.org>
Fri, 19 Aug 2011 17:16:46 +0000 (17:16 +0000)
Package-Manager: portage-2.1.10.3/cvs/Linux x86_64

app-admin/setools/ChangeLog
app-admin/setools/Manifest
app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch [new file with mode: 0644]
app-admin/setools/files/fix-implicit-def-fstat.patch [new file with mode: 0644]
app-admin/setools/setools-3.3.7-r1.ebuild [new file with mode: 0644]
app-admin/zprod-manager/Manifest

index 7716c1eca9e7bc3d51f5fec345efbae23870961a..304299d72e52ec00150486b6a52aae14441ddd1a 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for app-admin/setools
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.68 2011/07/08 10:17:36 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.69 2011/08/19 17:16:46 swift Exp $
+
+*setools-3.3.7-r1 (19 Aug 2011)
+
+  19 Aug 2011; <swift@gentoo.org>
+  +files/fix-check-role_set_expand-libsepol-2.1.0.patch,
+  +setools-3.3.7-r1.ebuild, +files/fix-implicit-def-fstat.patch:
+  Fix #378943 where setools fails to build with new selinux userspace
 
   08 Jul 2011; Samuli Suominen <ssuominen@gentoo.org> setools-2.4.ebuild:
   Convert from "useq" to "use".
index 34b077b849a9087e62de30fb14eb16cdd75d0982..deaeb497c8017bfda6ab59ff257ba5540c4b52dc 100644 (file)
@@ -1,7 +1,6 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
 AUX apol_tcl_fc.c.diff 1077 RMD160 1db09fde3eb402aa9fe92c0740568bdef7b7586d SHA1 350110b8beb653b6c7b5052530de3d34ae88fc1e SHA256 3457cbba134699babd6882655cfc1957fb0768591690736c4a67c71310ac09b9
+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
 AUX setools-3.3.6-headers.diff 3278 RMD160 d42b64452e61e584bf6e391058fd06d0c74d4051 SHA1 516f50ee1a8a5084ec64fccb918b190e6efc1fa1 SHA256 97a3c02386cc77800e7fe8c69e84824802782db3c5f2903d2e4057a3fd5a552d
 DIST setools-2.4.tar.bz2 1181584 RMD160 67c77950a4138300a3da4f17ab0d51b2d482bc18 SHA1 3dd26552388180087b11884857c3f5e5c8058acf SHA256 fcd0bc7390275cce8b4c0dbf8cc3471c3ab73724b1b373d40625cc477794fc2e
 DIST setools-3.3.4.tar.bz2 1333898 RMD160 ec7020db9aff4888895020390046e18cec4e83ef SHA1 eda6b68de50bf06b302bc3ed32249e0dfa52652d SHA256 266e150fd62bf6cf01da9de8dd09c93a0ebfa5f2adac354b2d3c4c6f0509f748
@@ -12,13 +11,7 @@ EBUILD setools-2.4.ebuild 1830 RMD160 de6246765a1a2300d94596a2ee4d86f67b81008f S
 EBUILD setools-3.3.4.ebuild 1509 RMD160 060427b4101a477ee263a42954c73e2ac27ecd37 SHA1 f9c02a8b1c7172ad20b7c9649195ca2f941a116b SHA256 8e85bb7481d991f918e100c7c0951a8acfa59fde5f8ae4528218da74912c7555
 EBUILD setools-3.3.5.ebuild 1510 RMD160 808cf8ac5d3f523e78b4d51e30776012e45f74a7 SHA1 82445b3019cbe5db95307e341a7a3a0e7c7e9980 SHA256 27e08006dbcc490518745252046d8973a7ed72a99491d54847e5a0d7032fe38f
 EBUILD setools-3.3.6.ebuild 1748 RMD160 545035325f0291c1556ba490221361d55e394dbd SHA1 123d4b7740e1946dd923f81e391b43a84a29b607 SHA256 c53022203fe0c76c2961090dc589e36a8342f8c3574ffd1f90ff24da6963412e
+EBUILD setools-3.3.7-r1.ebuild 4282 RMD160 daef389cbcaa05b64840575a4365d5f1e72585c2 SHA1 ac023820e82e058251ad2c1b5b7dba2d7bab06db SHA256 e30097c945206f94d78b6096be7d627b18bc11f5ed5e9e9f1555775fff78334b
 EBUILD setools-3.3.7.ebuild 3967 RMD160 e6d1ae8966b8b6970398227e2e46b60b7d5e22dc SHA1 c071d1aae8ff2effc61945199a2356edb936be63 SHA256 8230a4fa36c1fff8c327173b1056631529a467e3b8a611217b40a61a34eb7857
-MISC ChangeLog 9198 RMD160 14e02157f183ff7a5be58d9abb9d19e83d4e50b5 SHA1 c9045b79f550e99ecc673b25fdcbb3c3df7fe1bf SHA256 b4a9e551acf07017044753d9a182e3a80caf732b404437c030150dde5d70683d
+MISC ChangeLog 9454 RMD160 ec5c10fd54aa46d9c77b1df57630977136ed2b3e SHA1 9054628e1ff03970d32c0c67001e9be549eb994a SHA256 272255ef375dc68b6ba10c37d4fa85ab7ba2b2b03d6d3d9d7397b97ecf2876c3
 MISC metadata.xml 228 RMD160 b905eec946a901453222cb4fec1ae02782fdc2c4 SHA1 385d1d3cfdb3233bd47fa645401c1fe2ca4be156 SHA256 bbcb1daec06953b214112a968d7691679891d41b620789200450e8fabf533951
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
-
-iF4EAREIAAYFAk4W2PEACgkQXkR9YqOcLPH9jgD/bGN0JqSJ83hj9myewipqKxKB
-SpenGUnl3O3xfN27SQUA/iF9xqmCaU/jQVqq+uB+DOQo1P7b3c26KeL/h9NBOd+h
-=gtoq
------END PGP SIGNATURE-----
diff --git a/app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch b/app-admin/setools/files/fix-check-role_set_expand-libsepol-2.1.0.patch
new file mode 100644 (file)
index 0000000..548f60b
--- /dev/null
@@ -0,0 +1,24 @@
+diff -ur setools-3.3.7.orig/configure.ac setools-3.3.7/configure.ac
+--- setools-3.3.7.orig/configure.ac    2011-08-12 19:20:32.651000078 +0200
++++ setools-3.3.7/configure.ac 2011-08-12 19:20:42.224000036 +0200
+@@ -503,7 +503,7 @@
+                   [AC_LANG_SOURCE([
+ #include <sepol/policydb/expand.h>
+ int main () {
+-  return role_set_expand(NULL, NULL, NULL, NULL);
++  return role_set_expand(NULL, NULL, NULL, NULL, NULL);
+ }])],
+                   sepol_new_user_role_mapping="yes",
+                   sepol_new_user_role_mapping="no")
+diff -ur setools-3.3.7.orig/libqpol/src/policy_define.c setools-3.3.7/libqpol/src/policy_define.c
+--- setools-3.3.7.orig/libqpol/src/policy_define.c     2011-08-12 19:20:32.657000013 +0200
++++ setools-3.3.7/libqpol/src/policy_define.c  2011-08-12 19:20:53.907005864 +0200
+@@ -2133,7 +2133,7 @@
+ 
+       /* This ebitmap business is just to ensure that there are not conflicting role_trans rules */
+ #ifdef HAVE_SEPOL_USER_ROLE_MAPPING
+-      if (role_set_expand(&roles, &e_roles, policydbp, NULL))
++      if (role_set_expand(&roles, &e_roles, policydbp, NULL, NULL))
+ #else
+       if (role_set_expand(&roles, &e_roles, policydbp))
+ #endif
diff --git a/app-admin/setools/files/fix-implicit-def-fstat.patch b/app-admin/setools/files/fix-implicit-def-fstat.patch
new file mode 100644 (file)
index 0000000..7276432
--- /dev/null
@@ -0,0 +1,13 @@
+diff -ur setools-3.3.7.orig/libqpol/src/policy.c setools-3.3.7/libqpol/src/policy.c
+--- setools-3.3.7.orig/libqpol/src/policy.c    2011-08-12 19:48:13.793000029 +0200
++++ setools-3.3.7/libqpol/src/policy.c 2011-08-12 19:49:32.880001229 +0200
+@@ -36,6 +36,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/mman.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
+ #include <asm/types.h>
+ 
+ #include <sepol/debug.h>
diff --git a/app-admin/setools/setools-3.3.7-r1.ebuild b/app-admin/setools/setools-3.3.7-r1.ebuild
new file mode 100644 (file)
index 0000000..7f7dcd4
--- /dev/null
@@ -0,0 +1,158 @@
+# Copyright 1999-2011 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-r1.ebuild,v 1.1 2011/08/19 17:16:46 swift Exp $
+
+EAPI="2"
+PYTHON_DEPEND="python? 2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit autotools java-pkg-opt-2 python
+
+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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X debug java python"
+
+DEPEND=">=sys-libs/libsepol-2.1.0
+       sys-libs/libselinux
+       sys-devel/bison
+       sys-devel/flex
+       >=dev-db/sqlite-3.2:3
+       dev-libs/libxml2:2
+       dev-util/pkgconfig
+       java? (
+               >=dev-lang/swig-1.3.28
+               >=virtual/jdk-1.4
+       )
+       python? ( >=dev-lang/swig-1.3.28 )
+       X? (
+               >=dev-lang/tk-8.4.9
+               >=gnome-base/libglade-2.0
+               >=x11-libs/gtk+-2.8:2
+       )"
+
+RDEPEND=">=sys-libs/libsepol-2.1.0
+       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"
+       fi
+}
+
+src_prepare() {
+       epatch "${FILESDIR}/fix-check-role_set_expand-libsepol-2.1.0.patch" || die
+       epatch "${FILESDIR}/fix-implicit-def-fstat.patch" || die
+
+       # Disable broken check for SWIG version.
+       sed -e "s/AC_PROG_SWIG(1.3.28)/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
+}
index 2a8671b2ef42e36a4bc5ac3b6232b4a2f111259a..df043329e08d09f1fd7aecb9c0ac8dc38f97f33b 100644 (file)
@@ -1,5 +1,5 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA512
 
 AUX 0.3.1/zprod-manager 8424 RMD160 02261aec98cc4fb16254f052560b7622b4a857b2 SHA1 1ab27279f8b2b8abcba2340c986f38017bc36ccf SHA256 dc4f537b2c5e0c9135ae9594572d8b3200c8c468987f9a5e27688705fe3c7d40
 AUX 0.3.2/zprod-manager 9436 RMD160 e26b6a87ce1993dd5e8c2044826e6a6e41dc3a28 SHA1 39892604587ac8a0db949fa97577705e57ff67bd SHA256 094cbb9981c13f6f2e00f061529a2acc32361a52c2588119534cff5a43ab2c0b
@@ -9,12 +9,22 @@ EBUILD zprod-manager-0.3.1.ebuild 578 RMD160 e1048b8b60d5a2b363f0bfff78b5446c054
 EBUILD zprod-manager-0.3.2-r1.ebuild 533 RMD160 b6fb81a79f07205799e5bd2f8d5471690009a1ad SHA1 07135de476041d50315bb3992b48d83914c3e6b4 SHA256 df1ce6b89cee9127b47c963ce61dd42bac565fc7baf767c9e6f9e2b9474d2130
 EBUILD zprod-manager-0.3.3.ebuild 533 RMD160 0c43888290bab828b3f47e66d53771f125665bfc SHA1 535ab2067d748f858b0d72f944fa7255a406a86e SHA256 7319192f261a32fe6f248a9e18199f4be6d5abb26a4d8735d9c0c959855788c8
 EBUILD zprod-manager-0.3.ebuild 549 RMD160 0a52d235cb922f23d6f8a46a443db0ca038971f9 SHA1 aaddbeed82ad51abccd8a2ae290ee2bff83e0819 SHA256 4e0407084fca792c2d494c7f107cb39425f3cebea99eec02013910ac3e261cbb
-MISC ChangeLog 4213 RMD160 d8c56b2c481e3c088e0843a09c94d0eb2fadfd10 SHA1 a70180cfc05c58b918d6f97c3ab9de74622eede4 SHA256 a83210604d569491941a414965bc335d85169bf5e86fdcac91ea79d08bb3ca1c
-MISC metadata.xml 240 RMD160 1c1afe5fdd0932b99fc310a60ea5e27efc2a0f2b SHA1 aa584f1fc26175d69fefee5f675b21937bf65e96 SHA256 4cc5390c2450d8e60e0dcad40cd257608f785a47e5f752bfb114a3ec32efecfe
+MISC ChangeLog 4315 RMD160 74a58faac995be247420b59e8ba163e9a37f9d02 SHA1 8137c1f2844e855de7a81520189555d64b2ce9dc SHA256 18225638f4b8a6868b734a602c2b30419eae03d3d98c2becc402bb5368fd4917
+MISC metadata.xml 169 RMD160 f09a416b4004346a79906ba07989dfba84c5ece5 SHA1 23ddd27bb897ddd2ebc7cad56becc87c17218279 SHA256 4e813ac0b12981edab0b53c189bf21cdaa77e2f88c827c820d0c76778c49b4cf
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.17 (GNU/Linux)
+Version: GnuPG v2.0.18 (GNU/Linux)
 
-iEYEARECAAYFAk25jp4ACgkQCRZPokWLroTJmwCg0xow1jrjHY2wxsq1FCJtgegb
-3Q8AoKvylJpNWnTGv341gnksPF3I/9W0
-=BNaq
+iQIcBAEBCgAGBQJOTpt0AAoJEPqDWhW0r/LC4h0P/0hEdMYnF2kPK/+mcM4I7+2U
+vRPV3RViXH1llrBF1/6I36RD64G+AbrBelUvF+RMdEoftxzJvCdkRcHXvurzY7GQ
+4Quu8dlgYcy4P8iuj5LIHONSbY04JdfN4pYFViPQFlM6n2HBjW4R7rWmHnhTBlDN
+zMDwm/I+T5clqOIMziD8kah1JX44qdQbMLDDrUNGYjNlodhNHqDlrPvQpJKuxC3W
+j1PkSfkqFK2xgpN2ZiNoWc8pn8Z1RTxygL9CyOTilHglMTTATFxmlXjVd3T6MCHa
+8+YU8DC/IFOBDIZCFNBlDPkTaZpPNd1TuzZqRfytCJIIOCb23HAPDk1lFnjWcAX7
+yaRXbvSom/D3hiXahzFprVPxCVrHTbl92rDG7qgcP2jdQJKRvJBODes7mgyDSiOi
+1VoCTMKeJOV5kyIkWbSMPmsKH/+hYOv2x+NgqC38dy97L58QrdJ92BWkA4IXJpe8
+mR/yh8OFlSeT/a5ts3DkWFPlMcl6o66+SvTe7+4QfTItm72AZnU0huGS6rOlGsjG
+Qs5Z6CyTQwU8CVvYm9v8ZPGnOnHUnvZi//nUXi7Og3QY4F9U3syC0D7XpsyKUEva
+k0JpiW925+Maom9dZpprGIemvsT8gmil9h4G1lrBlShZHCtqVfjzeCCmykf9bbho
+A13O+cgBYvjBTbLMIjMS
+=VCe+
 -----END PGP SIGNATURE-----