summaryrefslogtreecommitdiffstats
path: root/pulseaudio-jack
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-01-19 20:51:01 +0000
committer Eric Hameleers <alien@slackware.com>2020-01-19 20:51:01 +0000
commit44268cbde7171d77b2b0891dd0616d1aaab6cb6c (patch)
tree219e088dfdfe0ad97f8387fcf50ad48a9885a0f0 /pulseaudio-jack
parente371268691cc01617f4ce0ea702c4eb3be6830b3 (diff)
downloadasb-44268cbde7171d77b2b0891dd0616d1aaab6cb6c.tar.gz
asb-44268cbde7171d77b2b0891dd0616d1aaab6cb6c.tar.xz
Initial revision
Diffstat (limited to 'pulseaudio-jack')
-rw-r--r--pulseaudio-jack/build/patches/0001-client-conf-Add-allow-autospawn-for-root.patch79
-rw-r--r--pulseaudio-jack/build/patches/0002-allow-autospawn-for-root-default.diff27
-rw-r--r--pulseaudio-jack/build/patches/0003-no-root-warn.diff14
-rw-r--r--pulseaudio-jack/build/patches/020_no-parallel-make.diff22
-rw-r--r--pulseaudio-jack/build/patches/030_posix-completion.diff91
-rw-r--r--pulseaudio-jack/build/patches/pulseaudio-autostart.patch13
6 files changed, 246 insertions, 0 deletions
diff --git a/pulseaudio-jack/build/patches/0001-client-conf-Add-allow-autospawn-for-root.patch b/pulseaudio-jack/build/patches/0001-client-conf-Add-allow-autospawn-for-root.patch
new file mode 100644
index 00000000..ea54ae3f
--- /dev/null
+++ b/pulseaudio-jack/build/patches/0001-client-conf-Add-allow-autospawn-for-root.patch
@@ -0,0 +1,79 @@
+From 1cb5647f76dc8cd7bacbce2a64fac9e6c2dc3b16 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
+Date: Tue, 28 Apr 2015 14:32:43 +0300
+Subject: [PATCH] client-conf: Add allow-autospawn-for-root
+
+Usually autospawning for root is a bad idea, since it can easily
+interfere with other users' PulseAudio instances, but in embedded
+environments where only root exists, autospawning is fine.
+
+Upstream-Status: Submitted [http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23549]
+
+Signed-off-by: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
+---
+ man/pulse-client.conf.5.xml.in | 9 +++++++++
+ src/pulse/client-conf.c | 1 +
+ src/pulse/client-conf.h | 1 +
+ src/pulse/client.conf.in | 1 +
+ src/pulse/context.c | 2 +-
+ 5 files changed, 13 insertions(+), 1 deletion(-)
+
+--- ./man/pulse-client.conf.5.xml.in.orig 2016-05-10 07:28:04.000000000 -0500
++++ ./man/pulse-client.conf.5.xml.in 2016-06-22 13:39:30.494696654 -0500
+@@ -82,6 +82,15 @@
+ </option>
+
+ <option>
++ <p><opt>allow-autospawn-for-root=</opt> Allow autospawning also for root.
++ Takes a boolean value, defaults to <opt>no</opt>. If the <opt>autospawn
++ </opt> option is disabled, this option has no effect. Autospawning for
++ root is disabled by default, because running PulseAudio as root will
++ interfere with regular users' PulseAudio instances. This option should be
++ enabled only in environments where there are no regular users at all.</p>
++ </option>
++
++ <option>
+ <p><opt>daemon-binary=</opt> Path to the PulseAudio daemon to
+ run when autospawning. Defaults to a path configured at compile
+ time.</p>
+--- ./src/pulse/client.conf.in.orig 2016-05-03 01:17:39.000000000 -0500
++++ ./src/pulse/client.conf.in 2016-06-22 13:39:30.527696657 -0500
+@@ -23,6 +23,7 @@
+ ; default-dbus-server =
+
+ ; autospawn = yes
++; allow-autospawn-for-root = no
+ ; daemon-binary = @PA_BINARY@
+ ; extra-arguments = --log-target=syslog
+
+--- ./src/pulse/client-conf.c.orig 2016-05-10 07:28:04.000000000 -0500
++++ ./src/pulse/client-conf.c 2016-06-22 13:39:30.505696655 -0500
+@@ -138,6 +138,7 @@
+ { "default-server", pa_config_parse_string, &c->default_server, NULL },
+ { "default-dbus-server", pa_config_parse_string, &c->default_dbus_server, NULL },
+ { "autospawn", pa_config_parse_bool, &c->autospawn, NULL },
++ { "allow-autospawn-for-root", pa_config_parse_bool, &c->allow_autospawn_for_root, NULL },
+ { "cookie-file", pa_config_parse_string, &c->cookie_file_from_client_conf, NULL },
+ { "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
+ { "enable-shm", pa_config_parse_not_bool, &c->disable_shm, NULL },
+--- ./src/pulse/context.c.orig 2016-06-01 05:50:54.000000000 -0500
++++ ./src/pulse/context.c 2016-06-22 13:39:30.536696657 -0500
+@@ -1027,7 +1027,7 @@
+ if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
+
+ #ifdef HAVE_GETUID
+- if (getuid() == 0)
++ if (!c->conf->allow_autospawn_for_root && getuid() == 0)
+ pa_log_debug("Not doing autospawn since we are root.");
+ else {
+ c->do_autospawn = true;
+--- ./src/pulse/client-conf.h.orig 2016-06-22 13:39:30.517696656 -0500
++++ ./src/pulse/client-conf.h 2016-06-22 13:40:11.754699631 -0500
+@@ -38,6 +38,7 @@
+ char *cookie_file_from_application;
+ char *cookie_file_from_client_conf;
+ bool autospawn, disable_shm, disable_memfd, auto_connect_localhost, auto_connect_display;
++ bool allow_autospawn_for_root;
+ size_t shm_size;
+ } pa_client_conf;
+
diff --git a/pulseaudio-jack/build/patches/0002-allow-autospawn-for-root-default.diff b/pulseaudio-jack/build/patches/0002-allow-autospawn-for-root-default.diff
new file mode 100644
index 00000000..15c99583
--- /dev/null
+++ b/pulseaudio-jack/build/patches/0002-allow-autospawn-for-root-default.diff
@@ -0,0 +1,27 @@
+--- ./man/pulse-client.conf.5.xml.in.orig 2016-01-06 15:33:09.797022947 -0600
++++ ./man/pulse-client.conf.5.xml.in 2016-01-06 15:35:34.902019857 -0600
+@@ -73,10 +73,7 @@
+ <option>
+ <p><opt>allow-autospawn-for-root=</opt> Allow autospawning also for root.
+ Takes a boolean value, defaults to <opt>no</opt>. If the <opt>autospawn
+- </opt> option is disabled, this option has no effect. Autospawning for
+- root is disabled by default, because running PulseAudio as root will
+- interfere with regular users' PulseAudio instances. This option should be
+- enabled only in environments where there are no regular users at all.</p>
++ </opt> option is disabled, this option has no effect.</p>
+ </option>
+
+ <option>
+--- ./src/pulse/client.conf.in.orig 2016-01-06 15:33:09.800022947 -0600
++++ ./src/pulse/client.conf.in 2016-01-06 15:39:33.502014775 -0600
+@@ -22,8 +22,8 @@
+ ; default-server =
+ ; default-dbus-server =
+
+-; autospawn = yes
+-; allow-autospawn-for-root = no
++autospawn = yes
++allow-autospawn-for-root = yes
+ ; daemon-binary = @PA_BINARY@
+ ; extra-arguments = --log-target=syslog
+
diff --git a/pulseaudio-jack/build/patches/0003-no-root-warn.diff b/pulseaudio-jack/build/patches/0003-no-root-warn.diff
new file mode 100644
index 00000000..c7d31c41
--- /dev/null
+++ b/pulseaudio-jack/build/patches/0003-no-root-warn.diff
@@ -0,0 +1,14 @@
+--- ./src/daemon/main.c.orig 2015-10-30 07:16:48.000000000 -0500
++++ ./src/daemon/main.c 2016-01-07 15:05:42.131126245 -0600
+@@ -647,10 +647,8 @@
+ }
+
+ #ifdef HAVE_GETUID
+- if (getuid() == 0 && !conf->system_instance)
+- pa_log_warn(_("This program is not intended to be run as root (unless --system is specified)."));
+ #ifndef HAVE_DBUS /* A similar, only a notice worthy check was done earlier, if D-Bus is enabled. */
+- else if (getuid() != 0 && conf->system_instance) {
++ if (getuid() != 0 && conf->system_instance) {
+ pa_log(_("Root privileges required."));
+ goto finish;
+ }
diff --git a/pulseaudio-jack/build/patches/020_no-parallel-make.diff b/pulseaudio-jack/build/patches/020_no-parallel-make.diff
new file mode 100644
index 00000000..6b552e33
--- /dev/null
+++ b/pulseaudio-jack/build/patches/020_no-parallel-make.diff
@@ -0,0 +1,22 @@
+--- src/Makefile.am.orig 2014-02-14 23:45:45.000000000 +1000
++++ src/Makefile.am 2014-10-26 21:59:33.220234317 +1000
+@@ -19,6 +19,8 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ # USA.
+
++.NOTPARALLEL:
++
+ ###################################
+ # Extra directories #
+ ###################################
+--- Makefile.am.orig 2014-01-24 04:57:55.000000000 +1000
++++ Makefile.am 2014-10-26 21:58:47.090622189 +1000
+@@ -15,6 +15,8 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ # USA.
+
++.NOTPARALLEL:
++
+ ACLOCAL_AMFLAGS = -I m4
+
+ EXTRA_DIST = \
diff --git a/pulseaudio-jack/build/patches/030_posix-completion.diff b/pulseaudio-jack/build/patches/030_posix-completion.diff
new file mode 100644
index 00000000..de1ef055
--- /dev/null
+++ b/pulseaudio-jack/build/patches/030_posix-completion.diff
@@ -0,0 +1,91 @@
+--- shell-completion/bash/pulseaudio.orig 2015-02-13 00:10:35.000000000 +1000
++++ shell-completion/bash/pulseaudio 2015-09-12 11:09:36.948222926 +1000
+@@ -1,39 +1,45 @@
+ #!/bin/bash
+
+ __cards () {
++ (pactl list cards short 2> /dev/null) |\
+ while IFS=$'\t' read idx name _; do
+ printf "%s %s\n" "$idx" "$name"
+- done < <(pactl list cards short 2> /dev/null)
++ done
+ }
+
+ __sinks () {
++ (pactl list sinks short 2> /dev/null) |\
+ while IFS=$'\t' read _ name _ _ _; do
+ printf "%s\n" "$name"
+- done < <(pactl list sinks short 2> /dev/null)
++ done
+ }
+
+ __sinks_idx () {
++ (pactl list sinks short 2> /dev/null) |\
+ while IFS=$'\t' read idx _ _ _ _; do
+ printf "%s\n" "$idx"
+- done < <(pactl list sinks short 2> /dev/null)
++ done
+ }
+
+ __sources () {
++ (pactl list sources short 2> /dev/null) |\
+ while IFS=$'\t' read _ name _ _ _; do
+ printf "%s\n" "$name"
+- done < <(pactl list sources short 2> /dev/null)
++ done
+ }
+
+ __sink_inputs () {
++ (pactl list sink-inputs short 2> /dev/null) |\
+ while IFS=$'\t' read idx _ _ _ _; do
+ printf "%s\n" "$idx"
+- done < <(pactl list sink-inputs short 2> /dev/null)
++ done
+ }
+
+ __source_outputs () {
++ (pactl list source-outputs short 2> /dev/null) |\
+ while IFS=$'\t' read idx _ _ _ _; do
+ printf "%s\n" "$idx"
+- done < <(pactl list source-outputs short 2> /dev/null)
++ done
+ }
+
+ __ports () {
+@@ -77,28 +83,32 @@
+ }
+
+ __all_modules () {
++ (pulseaudio --dump-modules 2> /dev/null) |\
+ while read name; do
+ name=${name%% *}
+ printf "%s\n" "$name"
+- done < <(pulseaudio --dump-modules 2> /dev/null)
++ done
+ }
+
+ __loaded_modules () {
++ (pactl list modules short 2> /dev/null) |\
+ while IFS=$'\t' read idx name _; do
+ printf "%s %s\n" "$idx" "$name"
+- done < <(pactl list modules short 2> /dev/null)
++ done
+ }
+
+ __resample_methods () {
++ (pulseaudio --dump-resample-methods 2> /dev/null) |\
+ while read name; do
+ printf "%s\n" "$name"
+- done < <(pulseaudio --dump-resample-methods 2> /dev/null)
++ done
+ }
+
+ _pacat_file_formats () {
++ (pacat --list-file-formats 2> /dev/null) |\
+ while IFS=$'\t' read name _; do
+ printf "%s\n" "$name"
+- done < <(pacat --list-file-formats 2> /dev/null)
++ done
+ }
+
+ in_array() {
diff --git a/pulseaudio-jack/build/patches/pulseaudio-autostart.patch b/pulseaudio-jack/build/patches/pulseaudio-autostart.patch
new file mode 100644
index 00000000..eb44bdbc
--- /dev/null
+++ b/pulseaudio-jack/build/patches/pulseaudio-autostart.patch
@@ -0,0 +1,13 @@
+diff -up pulseaudio-6.0/src/daemon/start-pulseaudio-x11.in.autostart pulseaudio-6.0/src/daemon/start-pulseaudio-x11.in
+--- pulseaudio-6.0/src/daemon/start-pulseaudio-x11.in.autostart 2015-02-12 08:10:35.000000000 -0600
++++ pulseaudio-6.0/src/daemon/start-pulseaudio-x11.in 2015-06-22 11:24:13.561614127 -0500
+@@ -17,6 +17,9 @@
+
+ set -e
+
++# probe to test if autospawn works, else resort to starting manually
++@PACTL_BINARY@ info > /dev/null 2>&1 || @PA_BINARY@ --start "$@"
++
+ if [ x"$DISPLAY" != x ] ; then
+
+ @PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY" > /dev/null