Add pulseaudio gsettings schema
g_settings_new
asserts the gsettings schema is installed and compiled, and this is not the case on any system where pulseaudio has been replaced with pipewire-pulse, so pactl load-module module-gsettings
causes the server to core dump.
I've added the schema from upstream (https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/modules/gsettings/org.freedesktop.pulseaudio.gschema.xml) and updated meson.build to output it. As an aside I noticed here that the if statement is "gio_dep.found" - I think this would be true
even if get_option('gsettings')
is false. So I think this would result in anyone manually compiling this not having the option of disabling gsettings if GIO is available on their system (even though setting gsettings = false might give them the impression of having that option.)
I wasn't sure if there is some way to ensure changes to the upstream gschema make their way into this repo - or whether that's desirable.
I used the meson gnome module's post_install function because it takes care of not running the script if --destdir
is used when installing, i.e. if the app is being packaged. I checked and this is compatible with the currently specified minimum meson version.
Notes for packagers
-
usr/share/glib-2.0/schemas/org.freedesktop.pulseaudio.gschema.xml
should be picked into the pulse subpackage. - If you allow
pipewire-pulse
andpulseaudio
to be installed at the same time, both packages will attempt to installusr/share/glib-2.0/schemas/org.freedesktop.pulseaudio.gschema.xml
. You could use-D gsettings-pulse-schema=disabled
to stop pipewire-pulse installing it and then create (from pulseaudio) some common dependency package likegsettings-pulseaudio-schema
to provide this file to both packages.
Related to: #1066