Skip to content

Commit

Permalink
meson: Install DBus policy for the plugin interface
Browse files Browse the repository at this point in the history
Signed-off-by: Vyacheslav Yurkov <[email protected]>
  • Loading branch information
UVV-gh committed Mar 9, 2024
1 parent c6fa41b commit 655f937
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
15 changes: 15 additions & 0 deletions data/de.pengutronix.rauc.InstallConfirmation.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- This config allows anyone to control rauc -->
<!-- It is usually installed to /usr/share/dbus-1/system.d -->

<policy context="default">
<allow send_destination="de.pengutronix.rauc.InstallConfirmation"/>
</policy>

<policy user="root">
<allow own="de.pengutronix.rauc.InstallConfirmation"/>
</policy>
</busconfig>
6 changes: 6 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rauc_dbus_policy = configure_file(
input : 'de.pengutronix.rauc.InstallConfirmation.conf',
output : 'de.pengutronix.rauc.InstallConfirmation.conf',
copy : true
)
install_data(rauc_dbus_policy, install_dir : dbuspolicydir)
8 changes: 8 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ if systemddep.found()
install_data('script/rauc-hawkbit-updater.service', install_dir : systemdsystemunitdir)
endif

datadir = get_option('datadir')

dbuspolicydir = get_option('dbuspolicydir')
if dbuspolicydir == ''
dbuspolicydir = datadir / 'dbus-1' / 'system.d'
endif

gnome = import('gnome')
dbus = 'rauc-installer-gen'
dbus_ifaces = files('src/rauc-installer.xml')
Expand Down Expand Up @@ -98,6 +105,7 @@ if doxygen.found()
)
endif

subdir('data')
subdir('docs')

executable('rauc-hawkbit-updater',
Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ option(
type : 'string',
value : '',
description : 'Directory for systemd service files')
option(
'dbuspolicydir',
type : 'string',
value : '',
description : 'D-Bus policy directory')

0 comments on commit 655f937

Please sign in to comment.