Package Details: setools 3.3.8-5

Package Base: setools
Description: Policy analysis tools for SELinux
Upstream URL: http://oss.tresys.com/projects/setools/
Category: system
Licenses: GPL, LGPL
Groups: selinux
Conflicts: selinux-setools
Provides: selinux-setools=3.3.8-5
Submitter: Siosm
Maintainer: IooNag
Last Packager: IooNag
Votes: 8
First Submitted: 2013-11-03 20:05
Last Updated: 2015-02-22 13:11

Dependencies (17)

Required by (1)

Sources

  • 0001-Remove-deprecated-use-of-g_cond_timed_wait-which-pre.patch
  • 0002-Fix-changelog-entry.patch
  • 0003-setools-APOL-Add-constraints-and-filename-transition.patch
  • 0004-setools-APOL-Add-support-for-permissive-types-polcap.patch
  • 0005-setools-APOL-Add-type-user-role-bounds-support.patch
  • 0006-setools-APOL-Add-default_objects-and-CIL-policy-name.patch
  • 0007-setools-Update-to-load-v29-policy-source-files.patch
  • 0008-Change-file-name-type_transition-class-member-functi.patch
  • 0009-Switching-svn-references-to-git.patch
  • 0010-Add-get_object_class-function-for-role-transition-ru.patch
  • 0011-Fix-missing-parentheses-in-policy_define.c.patch
  • 0012-Make-the-SWIG-files-compatible-with-SWIG-3.patch
  • 0013-Update-for-2015-02-02-Userspace-release-2.4.patch
  • https://raw.githubusercontent.com/wiki/TresysTechnology/setools3/files/dists/setools-3.3.8/setools-3.3.8.tar.bz2

Latest Comments

Comment by IooNag

2015-02-09 05:14

It's not a SWIG bug but an error in the patch. I reworked it and submitted upstream (https://github.com/TresysTechnology/setools3/pull/2). I'm waiting for upstream review/feedback before including the patch to the package, alongside with what's needed to support libsepol 2.4 (https://github.com/TresysTechnology/setools/commit/3937946900cf4f8bee2fdda697831b14ab8f849d).

Comment by fmorris

2015-01-20 18:35

Ok, I managed to install the package removing the extra % from the Gentoo patch. Thanks! Should I still report the bug to SWIG?

Comment by IooNag

2015-01-19 04:21

In fact, Gentoo no longer uses the patch but forces swig 1 to be installed (https://bugs.gentoo.org/show_bug.cgi?id=430262#c10 and http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-admin/setools/setools-3.3.8-r5.ebuild?view=markup ). As there are some backward-compatibility issues and I don't want to spend much time on it alone, I may update the package to use "swig1" or "swig2" AUR package if this works.

Comment by IooNag

2015-01-19 03:21

Ok, I found what caused the issue. The Gentoo patch contains:
+%rename(seaudit_avc_message_get_message_type) %seaudit_avc_message_wrap_get_message_type;
... the second percent sign is invalid. Without it, this line works fine:
+%rename(seaudit_avc_message_get_message_type) seaudit_avc_message_wrap_get_message_type;
I'm going to report this bug against the Gentoo package (we are using Gentoo patch because upstream only support SWIG 2).

Comment by IooNag

2015-01-19 02:54

I can reproduce your issue but I think it is a bug in SWIG, as I can build setools with swig 3.0.3-1. For a "quick & dirty fix", you can build an older version of SWIG by using this PKGBUILD: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/swig&id=c7b7029adf16fdc65bf336e8a119e928af5d997f

The Github issue you indicated tracks an other issue, with message "Assertion failed: (b->refcount > 0), function DohDelete, file DOH/base.c, line 42.", not "swig: DOH/base.c:36: DohDelete: Assertion `0' failed.". A quick look at the code (https://github.com/swig/swig/blob/rel-3.0.4/Source/DOH/base.c#L25 ) shows that a debug build of SWIG (with SWIG_DEBUG_DELETE) can show more verbose messages.

Could you please use a debug build of SWIG and report the messages you get to SWIG bugtracker?

Comment by fmorris

2015-01-18 15:29

Building version 3.3.8-4 of the package fails with swig 3.0.4.

swig: DOH/base.c:36: DohDelete: Assertion `0' failed.
Makefile:688: recipe for target 'seaudit_wrap.c' failed
make[4]: *** [seaudit_wrap.c] Aborted (core dumped)

The swig error seems to be related to this issue
https://github.com/swig/swig/issues/280
which seems to have been fixed back on 2014-12-18... latest swig AUR build is 2015-01-15 so it should contain the fix?

Comment by grondinm

2015-01-02 19:10

That does the trick. Thank you for the quick fixes

Comment by IooNag

2015-01-02 10:40

I added "--sbindir=/usr/bin" to configure parameters. This should solve your issue. Thanks for your bug report.

Comment by grondinm

2015-01-01 19:28

this one failing as well

error: failed to commit transaction (conflicting files)
setools: /usr/sbin exists in filesystem
Errors occurred, no packages were upgraded.

Comment by Siosm

2014-01-02 21:49

Renamed to setools

Comment by skorgon

2013-09-27 05:32

Picking up the patch looNag points to in a modificated PKGBUILD as schown below, the package compiles w/o the downgrade of swig. Somebody might find it useful:

--- PKGBUILD.orig 2013-07-20 10:21:09.000000000 -0700
+++ PKGBUILD.new 2013-09-26 22:26:40.497646177 -0700
@@ -14,9 +14,9 @@
optdepends=('glib2: needed to build graphical tools'
'gtk2>=2.8: needed to build graphical tools'
'bwidget>=1.8: needed to build graphical tools')
-makedepends=('swig=2.0.4' 'python' 'java-environment' 'pkgconfig' 'autoconf>=2.60')
-source=("http://oss.tresys.com/projects/${_origname}/chrome/site/dists/${_origname}-${pkgver}/${_origname}-${pkgver}.tar.bz2")
-sha256sums=('44387ecc9a231ec536a937783440cd8960a72c51f14bffc1604b7525e341e999')
+makedepends=('python' 'java-environment' 'pkgconfig' 'autoconf>=2.60')
+source=("http://oss.tresys.com/projects/${_origname}/chrome/site/dists/${_origname}-${pkgver}/${_origname}-${pkgver}.tar.bz2" "http://dev.gentoo.org/~swift/patches/0008-fix_swig_build_failures_bug_430262.patch")
+sha256sums=('44387ecc9a231ec536a937783440cd8960a72c51f14bffc1604b7525e341e999' '2f314f9236bf4c5137e1e5b1dd5bc312c4ce84942238b98725468e75096eae8f')

build() {
cd "${srcdir}/${_origname}-${pkgver}"
@@ -24,8 +24,10 @@
# Python 2 fix
export PYTHON=/usr/bin/python2

+ # apply patch
+ patch -Np1 -i ../0008-fix_swig_build_failures_bug_430262.patch
+
# Fix expected version of SWIG
- sed -i -e "s|AC_PROG_SWIG(1.3.28)|AC_PROG_SWIG(2.0.0)|g" configure.ac
aclocal
autoreconf -if
automake

Comment by xangelux

2013-09-22 20:00

lol, sorry, didn't read the patch posted by looNag

Comment by xangelux

2013-09-22 19:59

Found a patch, was made for version 3.3.7 but lets me build 3.3.8
http://dev.gentoo.org/~swift/patches/0008-fix_swig_build_failures_bug_430262.patch

Add the file to the sources array, add the sha256 (2f314f9236bf4c5137e1e5b1dd5bc312c4ce84942238b98725468e75096eae8f)

and put patch -p1 < "${srcdir}/0008-fix_swig_build_failures_bug_430262.patch" after changing dir

Comment by Nicky726

2013-09-22 14:39

Hi, guys, thank you for the feedback. Unfortunately, I am very busy recently, so I am afraid, I won't be able to do anything about the SELinux packages soon. If there happens to be someone willing with more time though, I could shift the maintenance of SELinux packages onto his shoulders. I could provide him with some helper scripts and local git repos which make following the Arch changes easier. Just send me a mail.

Comment by genghizkhan91

2013-09-22 13:03

Yeah. The only other option is to downgrade the swig package (as mentioned in the wiki, I think), and doing that isn't possible with the Arch Rollback Machine offline.

Comment by IooNag

2013-09-22 12:54

selinux-setools fails to build with lastest swig package (2.0.11-1) but with Gentoo patch from http://www.spinics.net/lists/selinux/msg12952.html (http://dev.gentoo.org/~swift/patches/0008-fix_swig_build_failures_bug_430262.patch) the build is fine. Could you add this patch and update swig version in the build dependencies?

Comment by farmerdave

2013-08-18 03:13

Does this actually depend on selinux-refpolicy-src? Because according to all the current PKGBUILDs
selinux-usr-policycoreutils depends on selinux-setools
selinux-setools depends on selinux-refpolicy-src
and
selinux-refpolicy-src depends on selinux-usr-policycoreutils.

This does successfully build without specifying "depends=('selinux-refpolicy-src')

Comment by Draadmachine

2013-07-24 17:22

If you try to install selinux-setools via Yaourt it goes in regression because the packages are dependencies of each other. A possible fix is to remove the dependency selinux-usr-policycoreutils>=2.1.10 from the PKGBUILD of this package.

Comment by Nicky726

2013-07-20 17:21

So I finally got to update this...

Comment by hi117

2013-06-10 19:07

apol requires bwidget to run.

Anonymous comment

2013-04-28 00:07

Also, for those trying to compile: you must downgrade SWIG to 2.0.4-3. The latest versions of SWIG end up causing the selinux-setools compile to eat itself.

Comment by Nicky726

2013-04-20 19:22

Thank you for your feedback. I'll try to incorporate it into the PKGBUILD, but unfortunately, I am very busy lately.

Anonymous comment

2013-04-20 17:41

The makefile for libqpol is looking for SWIGTYPE_p_int.java but the file doesn't exist. It's referenced on line 442 of the libqpol/swig/java/Makefile.

Comment by Nicky726

2013-02-23 16:04

I can't get over qpol_wrap.c build error. Both with 3.3.7 and 3.3.8. Fedora doesn't fix it in any of its patches in current version, so I guess it may be due to something being newer in Arch.

Comment by Nicky726

2013-02-11 19:51

Yes, this will need some work, it is on my TODO list...

Comment by xangelux

2013-02-11 06:00

Can't build it, as the other user says needs a bunch of things to build, does it need an update?

Comment by Siosm

2012-05-06 09:47

-optdepends=('glib2:needed to build graphical tools'
-'gtk2>=2.8:needed to build graphical tools'
-'bwidget>=1.8:needed to build graphical tools')
+optdepends=('glib2: needed to build graphical tools'
+'gtk2>=2.8: needed to build graphical tools'
+'bwidget>=1.8: needed to build graphical tools')

Comment by Nicky726

2011-12-14 13:25

Thanx, addopted your changes now builds fine.

Comment by chenxiaolong

2011-12-12 06:48

Nevermind. It seems that running 'autoreconf -vfi' is required before the patches will work. Here's my fixed PKGBUILD with the patches from the links below: http://pastie.org/3003770

Comment by chenxiaolong

2011-12-12 05:44

I can't seem to get patch '0006-Changes-to-support-named-file_trans-rules.patch' to work though :(

Comment by chenxiaolong

2011-12-12 05:38

Link to source RPM: http://koji.fedoraproject.org/koji/buildinfo?buildID=273744

Comment by chenxiaolong

2011-12-12 05:37

@Nicky726: Could you add the patches from the Fedora source RPM? http://koji.fedoraproject.org/koji/rpminfo?rpmID=2789748

That should fix the incompatibility issue.

Anonymous comment

2011-11-28 19:04

sys: arch 3.1.2 x86_64. as advised: downloaded selinux all 20111128, tar, makepkg -s
all selinux packages installed except sysvinit (and setools)
same error as ajes 20111015

Comment by ajes

2011-10-15 17:14

checking for corrected libsepol boolean expand behavior... configure: error: this version of libsepol is incompatible with SETools
==> ERROR: A failure occurred in build().

Anonymous comment

2011-01-29 14:27

Same issue for me, which I fixed by reverting to --with-java-prefix=/usr/lib/jvm/java-6-openjdk.

I suspect because java was installed as a dependency during install, JAVA_HOME didn't have a sane value.

Comment by Nicky726

2011-01-20 09:58

Builds fine with me (openjdk6). Please be more specific about your issue.

Comment by Yaro

2011-01-20 04:13

It doesn't build with --with-java-prefix="$JAVA_HOME" for me.

Comment by Nicky726

2010-08-20 09:36

Now builds with SWIG 2.0.0

Comment by Nicky726

2010-07-10 16:47

Moved back to dependencies.

Comment by coolkehon

2010-07-10 14:06

Will not finish configure without:
tcl
tk
libglade >= 2.6.4-1

Comment by Nicky726

2010-05-23 21:23

Updated to 3.3.7, changes in PKGBUILD:
autoconf now needed as builddep;
dependencies for GUI tools moved to optdep;
--disable-bwidget-check flag used by default.
This should build ok at noGUI machine, though I didn't tested, as I have none.

Comment by Nicky726

2010-04-22 14:41

Thanx, I changed the java-prefix stuff, and will look to other some other day. Btw. there is is still gtk2 as dependency, so does disabling bwidget help?

Anonymous comment

2010-04-22 13:29

I had to edit PKGBUILD so that ./configure is run with the argument

--with-java-prefix="$JAVA_HOME"

instead of

--with-java-prefix=/usr/lib/jvm/java-6-openjdk

Also, it might be wise to use the --disable-bwidget-check flag by default. I imagine a lot of people would be installing SELinux in a nongraphical environment. Maybe the bwidget package could be put as an optional dependency.