diff --git a/rpm/fix_systemd_path.patch b/rpm/fix_systemd_path.patch new file mode 100644 index 0000000..0259100 --- /dev/null +++ b/rpm/fix_systemd_path.patch @@ -0,0 +1,15 @@ +diff --git a/restorecond/Makefile b/restorecond/Makefile +index 25be18d4..65bd1775 100644 +--- a/restorecond/Makefile ++++ b/restorecond/Makefile +@@ -51,8 +51,8 @@ install: all + install -m 644 restorecond.desktop $(DESTDIR)$(AUTOSTARTDIR)/restorecond.desktop + -mkdir -p $(DESTDIR)$(DBUSSERVICEDIR) + install -m 600 org.selinux.Restorecond.service $(DESTDIR)$(DBUSSERVICEDIR)/org.selinux.Restorecond.service +- -mkdir -p $(DESTDIR)$(SYSTEMDDIR)/system +- install -m 644 restorecond.service $(DESTDIR)$(SYSTEMDDIR)/system/ ++ -mkdir -p $(DESTDIR)$(SYSTEMDDIR)/ ++ install -m 644 restorecond.service $(DESTDIR)$(SYSTEMDDIR)/ + relabel: install + /sbin/restorecon $(DESTDIR)$(SBINDIR)/restorecond + diff --git a/rpm/policycoreutils.spec b/rpm/policycoreutils.spec index 04c1148..9016d34 100644 --- a/rpm/policycoreutils.spec +++ b/rpm/policycoreutils.spec @@ -47,6 +47,7 @@ Source17: selinux-autorelabel-mark.service Source18: selinux-autorelabel.target Source19: selinux-autorelabel-generator.sh Patch0: disable_awk_sandbox_policycoreutils.patch +Patch1: fix_systemd_path.patch Obsoletes: policycoreutils < 2.0.61-2 #Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138 # initscripts < 9.66 shipped fedora-autorelabel services which are renamed to selinux-relabel @@ -82,6 +83,7 @@ to switch roles. %prep %setup -q -n %{name}-%{version}/upstream %patch0 -p1 +%patch1 -p1 %build make -C policycoreutils LSPP_PRIV=y SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" CFLAGS="%{optflags} -fPIE" LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" SEMODULE_PATH="/usr/sbin" LIBSEPOLA="%{_libdir}/libsepol.a" all @@ -110,7 +112,7 @@ make -C dbus PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LI make -C semodule-utils PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install -make -C restorecond PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install +make -C restorecond PYTHON=%{__python3} DESTDIR="%{buildroot}" SBINDIR="%{_sbindir}" LIBDIR="%{_libdir}" SYSTEMDDIR="%{_unitdir}" LIBSEPOLA="%{_libdir}/libsepol.a" install # Systemd