trivial: snap: Install dbus service in classic snap

This should be reverted if switching to a devmode or confined snap.
This commit is contained in:
Mario Limonciello 2018-09-10 12:52:07 -05:00
parent 8121daadd3
commit c60012c784
2 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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 /