mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
tree: start on massive tree refactor
The big thing going on here is that we are going to split up the libraries a bit better, and remove GObject from the capture library. The libsysprof library will bring in the capture library statically, so we can export the symbols we want. Eventually, we will bump the version to sysprof-3, but not yet.
This commit is contained in:
@ -1,6 +1,3 @@
|
||||
datadir = get_option('datadir')
|
||||
podir = join_paths(meson.source_root(), 'po')
|
||||
|
||||
install_data('sysprof-mime.xml',
|
||||
install_dir: join_paths(datadir, 'mime/packages')
|
||||
)
|
||||
@ -10,53 +7,23 @@ install_data('org.gnome.sysprof2.gschema.xml',
|
||||
)
|
||||
|
||||
i18n.merge_file(
|
||||
input: 'org.gnome.Sysprof2.appdata.xml.in',
|
||||
output: 'org.gnome.Sysprof2.appdata.xml',
|
||||
po_dir: podir,
|
||||
install: true,
|
||||
input: 'org.gnome.Sysprof2.appdata.xml.in',
|
||||
output: 'org.gnome.Sysprof2.appdata.xml',
|
||||
po_dir: podir,
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'metainfo')
|
||||
)
|
||||
|
||||
i18n.merge_file(
|
||||
input: 'org.gnome.Sysprof2.desktop.in',
|
||||
output: 'org.gnome.Sysprof2.desktop',
|
||||
type: 'desktop',
|
||||
po_dir: podir,
|
||||
install: true,
|
||||
input: 'org.gnome.Sysprof2.desktop.in',
|
||||
output: 'org.gnome.Sysprof2.desktop',
|
||||
type: 'desktop',
|
||||
po_dir: podir,
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'applications')
|
||||
)
|
||||
|
||||
pkgconf = configuration_data()
|
||||
pkgconf.set('VERSION', meson.project_version())
|
||||
pkgconf.set('API_VERSION', libsysprof_api_version)
|
||||
pkgconf.set('prefix', get_option('prefix'))
|
||||
pkgconf.set('libdir', join_paths('${exec_prefix}', get_option('libdir')))
|
||||
pkgconf.set('includedir', join_paths('${prefix}', get_option('includedir')))
|
||||
|
||||
pkgconfigdir = join_paths(get_option('libdir'), 'pkgconfig')
|
||||
configure_file(
|
||||
input: 'sysprof.pc.in',
|
||||
output: 'sysprof-@0@.pc'.format(libsysprof_api_version),
|
||||
configuration: pkgconf,
|
||||
install: true,
|
||||
install_dir: pkgconfigdir,
|
||||
)
|
||||
configure_file(
|
||||
input: 'sysprof-capture.pc.in',
|
||||
output: 'sysprof-capture-@0@.pc'.format(libsysprof_api_version),
|
||||
configuration: pkgconf,
|
||||
install: true,
|
||||
install_dir: pkgconfigdir,
|
||||
)
|
||||
if get_option('enable_gtk')
|
||||
configure_file(
|
||||
input: 'sysprof-ui.pc.in',
|
||||
output: 'sysprof-ui-@0@.pc'.format(libsysprof_api_version),
|
||||
configuration: pkgconf,
|
||||
install: true,
|
||||
install_dir: pkgconfigdir,
|
||||
)
|
||||
|
||||
icon_sizes = ['scalable', 'symbolic']
|
||||
foreach size: icon_sizes
|
||||
install_subdir('icons/' + size,
|
||||
@ -64,45 +31,3 @@ if get_option('enable_gtk')
|
||||
)
|
||||
endforeach
|
||||
endif
|
||||
|
||||
if get_option('with_sysprofd') == 'bundled'
|
||||
|
||||
sysprofdconf = configuration_data()
|
||||
sysprofdconf.set('sysprofdprivdir', pkglibexecdir)
|
||||
|
||||
configure_file(
|
||||
input: 'org.gnome.Sysprof2.service.in',
|
||||
output: 'org.gnome.Sysprof2.service',
|
||||
configuration: sysprofdconf,
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'dbus-1/system-services'),
|
||||
)
|
||||
configure_file(
|
||||
input: 'org.gnome.Sysprof2.conf.in',
|
||||
output: 'org.gnome.Sysprof2.conf',
|
||||
configuration: sysprofdconf,
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'dbus-1/system.d'),
|
||||
)
|
||||
|
||||
systemdunitdir = get_option('systemdunitdir')
|
||||
if systemdunitdir == ''
|
||||
systemdunitdir = dependency('systemd').get_pkgconfig_variable('systemdsystemunitdir')
|
||||
endif
|
||||
configure_file(
|
||||
input: 'sysprof2.service.in',
|
||||
output: 'sysprof2.service',
|
||||
configuration: sysprofdconf,
|
||||
install: true,
|
||||
install_dir: systemdunitdir,
|
||||
)
|
||||
|
||||
i18n.merge_file(
|
||||
input: 'org.gnome.sysprof2.policy.in',
|
||||
output: 'org.gnome.sysprof2.policy',
|
||||
po_dir: podir,
|
||||
install: true,
|
||||
install_dir: join_paths(datadir, 'polkit-1/actions'),
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
<?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"/>
|
||||
</policy>
|
||||
|
||||
<!-- Anyone can send messages to the owner of org.gnome.Sysprof2 -->
|
||||
<policy context="default">
|
||||
<allow send_destination="org.gnome.Sysprof2"/>
|
||||
<allow receive_sender="org.gnome.Sysprof2"/>
|
||||
</policy>
|
||||
</busconfig>
|
||||
@ -1,5 +0,0 @@
|
||||
[D-BUS Service]
|
||||
Name=org.gnome.Sysprof2
|
||||
Exec=@sysprofdprivdir@/sysprofd
|
||||
User=root
|
||||
SystemdService=sysprof2.service
|
||||
@ -1,39 +0,0 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.gnome.Sysprof2">
|
||||
<!--
|
||||
PerfEventOpen:
|
||||
@options: key-value pair of attributes for the perf_event_open() syscall.
|
||||
@pid: the process id to monitor, or -1 for system-wide.
|
||||
@cpu: affinity to cpu.
|
||||
@flags: flags for perf_event_open() syscall.
|
||||
@perf_stream_fd: (out): A fd to communicate with perf.
|
||||
|
||||
Performs the perf_event_open() syscall with elevated privileges and passes
|
||||
the resulting fd back to the calling process.
|
||||
-->
|
||||
<method name="PerfEventOpen">
|
||||
<arg name="options" type="a{sv}" direction="in"/>
|
||||
<arg name="pid" type="i" direction="in"/>
|
||||
<arg name="cpu" type="i" direction="in"/>
|
||||
<arg name="flags" type="t" direction="in"/>
|
||||
<arg name="perf_stream_fd" type="h" direction="out"/>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
GetKernelSymbols:
|
||||
|
||||
Loads the name, type, and address of Linux kernel symbols. This is useful
|
||||
if your system does not provide access to /proc/kallsyms to non-root users.
|
||||
|
||||
Returns: an array of (tys) tuples. t is the address, y is the type, and s
|
||||
is the name.
|
||||
|
||||
Since: 3.28
|
||||
-->
|
||||
<method name="GetKernelSymbols">
|
||||
<arg name="symbols" type="a(tys)" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
|
||||
|
||||
<policyconfig>
|
||||
<vendor>The sysprof Project</vendor>
|
||||
<vendor_url>https://wiki.gnome.org/Apps/Sysprof</vendor_url>
|
||||
<icon_name>sysprof</icon_name>
|
||||
|
||||
<action id="org.gnome.sysprof2.perf-event-open">
|
||||
<description>Open a perf event stream</description>
|
||||
<message>Authentication is required to access system performance counters.</message>
|
||||
<defaults>
|
||||
<allow_any>auth_admin_keep</allow_any>
|
||||
<allow_inactive>auth_admin_keep</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.imply">org.gnome.sysprof2.get-kernel-symbols</annotate>
|
||||
</action>
|
||||
|
||||
<action id="org.gnome.sysprof2.get-kernel-symbols">
|
||||
<description>Get a list of kernel symbols and their address</description>
|
||||
<message>Authentication is required to access Linux kernel information.</message>
|
||||
<defaults>
|
||||
<allow_any>auth_admin_keep</allow_any>
|
||||
<allow_inactive>auth_admin_keep</allow_inactive>
|
||||
<allow_active>auth_admin_keep</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.imply">org.gnome.sysprof2.perf-event-open</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
||||
@ -1,11 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libsysprof-capture-@API_VERSION@
|
||||
Description: The sysprof profiler library for reading and writing capture files
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lsysprof-capture-@API_VERSION@
|
||||
Cflags: -I${includedir}/sysprof-@API_VERSION@
|
||||
Requires: gobject-2.0
|
||||
@ -1,11 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libsysprof-ui-@API_VERSION@
|
||||
Description: The sysprof library containing reusable GTK widgets
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lsysprof-ui-@API_VERSION@
|
||||
Cflags: -I${includedir}/sysprof-@API_VERSION@
|
||||
Requires: gio-2.0 gtk+-3.0 sysprof-@API_VERSION@
|
||||
@ -1,11 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libsysprof-@API_VERSION@
|
||||
Description: The sysprof profiler library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lsysprof-@API_VERSION@
|
||||
Cflags: -I${includedir}/sysprof-@API_VERSION@
|
||||
Requires: gio-2.0
|
||||
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Sysprof Daemon
|
||||
|
||||
[Service]
|
||||
Type=dbus
|
||||
BusName=org.gnome.Sysprof2
|
||||
ExecStart=@sysprofdprivdir@/sysprofd
|
||||
|
||||
Reference in New Issue
Block a user