From a9a99bdb488d32c53033347f992786ca869adb4c Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 19 Apr 2017 08:50:49 +0100 Subject: [PATCH] Actually use /usr/libexec/fwupd/fwupd It appears the enormity of replacing a directory with a file is just too much for package managers in 2017. I guess we might ship other things in /usr/libexec/fwupd/ in the future. --- contrib/fwupd.spec.in | 12 ++---------- data/fwupd.service.in | 2 +- data/org.freedesktop.fwupd.service.in | 2 +- src/meson.build | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/contrib/fwupd.spec.in b/contrib/fwupd.spec.in index 0f597f8c3..f8f1adeb4 100644 --- a/contrib/fwupd.spec.in +++ b/contrib/fwupd.spec.in @@ -119,15 +119,6 @@ mkdir -p --mode=0700 $RPM_BUILD_ROOT%{_localstatedir}/lib/fwupd/gnupg %find_lang %{name} -# /usr/libexec/fwupd used to be a directory, and now it's a file and -# rpm seems completely unable to cope with this -# see https://bugzilla.redhat.com/show_bug.cgi?id=447156 for details -%pretrans -p -st = posix.stat("/usr/libexec/fwupd") -if st and st.type == "directory" then - os.execute("rm -rf /usr/libexec/fwupd") -end - %post /sbin/ldconfig %systemd_post fwupd.service @@ -146,7 +137,8 @@ end %doc README.md AUTHORS NEWS %license COPYING %config(noreplace)%{_sysconfdir}/fwupd.conf -%{_libexecdir}/fwupd +%dir %{_libexecdir}/fwupd +%{_libexecdir}/fwupd/fwupd %{_bindir}/fwupdmgr %{_sysconfdir}/pki/fwupd %{_sysconfdir}/pki/fwupd-metadata diff --git a/data/fwupd.service.in b/data/fwupd.service.in index dca203c04..22253c0cf 100644 --- a/data/fwupd.service.in +++ b/data/fwupd.service.in @@ -7,7 +7,7 @@ Before=gdm.service [Service] Type=dbus BusName=org.freedesktop.fwupd -ExecStart=@libexecdir@/fwupd +ExecStart=@libexecdir@/fwupd/fwupd MemoryDenyWriteExecute=yes PrivateTmp=yes ProtectControlGroups=yes diff --git a/data/org.freedesktop.fwupd.service.in b/data/org.freedesktop.fwupd.service.in index 74b94fb2f..85324f018 100644 --- a/data/org.freedesktop.fwupd.service.in +++ b/data/org.freedesktop.fwupd.service.in @@ -1,6 +1,6 @@ [D-BUS Service] Name=org.freedesktop.fwupd Documentation=http://www.fwupd.org/ -Exec=@libexecdir@/fwupd +Exec=@libexecdir@/fwupd/fwupd User=root SystemdService=fwupd.service diff --git a/src/meson.build b/src/meson.build index 7d16237a7..469015787 100644 --- a/src/meson.build +++ b/src/meson.build @@ -74,7 +74,7 @@ executable( '-DFU_OFFLINE_DESTDIR=""', ], install : true, - install_dir : 'libexec' + install_dir : 'libexec/fwupd' ) if get_option('enable-tests')