Install the daemon in libexecdir

I know Debian doesn't use libexecdir, but most other distros do. On Fedora it's
really strange to see a binary in /usr/libexec/fwupd/fwupd and supporting this
not-quite-servicedir is causing confusion in the Makefiles and also problems in
other external tools.

Simply redefine libexecdir if you need the daemon binary to be installed
somewhere different.
This commit is contained in:
Richard Hughes 2017-04-12 14:38:28 +01:00
parent c232db23df
commit a1585c6b7f
4 changed files with 4 additions and 5 deletions

View File

@ -143,8 +143,7 @@ make check VERBOSE=1
%doc README.md AUTHORS NEWS %doc README.md AUTHORS NEWS
%license COPYING %license COPYING
%config(noreplace)%{_sysconfdir}/fwupd.conf %config(noreplace)%{_sysconfdir}/fwupd.conf
%dir %{_libexecdir}/fwupd %{_libexecdir}/fwupd
%{_libexecdir}/fwupd/fwupd
%{_bindir}/fwupdmgr %{_bindir}/fwupdmgr
%{_sysconfdir}/pki/fwupd %{_sysconfdir}/pki/fwupd
%{_sysconfdir}/pki/fwupd-metadata %{_sysconfdir}/pki/fwupd-metadata

View File

@ -17,7 +17,7 @@ $(dbusservicemain_DATA): $(dbusservicemain_in_files) Makefile
sed -e "s|\@daemon_user\@|$(daemon_user)|" > $@ sed -e "s|\@daemon_user\@|$(daemon_user)|" > $@
%.service: %.service.in Makefile %.service: %.service.in Makefile
$(AM_V_GEN)sed -e 's|\@servicedir\@|$(libexecdir)|' \ $(AM_V_GEN)sed -e 's|\@libexecdir\@|$(libexecdir)|' \
-e 's|\@localstatedir\@|$(localstatedir)|' \ -e 's|\@localstatedir\@|$(localstatedir)|' \
-e 's|\@bootdir\@|$(bootdir)|' \ -e 's|\@bootdir\@|$(bootdir)|' \
-e 's|\@bindir\@|$(bindir)|' \ -e 's|\@bindir\@|$(bindir)|' \

View File

@ -7,7 +7,7 @@ Before=gdm.service
[Service] [Service]
Type=dbus Type=dbus
BusName=org.freedesktop.fwupd BusName=org.freedesktop.fwupd
ExecStart=@servicedir@/fwupd/fwupd ExecStart=@libexec@/fwupd
MemoryDenyWriteExecute=yes MemoryDenyWriteExecute=yes
PrivateTmp=yes PrivateTmp=yes
ProtectControlGroups=yes ProtectControlGroups=yes

View File

@ -1,6 +1,6 @@
[D-BUS Service] [D-BUS Service]
Name=org.freedesktop.fwupd Name=org.freedesktop.fwupd
Documentation=http://www.fwupd.org/ Documentation=http://www.fwupd.org/
Exec=@servicedir@/fwupd/fwupd Exec=@libexecdir@/fwupd
User=root User=root
SystemdService=fwupd.service SystemdService=fwupd.service