pulseaudio: add 17.0
This commit is contained in:
@@ -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;
|
||||
|
||||
27
pulseaudio/0002-allow-autospawn-for-root-default.diff
Normal file
27
pulseaudio/0002-allow-autospawn-for-root-default.diff
Normal file
@@ -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
|
||||
|
||||
14
pulseaudio/0003-no-root-warn.diff
Normal file
14
pulseaudio/0003-no-root-warn.diff
Normal file
@@ -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;
|
||||
}
|
||||
91
pulseaudio/030_posix-completion.diff
Normal file
91
pulseaudio/030_posix-completion.diff
Normal file
@@ -0,0 +1,91 @@
|
||||
--- ./shell-completion/bash/pactl.orig 2022-05-28 10:18:37.000000000 -0500
|
||||
+++ ./shell-completion/bash/pactl 2022-06-02 13:55:52.301595146 -0500
|
||||
@@ -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() {
|
||||
44
pulseaudio/doinst.sh
Normal file
44
pulseaudio/doinst.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
preserve_perms() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
|
||||
if [ -e ${OLD} ]; then
|
||||
cp -a ${OLD} ${NEW}.incoming
|
||||
cat ${NEW} > ${NEW}.incoming
|
||||
mv ${NEW}.incoming ${NEW}
|
||||
fi
|
||||
config ${NEW}
|
||||
}
|
||||
|
||||
config etc/pulse/client.conf.new
|
||||
config etc/pulse/daemon.conf.new
|
||||
config etc/pulse/default.pa.new
|
||||
config etc/pulse/system.pa.new
|
||||
config etc/xdg/autostart/pulseaudio.desktop.new
|
||||
preserve_perms etc/rc.d/rc.pulseaudio.new
|
||||
|
||||
# Make sure the pulse user is in the audio group:
|
||||
chroot . /usr/sbin/usermod -a -G audio pulse 1> /dev/null 2> /dev/null
|
||||
|
||||
# Make sure the root user is in the audio group:
|
||||
chroot . /usr/sbin/usermod -a -G audio root 1> /dev/null 2> /dev/null
|
||||
|
||||
# Recompile glib schemas:
|
||||
if [ -e usr/share/glib-2.0/schemas ]; then
|
||||
if [ -x /usr/bin/glib-compile-schemas ]; then
|
||||
/usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
64
pulseaudio/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch
Normal file
64
pulseaudio/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch
Normal file
@@ -0,0 +1,64 @@
|
||||
From ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407 Mon Sep 17 00:00:00 2001
|
||||
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
Date: Fri, 1 Dec 2023 13:28:05 +0300
|
||||
Subject: [PATCH] alsa-ucm: Replace port device UCM context assertion with an
|
||||
error
|
||||
|
||||
The pa_alsa_ucm_set_port() function is passed both a mapping context and
|
||||
a device port, and both of these refer to their respective UCM device.
|
||||
While switching over to having one port per mapping per UCM device, I
|
||||
expected both of these to be the same device struct, so added an assert
|
||||
checking so.
|
||||
|
||||
This assertion gets triggered when we have multiple UCM verbs declaring
|
||||
the same UCM device name. The root cause here is that the ports' UCM
|
||||
device references are set once while creating the ports for the card, so
|
||||
they happen to be those of a specific verb and may not match those from
|
||||
a different UCM verb's profiles' mappings.
|
||||
|
||||
Solving the root cause necessitates a larger refactor. What we actually
|
||||
assume here is that name of the UCM device is same for both the port and
|
||||
the UCM context, which ends up always true in practice. For now, replace
|
||||
the assert with a check and error.
|
||||
|
||||
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/802>
|
||||
---
|
||||
src/modules/alsa/alsa-ucm.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
|
||||
index 7f5136249..018c01739 100644
|
||||
--- a/src/modules/alsa/alsa-ucm.c
|
||||
+++ b/src/modules/alsa/alsa-ucm.c
|
||||
@@ -1581,6 +1581,7 @@ int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *p
|
||||
pa_alsa_ucm_config *ucm;
|
||||
pa_alsa_ucm_device *dev;
|
||||
pa_alsa_ucm_port_data *data;
|
||||
+ const char *dev_name, *ucm_dev_name;
|
||||
|
||||
pa_assert(context && context->ucm);
|
||||
|
||||
@@ -1588,8 +1589,17 @@ int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *p
|
||||
pa_assert(ucm->ucm_mgr);
|
||||
|
||||
data = PA_DEVICE_PORT_DATA(port);
|
||||
- dev = context->ucm_device;
|
||||
- pa_assert(dev == data->device);
|
||||
+ dev = data->device;
|
||||
+ pa_assert(dev);
|
||||
+
|
||||
+ if (context->ucm_device) {
|
||||
+ dev_name = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME);
|
||||
+ ucm_dev_name = pa_proplist_gets(context->ucm_device->proplist, PA_ALSA_PROP_UCM_NAME);
|
||||
+ if (!pa_streq(dev_name, ucm_dev_name)) {
|
||||
+ pa_log_error("Failed to set port %s with wrong UCM context: %s", dev_name, ucm_dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
return ucm_device_enable(ucm, dev);
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
||||
95
pulseaudio/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch
Normal file
95
pulseaudio/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch
Normal file
@@ -0,0 +1,95 @@
|
||||
From f5cacd94abcc47003bd88ad7ca1450de649ffb15 Mon Sep 17 00:00:00 2001
|
||||
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
Date: Thu, 30 Nov 2023 20:17:22 +0300
|
||||
Subject: [PATCH] alsa-ucm: Check UCM verb before working with device status
|
||||
|
||||
Some versions of the ALSA libraries run into a segmentation fault when
|
||||
we query a UCM device/modifier status without first setting a UCM verb.
|
||||
It's not a reasonable thing to do anyway, so check for this case and
|
||||
return an error. Also do the check in other helpers.
|
||||
|
||||
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/801>
|
||||
---
|
||||
src/modules/alsa/alsa-ucm.c | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
|
||||
index bb9438f79..7f5136249 100644
|
||||
--- a/src/modules/alsa/alsa-ucm.c
|
||||
+++ b/src/modules/alsa/alsa-ucm.c
|
||||
@@ -624,6 +624,11 @@ static long ucm_device_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev)
|
||||
char *devstatus;
|
||||
long status = 0;
|
||||
|
||||
+ if (!ucm->active_verb) {
|
||||
+ pa_log_error("Failed to get status for UCM device %s: no UCM verb set", dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
devstatus = pa_sprintf_malloc("_devstatus/%s", dev_name);
|
||||
if (snd_use_case_geti(ucm->ucm_mgr, devstatus, &status) < 0) {
|
||||
pa_log_debug("Failed to get status for UCM device %s", dev_name);
|
||||
@@ -637,6 +642,11 @@ static long ucm_device_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev)
|
||||
static int ucm_device_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) {
|
||||
const char *dev_name = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME);
|
||||
|
||||
+ if (!ucm->active_verb) {
|
||||
+ pa_log_error("Failed to disable UCM device %s: no UCM verb set", dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* If any of dev's conflicting devices is enabled, trying to disable
|
||||
* dev gives an error despite the fact that it's already disabled.
|
||||
* Check that dev is enabled to avoid this error. */
|
||||
@@ -657,6 +667,11 @@ static int ucm_device_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev)
|
||||
static int ucm_device_enable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_device *dev) {
|
||||
const char *dev_name = pa_proplist_gets(dev->proplist, PA_ALSA_PROP_UCM_NAME);
|
||||
|
||||
+ if (!ucm->active_verb) {
|
||||
+ pa_log_error("Failed to enable UCM device %s: no UCM verb set", dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* We don't need to enable devices that are already enabled */
|
||||
if (ucm_device_status(ucm, dev) > 0) {
|
||||
pa_log_debug("UCM device %s is already enabled", dev_name);
|
||||
@@ -707,6 +722,11 @@ static long ucm_modifier_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *m
|
||||
char *modstatus;
|
||||
long status = 0;
|
||||
|
||||
+ if (!ucm->active_verb) {
|
||||
+ pa_log_error("Failed to get status for UCM modifier %s: no UCM verb set", mod_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
modstatus = pa_sprintf_malloc("_modstatus/%s", mod_name);
|
||||
if (snd_use_case_geti(ucm->ucm_mgr, modstatus, &status) < 0) {
|
||||
pa_log_debug("Failed to get status for UCM modifier %s", mod_name);
|
||||
@@ -720,6 +740,11 @@ static long ucm_modifier_status(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *m
|
||||
static int ucm_modifier_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *mod) {
|
||||
const char *mod_name = pa_proplist_gets(mod->proplist, PA_ALSA_PROP_UCM_NAME);
|
||||
|
||||
+ if (!ucm->active_verb) {
|
||||
+ pa_log_error("Failed to disable UCM modifier %s: no UCM verb set", mod_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* We don't need to disable modifiers that are already disabled */
|
||||
if (ucm_modifier_status(ucm, mod) == 0) {
|
||||
pa_log_debug("UCM modifier %s is already disabled", mod_name);
|
||||
@@ -738,6 +763,11 @@ static int ucm_modifier_disable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *m
|
||||
static int ucm_modifier_enable(pa_alsa_ucm_config *ucm, pa_alsa_ucm_modifier *mod) {
|
||||
const char *mod_name = pa_proplist_gets(mod->proplist, PA_ALSA_PROP_UCM_NAME);
|
||||
|
||||
+ if (!ucm->active_verb) {
|
||||
+ pa_log_error("Failed to disable UCM modifier %s: no UCM verb set", mod_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
/* We don't need to enable modifiers that are already enabled */
|
||||
if (ucm_modifier_status(ucm, mod) > 0) {
|
||||
pa_log_debug("UCM modifier %s is already enabled", mod_name);
|
||||
--
|
||||
GitLab
|
||||
|
||||
10
pulseaudio/pulseaudio-autostart-meson.build.patch
Normal file
10
pulseaudio/pulseaudio-autostart-meson.build.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- ./src/daemon/meson.build.orig 2021-07-27 15:02:27.738868200 -0500
|
||||
+++ ./src/daemon/meson.build 2021-08-09 13:15:24.344941127 -0500
|
||||
@@ -38,6 +38,7 @@
|
||||
if x11_dep.found()
|
||||
conf = configuration_data()
|
||||
conf.set('PACTL_BINARY', join_paths(bindir, 'pactl'))
|
||||
+ conf.set('PA_BINARY', join_paths(bindir, 'pulseaudio'))
|
||||
|
||||
configure_file(
|
||||
input : 'start-pulseaudio-x11.in',
|
||||
13
pulseaudio/pulseaudio-autostart.patch
Normal file
13
pulseaudio/pulseaudio-autostart.patch
Normal file
@@ -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
|
||||
164
pulseaudio/pulseaudio.SlackBuild
Executable file
164
pulseaudio/pulseaudio.SlackBuild
Executable file
@@ -0,0 +1,164 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Slackware build script for pulseaudio
|
||||
|
||||
# Copyright 2015 Christoph Willing Brisbane, Australia
|
||||
# Copyright 2016, 2018, 2020, 2024 Patrick J. Volkerding, Sebeka, MN, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=pulseaudio
|
||||
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
BUILD=${BUILD:-4}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
cd $TMP
|
||||
rm -rf $PKGNAM-$VERSION
|
||||
tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
|
||||
cd $PKGNAM-$VERSION || exit 1
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \+ -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \+
|
||||
|
||||
cat $CWD/030_posix-completion.diff | patch -p0 --verbose || exit 1
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1234710
|
||||
cat $CWD/0001-client-conf-Add-allow-autospawn-for-root.patch | patch -p1 --verbose || exit 1
|
||||
cat $CWD/0002-allow-autospawn-for-root-default.diff | patch -p1 --verbose || exit 1
|
||||
|
||||
# Do not log a warning every time root uses PulseAudio:
|
||||
cat $CWD/0003-no-root-warn.diff | patch -p1 --verbose || exit 1
|
||||
|
||||
sed -i -e '/@PA_BINARY@/ imkdir -p \$HOME/.config/pulse' src/daemon/start-pulseaudio-x11.in
|
||||
echo "X-MATE-Autostart-Phase=Initialization" >> src/daemon/pulseaudio.desktop.in
|
||||
|
||||
# If autospawn isn't working, start-pulseaudio-x11 should start it manually:
|
||||
cat $CWD/pulseaudio-autostart.patch | patch -p1 --verbose || exit 1
|
||||
# When built by meson, this patch also required to fix the above issue:
|
||||
cat $CWD/pulseaudio-autostart-meson.build.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Fix 17.0 regressions:
|
||||
cat $CWD/ed3d4f0837f670e5e5afb1afa5bcfc8ff05d3407.patch | patch -p1 --verbose || exit 1
|
||||
cat $CWD/f5cacd94abcc47003bd88ad7ca1450de649ffb15.patch | patch -p1 --verbose || exit 1
|
||||
|
||||
# Configure, build, and install:
|
||||
export CFLAGS="$SLKCFLAGS"
|
||||
export CXXFLAGS="$SLKCFLAGS"
|
||||
mkdir meson-build
|
||||
cd meson-build
|
||||
meson setup \
|
||||
--prefix=/usr \
|
||||
--libdir=lib${LIBDIRSUFFIX} \
|
||||
--libexecdir=/usr/libexec \
|
||||
--bindir=/usr/bin \
|
||||
--sbindir=/usr/sbin \
|
||||
--includedir=/usr/include \
|
||||
--datadir=/usr/share \
|
||||
--mandir=/usr/man \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--buildtype=release \
|
||||
-Dorc=enabled \
|
||||
-Dgsettings=enabled \
|
||||
-Dhal-compat=false \
|
||||
-Dsystem_user="pulse" \
|
||||
-Dsystem_group="pulse" \
|
||||
-Daccess_group="audio" \
|
||||
-Dbashcompletiondir="/usr/share/bash-completion/completions" \
|
||||
.. || exit 1
|
||||
"${NINJA:=ninja}" $NUMJOBS || exit 1
|
||||
DESTDIR=$PKG $NINJA install || exit 1
|
||||
cd ..
|
||||
|
||||
# Strip binaries:
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
|
||||
# Move dbus configs to system location:
|
||||
mkdir -p $PKG/usr/share/dbus-1/system.d/
|
||||
mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d/
|
||||
rmdir --parents $PKG/etc/dbus-1/system.d/
|
||||
|
||||
# Move config files to .new:
|
||||
for f in $( find $PKG/etc/pulse/ -type f ) ; do mv $f $f.new ; done
|
||||
mv $PKG/etc/xdg/autostart/pulseaudio.desktop $PKG/etc/xdg/autostart/pulseaudio.desktop.new
|
||||
|
||||
# Add an init script for system wide mode. You shouldn't use this, but we'll
|
||||
# still let you if you really want.
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
cp $CWD/rc.pulseaudio $PKG/etc/rc.d/rc.pulseaudio.new
|
||||
chmod 644 $PKG/etc/rc.d/rc.pulseaudio.new
|
||||
chown root:root $PKG/etc/rc.d/rc.pulseaudio.new
|
||||
|
||||
# Compress and link manpages:
|
||||
find $PKG/usr/man -type f -exec gzip -9 {} \+
|
||||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
|
||||
# Install documentation:
|
||||
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
|
||||
cp -a \
|
||||
COPYING* *GPL LICENSE README* \
|
||||
$PKG/usr/doc/$PKGNAM-$VERSION
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
|
||||
1
pulseaudio/pulseaudio.url
Normal file
1
pulseaudio/pulseaudio.url
Normal file
@@ -0,0 +1 @@
|
||||
http://freedesktop.org/software/pulseaudio/releases/
|
||||
48
pulseaudio/rc.pulseaudio
Normal file
48
pulseaudio/rc.pulseaudio
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start/stop/restart PulseAudio in system mode.
|
||||
# In this mode, a single system instance of PulseAudio will be shared by
|
||||
# multiple local users.
|
||||
#
|
||||
# Please note: this is not generally the best way to use PulseAudio!
|
||||
# Normally pulseaudio will start automatically as-needed with an instance
|
||||
# per audio user. Unless you really need to use system mode you should leave
|
||||
# this script non-executable.
|
||||
#
|
||||
# For more information, see:
|
||||
# http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide
|
||||
|
||||
pulse_start() {
|
||||
if [ -x /usr/bin/pulseaudio ]; then
|
||||
echo "Starting system PulseAudio daemon: /usr/bin/pulseaudio --system --disallow-module-loading &"
|
||||
rm -rf /var/lib/pulse
|
||||
# Any errors/warnings will go to the log files:
|
||||
/usr/bin/pulseaudio --system --disallow-module-loading 1> /dev/null 2> /dev/null &
|
||||
fi
|
||||
}
|
||||
|
||||
pulse_stop() {
|
||||
echo "Stopping PulseAudio: /bin/killall pulseaudio"
|
||||
/bin/killall pulseaudio 2> /dev/null
|
||||
}
|
||||
|
||||
pulse_restart() {
|
||||
pulse_stop
|
||||
sleep 1
|
||||
pulse_start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
pulse_start
|
||||
;;
|
||||
'stop')
|
||||
pulse_stop
|
||||
;;
|
||||
'restart')
|
||||
pulse_restart
|
||||
;;
|
||||
*)
|
||||
echo "usage $0 start|stop|restart"
|
||||
esac
|
||||
|
||||
19
pulseaudio/slack-desc
Normal file
19
pulseaudio/slack-desc
Normal file
@@ -0,0 +1,19 @@
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description.
|
||||
# Line up the first '|' above the ':' following the base package name, and
|
||||
# the '|' on the right side marks the last column you can put a character in.
|
||||
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
pulseaudio: pulseaudio (PulseAudio sound server)
|
||||
pulseaudio:
|
||||
pulseaudio: Pulseaudio is a networked low-latency sound server intended to be an
|
||||
pulseaudio: improved replacement for the Enlightened Sound Daemon (EsounD).
|
||||
pulseaudio:
|
||||
pulseaudio: Homepage: http://www.pulseaudio.org
|
||||
pulseaudio:
|
||||
pulseaudio:
|
||||
pulseaudio:
|
||||
pulseaudio:
|
||||
pulseaudio:
|
||||
Reference in New Issue
Block a user