diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 1898151..8428893 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -336811,10 +336811,10 @@ index 3bb3c4b..d16e331 100644 } diff --git a/policycoreutils/scripts/Makefile b/policycoreutils/scripts/Makefile -index e08088e..feecbef 100644 +index e08088e..201a988 100644 --- a/policycoreutils/scripts/Makefile +++ b/policycoreutils/scripts/Makefile -@@ -6,6 +6,7 @@ SBINDIR ?= $(DESTDIR)/sbin +@@ -6,14 +6,17 @@ SBINDIR ?= $(DESTDIR)/sbin MANDIR ?= $(PREFIX)/share/man LOCALEDIR ?= $(PREFIX)/share/locale @@ -336822,6 +336822,19 @@ index e08088e..feecbef 100644 all: fixfiles genhomedircon chcat genhomedircon: + @echo "#!/bin/sh" > genhomedircon + @echo >> genhomedircon +- @if [ ! -e semodule_path ]; then echo -n "$(USRSBINDIR)/" >> genhomedircon; fi +- @if [ -e semodule_path ]; then echo -n "`cat semodule_path`/" >> genhomedircon; fi +- @echo "semodule -Bn" >> genhomedircon ++ @if [ -z "${SEMODULE_PATH}" ]; then \ ++ echo "${USRSBINDIR}/semodule -Bn" >> genhomedircon; \ ++ else \ ++ echo "${SEMODULE_PATH}/semodule -Bn" >> genhomedircon; \ ++ fi + + install: all + -mkdir -p $(BINDIR) diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles index 989b1ae..23ab94d 100755 --- a/policycoreutils/scripts/fixfiles diff --git a/policycoreutils.spec b/policycoreutils.spec index cd6b6a9..5b90325 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -65,7 +65,7 @@ to switch roles. %patch1 -p2 -b .sepolgen -d sepolgen-%{sepolgenver} %build -make LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all +make LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" SEMODULE_PATH="/usr/sbin" all make -C sepolgen-%{sepolgenver} SBINDIR="%{_sbindir}" LSPP_PRIV=y LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro" all %install @@ -83,7 +83,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps %{__mkdir} -p %{buildroot}/%{_usr}/share/doc/%{name}-%{version}/ cp COPYING %{buildroot}/%{_usr}/share/doc/%{name}-%{version}/ -make LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install +make LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" SEMODULE_PATH="/usr/sbin" install make -C gui LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install # Systemd mkdir -p %{buildroot}%{_unitdir}