sysprof3: start moving API towards sysprof-3

This commit is contained in:
Christian Hergert
2019-05-09 15:29:16 -07:00
parent 44a555eb1f
commit 0b284329d4
8 changed files with 55 additions and 50 deletions

View File

@ -439,9 +439,9 @@ get_proxy (void)
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS |
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION),
NULL,
"org.gnome.Sysprof2",
"/org/gnome/Sysprof2",
"org.gnome.Sysprof2",
"org.gnome.Sysprof3",
"/org/gnome/Sysprof3",
"org.gnome.Sysprof3.Service",
NULL, NULL);
if (proxy != NULL)
@ -475,7 +475,7 @@ authorize_proxy (GDBusProxy *proxy)
if (subject == NULL)
goto failure;
permission = polkit_permission_new_sync ("org.gnome.sysprof2.perf-event-open", subject, NULL, NULL);
permission = polkit_permission_new_sync ("org.gnome.sysprof3.profile", subject, NULL, NULL);
if (permission == NULL)
goto failure;

View File

@ -28,15 +28,15 @@ sysprofdconf = configuration_data()
sysprofdconf.set('sysprofdprivdir', pkglibexecdir)
configure_file(
input: 'org.gnome.Sysprof2.service.in',
output: 'org.gnome.Sysprof2.service',
input: 'org.gnome.Sysprof3.service.in',
output: 'org.gnome.Sysprof3.service',
configuration: sysprofdconf,
install_dir: join_paths(datadir, 'dbus-1/system-services'),
)
configure_file(
input: 'org.gnome.Sysprof2.conf.in',
output: 'org.gnome.Sysprof2.conf',
input: 'org.gnome.Sysprof3.conf.in',
output: 'org.gnome.Sysprof3.conf',
configuration: sysprofdconf,
install_dir: join_paths(datadir, 'dbus-1/system.d'),
)
@ -46,8 +46,8 @@ if systemdunitdir == ''
systemdunitdir = dependency('systemd').get_pkgconfig_variable('systemdsystemunitdir')
endif
configure_file(
input: 'sysprof2.service.in',
output: 'sysprof2.service',
input: 'sysprof3.service.in',
output: 'sysprof3.service',
configuration: sysprofdconf,
install_dir: systemdunitdir,
)

View File

@ -1,19 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Only root can own the service -->
<policy user="root">
<allow own="org.gnome.Sysprof2"/>
<allow send_destination="org.gnome.Sysprof2"/>
<allow receive_sender="org.gnome.Sysprof2"/>
<allow own="org.gnome.Sysprof3"/>
<allow send_destination="org.gnome.Sysprof3"/>
<allow receive_sender="org.gnome.Sysprof3"/>
</policy>
<!-- Anyone can send messages to the owner of org.gnome.Sysprof2 -->
<!-- Anyone can send messages to the owner of org.gnome.Sysprof3 -->
<policy context="default">
<allow send_destination="org.gnome.Sysprof2"/>
<allow receive_sender="org.gnome.Sysprof2"/>
<allow send_destination="org.gnome.Sysprof3"/>
<allow receive_sender="org.gnome.Sysprof3"/>
</policy>
</busconfig>

View File

@ -1,5 +1,5 @@
[D-BUS Service]
Name=org.gnome.Sysprof2
Name=org.gnome.Sysprof3
Exec=@sysprofdprivdir@/sysprofd
User=root
SystemdService=sysprof2.service
SystemdService=sysprof3.service

View File

@ -3,6 +3,6 @@ Description=Sysprof Daemon
[Service]
Type=dbus
BusName=org.gnome.Sysprof2
BusName=org.gnome.Sysprof3
ExecStart=@sysprofdprivdir@/sysprofd