mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-18 04:04:34 +00:00
dee40ec1f8
The libsemanage Makefile currently installs libsemanage.so.1 into SHLIBDIR, but links libsemanage.so to libsemanage.so.1 in LIBDIR. This means things will only work if SHLIBDIR and LIBDIR are the same. Fortunately, by default, they are the same because the default of SHLIBDIR is set to PREFIX/lib (same as LIBDIR default) instead of the standard DESTDIR/lib. Unfortunately, if a user overrides SHLIBDIR, by doing something like the following: make DESTDIR=~/tmp/ LIBDIR=~/tmp/usr/lib SHLIBDIR=~/tmp/lib install then a broken symlink is created. Note that in some cases this may still work even when SHLIBDIR and LIBDIR are not the same, e.g.: make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install But this only works because, in systems like Fedora, /lib is a symlink to /usr/lib, so SHLIBDIR and LIBDIR are the same even though it doesn't immediately look like it. This patch changes the libsemanage Makefile to set the default value of SHLIBDIR to the standard DESTDIR/lib to prevent confusion, and installs libsemanage to LIBDIR and completely ignores SHLIBDIR. Signed-off-by: Steve Lawrence <slawrence@tresys.com> |
||
---|---|---|
checkpolicy | ||
libselinux | ||
libsemanage | ||
libsepol | ||
policycoreutils | ||
scripts | ||
sepolgen | ||
.gitignore | ||
Makefile | ||
README |
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.