Created attachment 397656 [details, diff] possible fix for setools' configure.ac libselinux fails building with the following error: error: /usr/lib/libsepol.a: No such file or directory The issue here is in the ebuild. When building pywrap and rubywrap, LIBDIR and SHLIBDIR needs to be set... So just adding: LIBDIR="\$(PREFIX)/$(get_libdir)" \ SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \ to the emake call of both pywrap and rubywrap fixes this. ----------------------- setools fails building with the following errors: skipping incompatible /usr/lib64/libselinux.so when searching for -lselinux ...etcetera... The problem with setools is a bit more complicated. It's configure.ac script makes certain invalid assumptions. 'with-sepol-devel' and 'with-selinux-devel' are supposed to select where libsepol and libselinux includes and libraries are located. The script assumes that the libraries it can use will be located in either lib64/ or lib/ inside those directories. One way to fix this is applying the attached patch, and then fixing the ebuild by passing the following parameters to econf: --with-sepol-devel="/usr/$(get_libdir)/.." \ --with-selinux-devel="/usr/$(get_libdir)/.." \
checkpolicy also fails building with: error: /usr/lib/libsepol.a: No such file or directory To fix, it's ebuild needs to be modified so that LIBDIR is specified when calling the makefile. Like this: emake CC="$(tc-getCC)" YACC="bison -y" LIBDIR="/usr/$(get_libdir)"
Same as above for policycoreutils, it needs LIBDIR set: emake -C "${BUILD_DIR}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="${EPYTHON}" LIBDIR="/usr/$(get_libdir)" || die
I committed updates to the ebuilds of the following packages. I did took the freedom to use \$(PREFIX)/$(get_libdir) where possible. I hope that is okay. sys-libs/libselinux-2.4 sys-apps/policycoreutils-2.4 sys-apps/checkpolicy-2.4 I have not touched setools on this matter yet though.
The regular userspace (2.4) is stable. app-admin/setools is not taken up yet, I'm not sure if this will considering that development on setools-3 is moved to a maintenance mode by tresys (upstream) and effort is focusing on setools-4. Anyway, updating title to reflect setools scope only for now.
setoos4 is stable in the tree now and is a complete re-write so this is obsolete now.