From c60012c784f1edd6e344d3b12298957788559aca Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 10 Sep 2018 12:52:07 -0500 Subject: [PATCH] trivial: snap: Install dbus service in classic snap This should be reverted if switching to a devmode or confined snap. --- contrib/snap/fix-bash-completion/Makefile | 3 +++ snap/hooks/install | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/contrib/snap/fix-bash-completion/Makefile b/contrib/snap/fix-bash-completion/Makefile index ebaeca324..1bc24b786 100644 --- a/contrib/snap/fix-bash-completion/Makefile +++ b/contrib/snap/fix-bash-completion/Makefile @@ -5,3 +5,6 @@ install: sed -i "s,\(complete -F _fwupd[a-z]*\) \(fwupd.*\),\1 fwupd.\2,; \ s,\(command.*\)\(fwupdtool\),\1fwupd.\2," \ ${SNAPCRAFT_STAGE}/usr/share/bash-completion/completions/* + # fixes up dbus service for classic snap + sed -i 's!SystemdService=\(.*\)!SystemdService=snap.fwupd.fwupd.service!' \ + ${SNAPCRAFT_STAGE}/share/dbus-1/system-services/org.freedesktop.fwupd.service diff --git a/snap/hooks/install b/snap/hooks/install index f877ca94f..6879932c0 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -1,9 +1,13 @@ #!/bin/sh -e install_if_missing() { - install -m 644 -C ${SNAP}/${1} /usr/${1} + install -m 644 -C ${SNAP}/${1} ${2}/${1} } #install policykit rules and actions -install_if_missing share/polkit-1/actions/org.freedesktop.fwupd.policy -install_if_missing share/polkit-1/rules.d/org.freedesktop.fwupd.rules +install_if_missing share/polkit-1/actions/org.freedesktop.fwupd.policy /usr +install_if_missing share/polkit-1/rules.d/org.freedesktop.fwupd.rules /usr +#install dbus related items +install_if_missing share/dbus-1/system-services/org.freedesktop.fwupd.service /usr +install_if_missing share/dbus-1/interfaces/org.freedesktop.fwupd.xml /usr +install_if_missing etc/dbus-1/system.d/org.freedesktop.fwupd.conf /