On Thu, Apr 30, 2020 at 1:08 PM Petr Lautrbach <plautrba@xxxxxxxxxx> wrote: > > The user systemd service file could be installed in an other location than the > system ones. In debian for example, the system files are installed > /lib/systemd/system and the user ones in /usr/lib/systemd/user. > > Suggested-by: Laurent Bigonville <bigon@xxxxxxxx> > Signed-off-by: Petr Lautrbach <plautrba@xxxxxxxxxx> I confirm the pkg-config commands work on Arch Linux too. By the way, on Debian this patch makes building restorecond now require systemd to be installed (because /usr/share/pkgconfig/systemd.pc is provided by package "systemd"), but I guess this shouldn't be an issue. For both patches: Acked-by: Nicolas Iooss <nicolas.iooss@xxxxxxx> You can merge them when you want, or I will do so on Monday. Thanks, Nicolas > --- > restorecond/Makefile | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/restorecond/Makefile b/restorecond/Makefile > index 4de9642b0f6a..8e9a5ef1cfa1 100644 > --- a/restorecond/Makefile > +++ b/restorecond/Makefile > @@ -7,7 +7,8 @@ SBINDIR ?= $(PREFIX)/sbin > MANDIR = $(PREFIX)/share/man > AUTOSTARTDIR = /etc/xdg/autostart > DBUSSERVICEDIR = $(PREFIX)/share/dbus-1/services > -SYSTEMDDIR ?= $(PREFIX)/lib/systemd > +SYSTEMDSYSTEMUNITDIR ?= $(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd) > +SYSTEMDUSERUNITDIR ?= $(shell $(PKG_CONFIG) --variable=systemduserunitdir systemd) > > autostart_DATA = sealertauto.desktop > INITDIR ?= /etc/rc.d/init.d > @@ -48,10 +49,10 @@ install: all > install -m 644 restorecond.desktop $(DESTDIR)$(AUTOSTARTDIR)/restorecond.desktop > -mkdir -p $(DESTDIR)$(DBUSSERVICEDIR) > install -m 644 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)/user > - install -m 644 restorecond_user.service $(DESTDIR)$(SYSTEMDDIR)/user/ > + -mkdir -p $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) > + install -m 644 restorecond.service $(DESTDIR)$(SYSTEMDSYSTEMUNITDIR) > + -mkdir -p $(DESTDIR)$(SYSTEMDUSERUNITDIR) > + install -m 644 restorecond_user.service $(DESTDIR)$(SYSTEMDUSERUNITDIR) > relabel: install > /sbin/restorecon $(DESTDIR)$(SBINDIR)/restorecond > > -- > 2.26.2 >