Go to file
Nicolas Iooss 07629c0a9f
libselinux,libsemanage: Replace PYSITEDIR with PYTHONLIBDIR
libselinux and libsemanage Makefiles invoke site.getsitepackages() in
order to get the path to the directory /usr/lib/pythonX.Y/site-packages
that matches the Python interpreter chosen with $(PYTHON). This method
is incompatible with Python virtual environments, as described in
https://github.com/pypa/virtualenv/issues/355#issuecomment-10250452 .
This issue has been opened for more than 5 years.

On the contrary python/semanage/ and python/sepolgen/ Makefiles use
distutils.sysconfig.get_python_lib() in order to get the site-packages
path into a variable named PYTHONLIBDIR. This way of computing
PYTHONLIBDIR is compatible with virtual environments and gives the same
result as PYSITEDIR.

As PYTHONLIBDIR works in more cases than PYSITEDIR, make libselinux and
libsemanage Makefiles use it. And as native code is installed (as part
of the SWIG wrapper), use "plat_specific=1" in order to use /usr/lib64
on systems which distinguish /usr/lib64 from /usr/lib.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
Acked-by: Petr Lautrbach <plautrba@redhat.com>
2018-03-17 09:03:33 +01:00
checkpolicy checkpolicy: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:37 +01:00
dbus dbus: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 20:02:03 +01:00
gui gui/fcontextPage: Set default object class in addDialog 2018-03-01 09:42:18 -05:00
libselinux libselinux,libsemanage: Replace PYSITEDIR with PYTHONLIBDIR 2018-03-17 09:03:33 +01:00
libsemanage libselinux,libsemanage: Replace PYSITEDIR with PYTHONLIBDIR 2018-03-17 09:03:33 +01:00
libsepol libsepol: Export sepol_polcap_getnum/name functions 2018-03-15 13:52:55 -07:00
mcstrans mcstrans: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:38 +01:00
policycoreutils policycoreutils: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 20:02:01 +01:00
python python/sepolgen: fix typo in PolicyGenerator 2018-03-08 14:56:19 -05:00
restorecond restorecond: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 20:02:02 +01:00
sandbox sandbox: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 20:02:02 +01:00
scripts
secilc secilc: Fix documentation build for OS X systems 2018-02-26 09:55:27 -05:00
semodule-utils semodule-utils/semodule_package: fix semodule_unpackage man page 2018-02-26 09:52:02 -05:00
.gitignore
.travis.yml libselinux,libsemanage: Replace PYSITEDIR with PYTHONLIBDIR 2018-03-17 09:03:33 +01:00
CleanSpec.mk
Makefile build: setup buildpaths if DESTDIR is specified 2018-02-14 20:02:03 +01:00
README libsepol: build: follow standard semantics for DESTDIR and PREFIX 2018-02-14 15:59:36 +01:00

README

Please submit all bug reports and patches to selinux@tycho.nsa.gov.
Subscribe via selinux-join@tycho.nsa.gov.

Build dependencies on Fedora:
yum install audit-libs-devel bison bzip2-devel dbus-devel dbus-glib-devel flex flex-devel flex-static glib2-devel libcap-devel libcap-ng-devel pam-devel pcre-devel python-devel setools-devel swig xmlto redhat-rpm-config

To build and install everything under a private directory, run:
make DESTDIR=~/obj install install-pywrap

To install as the default system libraries and binaries
(overwriting any previously installed ones - dangerous!),
on x86_64, run:
make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel
or on x86 (32-bit), run:
make install install-pywrap relabel

This may render your system unusable if the upstream SELinux userspace
lacks library functions or other dependencies relied upon by your
distribution.  If it breaks, you get to keep both pieces.

To install libsepol on macOS (mainly for policy analysis):
cd libsepol; make PREFIX=/usr/local install

This requires GNU coreutils (brew install coreutils).