Skip to content

Commit

Permalink
systemd: Remove extra system/ from systemd path.
Browse files Browse the repository at this point in the history
Add patch to fix the use of correct systemd path with restorecond
systemd service file.
  • Loading branch information
LaakkonenJussi committed Oct 16, 2018
1 parent e364150 commit 83278e0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions 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

4 changes: 3 additions & 1 deletion rpm/policycoreutils.spec
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 83278e0

Please sign in to comment.