From 1c2d75a448481c8bbcc427a06f010e93459f1a382d91ec662d21b34f6a9ebbad Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 1 Oct 2009 14:54:18 +0000 Subject: [PATCH] Accepting request 21254 from home:llunak:branches:multimedia:libs Copy from home:llunak:branches:multimedia:libs/pulseaudio via accept of submit request 21254 revision 2. Request was accepted with message: thanks OBS-URL: https://build.opensuse.org/request/show/21254 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=23 --- disabled-start.diff | 15 +++++++++++++++ pulseaudio.changes | 5 +++++ pulseaudio.spec | 2 ++ setup-pulseaudio | 22 +++++++++++++++++++++- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 disabled-start.diff diff --git a/disabled-start.diff b/disabled-start.diff new file mode 100644 index 0000000..276d605 --- /dev/null +++ b/disabled-start.diff @@ -0,0 +1,15 @@ +--- src/daemon/start-pulseaudio-x11.in.sav 2009-06-08 00:35:57.000000000 +0200 ++++ src/daemon/start-pulseaudio-x11.in 2009-09-28 19:33:07.388014651 +0200 +@@ -19,6 +19,12 @@ + + set -e + ++. /etc/sysconfig/sound ++ ++if [ x"$PULSEAUDIO_ENABLE" = x"no" ] ; then ++ exit 1 ++fi ++ + [ -z "$PULSE_SERVER" ] + + @PA_BINARY@ --start "$@" diff --git a/pulseaudio.changes b/pulseaudio.changes index 889034e..3595573 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 28 17:36:58 UTC 2009 - llunak@novell.com + +- make 'setup-pulseaudio --disable' actually really disable PA (bnc#537780) + ------------------------------------------------------------------- Thu Sep 24 16:43:16 UTC 2009 - sreeves@novell.com diff --git a/pulseaudio.spec b/pulseaudio.spec index 7894c3f..6b02888 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -28,6 +28,7 @@ Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 Source1: default.pa-for-gdm Source2: setup-pulseaudio +Patch1: disabled-start.diff Url: http://pulseaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: alsa-devel @@ -239,6 +240,7 @@ This package contains GDM integration hooks for the PulseAudio sound server. %lang_package %prep %setup -q -T -b0 +%patch1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" diff --git a/setup-pulseaudio b/setup-pulseaudio index a2a489d..d9df611 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -105,6 +105,15 @@ enable_xine() { echo "" } +enable_autospawn() { + echo "Enabling PulseAudio autospawn..." + if grep -q ^autospawn /etc/pulse/client.conf; then + perl -pi -e "s|^autospawn.*|autospawn = yes|g;" /etc/pulse/client.conf + else + echo "autospawn = yes" >> /etc/pulse/client.conf + fi +} + disable_alsa() { echo "Disabling PulseAudio for ALSA..." perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment @@ -155,6 +164,15 @@ disable_xine() { echo "" } +disable_autospawn() { + echo "Disabling PulseAudio autospawn..." + if grep -q ^autospawn /etc/pulse/client.conf; then + perl -pi -e "s|^autospawn.*|autospawn = no|g;" /etc/pulse/client.conf + else + echo "autospawn = no" >> /etc/pulse/client.conf + fi +} + case $1 in --enable) check_root || exit @@ -167,6 +185,7 @@ case $1 in enable_sdl enable_timidity enable_xine + enable_autospawn ;; --disable) check_root || exit @@ -179,6 +198,7 @@ case $1 in disable_sdl disable_timidity disable_xine + disable_autospawn ;; --status) STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"` @@ -195,7 +215,7 @@ case $1 in esac # Now, update /etc/sysconfig/sound with the PA status -if grep PULSEAUDIO_ENABLE /etc/sysconfig/sound; then +if grep -q PULSEAUDIO_ENABLE /etc/sysconfig/sound; then if [ "x$ENABLE" = "x1" ]; then perl -pi -e "s|PULSEAUDIO_ENABLE=\"no\"|PULSEAUDIO_ENABLE=\"yes\"|g;" /etc/sysconfig/sound else