Compilation fixes for macOS ln on macOS doesn't support --relative, so use the gnu version by default. Changes to how PREFIX is used in recent Makefiles make it so that installation to /usr/local is broken on all systems, but /usr is not writable on recent macOS versions so that is needed. This patch makes 'PREFIX=/usr/local make install' work again, but will break the default of having LIBDIR be /usr/lib and SHLIBDIR be /usr/lib. I'm not certain what this might break. --- README | 3 +++ libsepol/src/Makefile | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README b/README index e6f7276..2e04fa6 100644 --- a/README +++ b/README @@ -14,6 +14,9 @@ make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel or on x86 (32-bit), run: make install install-pywrap relabel +To install everyting under /usr/local run: +make PREFIX=/usr/local 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. diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile index 497cd56..1a924e1 100644 --- a/libsepol/src/Makefile +++ b/libsepol/src/Makefile @@ -2,7 +2,7 @@ PREFIX ?= $(DESTDIR)/usr INCLUDEDIR ?= $(PREFIX)/include LIBDIR ?= $(PREFIX)/lib -SHLIBDIR ?= $(DESTDIR)/lib +SHLIBDIR ?= $(PREFIX)/lib RANLIB ?= ranlib LIBBASE ?= $(shell basename $(LIBDIR)) CILDIR ?= ../cil @@ -32,10 +32,12 @@ endif LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=$(LIBMAP),-z,defs +LN=ln OS := $(shell uname) ifeq ($(OS), Darwin) LD_SONAME_FLAGS=-install_name,$(LIBSO) LDFLAGS += -undefined dynamic_lookup +LN=gln endif all: $(LIBA) $(LIBSO) $(LIBPC) @@ -84,7 +86,7 @@ install: all install -m 755 $(LIBSO) $(SHLIBDIR) test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig - ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET) + $(LN) -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET) relabel: /sbin/restorecon $(SHLIBDIR)/$(LIBSO) -- 2.6.2 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.