[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] Add default.pa.d folder support

Arun Raghavan gitlab at gitlab.freedesktop.org
Mon Nov 23 22:14:00 UTC 2020



Arun Raghavan pushed to branch master at PulseAudio / pulseaudio


Commits:
45abd0b4 by Sanchayan Maity at 2020-11-23T22:07:36+00:00
Add default.pa.d folder support

The .include meta command already supports specifying a directory and
when including a directory, all files with the extension '.pa' in that
directory will be parsed in alphabetical order.

This feature can be used to add support for default.pa.d directory, so
that packages for other applications or users can just drop in a file
for configuration without changing the default.pa which is shipped.

We use the PA_DEFAULT_CONFIG_DIR for this, however, since meson quotes
this build variable, introduce an unquoted version for this purpose and
use it with .include.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/909

Signed-off-by: Sanchayan Maity <sanchayan at asymptotic.io>

- - - - -


4 changed files:

- configure.ac
- meson.build
- src/daemon/default.pa.in
- src/daemon/system.pa.in


Changes:

=====================================
configure.ac
=====================================
@@ -1394,6 +1394,7 @@ AC_DEFINE(PA_SOEXT, [".so"], [Shared object extension])
 
 AC_SUBST(pulseconfdir, ["${sysconfdir}/pulse"])
 AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR, pulseconfdir, [Location of configuration files])
+AX_DEFINE_DIR(PA_DEFAULT_CONFIG_DIR_UNQUOTED, pulseconfdir, [Location of configuration files])
 
 #### Mac OSX specific stuff #####
 


=====================================
meson.build
=====================================
@@ -136,6 +136,7 @@ cdata.set_quoted('PA_SRCDIR', join_paths(meson.current_source_dir(), 'src'))
 cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir())
 cdata.set_quoted('PA_SOEXT', '.so')
 cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir)
+cdata.set('PA_DEFAULT_CONFIG_DIR_UNQUOTED', pulsesysconfdir)
 cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio'))
 cdata.set_quoted('PA_SYSTEM_RUNTIME_PATH', join_paths(localstatedir, 'run', 'pulse'))
 cdata.set_quoted('PA_SYSTEM_CONFIG_PATH', join_paths(localstatedir, 'lib', 'pulse'))


=====================================
src/daemon/default.pa.in
=====================================
@@ -173,3 +173,8 @@ load-module module-filter-apply
 ### Make some devices default
 #set-default-sink output
 #set-default-source input
+
+### Allow including a default.pa.d directory, which if present, can be used
+### for additional configuration snippets.
+.nofail
+.include @PA_DEFAULT_CONFIG_DIR_UNQUOTED@/default.pa.d


=====================================
src/daemon/system.pa.in
=====================================
@@ -60,3 +60,8 @@ load-module module-suspend-on-idle
 
 ### Enable positioned event sounds
 load-module module-position-event-sounds
+
+### Allow including a system.pa.d directory, which if present, can be used
+### for additional configuration snippets.
+.nofail
+.include @PA_DEFAULT_CONFIG_DIR_UNQUOTED@/system.pa.d



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/45abd0b43c7901b375afcba6d9b0e1cca2f349a8

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/45abd0b43c7901b375afcba6d9b0e1cca2f349a8
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201123/f660f04b/attachment-0001.htm>


More information about the pulseaudio-commits mailing list