From 1f50d2c672b02b6557198e39dd6ca6a28d868fa49867dc8c22ffa6a29e1d8d08 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 2 Nov 2009 09:38:19 +0000 Subject: [PATCH 1/5] Accepting request 23382 from home:lnussel:branches:openSUSE:Factory Copy from home:lnussel:branches:openSUSE:Factory/pulseaudio via accept of submit request 23382 revision 2. Request was accepted with message: reviewed ok. OBS-URL: https://build.opensuse.org/request/show/23382 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=26 --- pulseaudio.changes | 6 ++++++ setup-pulseaudio | 53 +++++++++++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/pulseaudio.changes b/pulseaudio.changes index 92abb45..5cf2a68 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de + +- clean up and fix setup-pulseaudio to not corrupt /etc/environment + (bnc#547384) + ------------------------------------------------------------------- Tue Oct 6 19:10:19 UTC 2009 - sreeves@novell.com diff --git a/setup-pulseaudio b/setup-pulseaudio index d9df611..65aaa1e 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -5,12 +5,13 @@ LIST_OF_OSS_APPS="aumix sox" show_help() { echo "setup-pulseaudio [ --enable | --disable | --status ]" echo "" - echo "Sets up PulseAudio configuration for all sound-based applications" + echo "Modifies configuration files of some applications for PulseAudio" echo " --enable Enables PulseAudio" echo " --disable Disables PulseAudio" echo " --status Shows activation state (disabled or enabled) for PulseAudio" echo "" echo "You need to be root for this command to succeed" + echo "You may need to re-login for changes to take effect" exit } @@ -48,27 +49,28 @@ enable_libao() { enable_mplayer() { echo "Enabling PulseAudio for mplayer..." - # Maybe it would be better to just add a alias mplayer=mplayer -ao pulse to /etc/environment? if test -f /etc/mplayer/mplayer.conf; then - if grep "ao=pulse" /etc/mplayer/mplayer.conf; then - echo "Default driver is pulse already in /etc/mplayer/mplayer.conf" + if grep -q '^ao=' /etc/mplayer/mplayer.conf; then + perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/pulse/client.conf else - echo "" + echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi - else - echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi # FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf } enable_openal() { - echo "Enabling PulseAudio for openal..." - # FIXME: openal uses ~/.openalrc - echo "" + # nothing to do here. openal-soft is patched to prefer pulse but + # it won't autostart the daemon. + return 0 } enable_oss() { + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + echo "Enabling PulseAudio for OSS..." for app in $LIST_OF_OSS_APPS; do if grep "alias $app=padsp $app" /etc/environment; then @@ -90,6 +92,10 @@ enable_sdl() { } enable_timidity() { + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + echo "Enabling PulseAudio for Timidity..." # Use esound output for timidity if grep "alias timidity=timidity -Oe" /etc/environment; then @@ -100,9 +106,9 @@ enable_timidity() { } enable_xine() { - echo "Enabling PulseAudio for Xine..." + #echo "Enabling PulseAudio for Xine..." # FIXME: xine uses $HOME/.xine/config - echo "" + return 0 } enable_autospawn() { @@ -120,27 +126,30 @@ disable_alsa() { } disable_libao() { - echo "Disabling PulseAudio for libao..." if test -f /etc/libao.conf; then + echo "Disabling PulseAudio for libao..." perl -pi -e "s|default_driver=pulse||g;" /etc/libao.conf fi } disable_mplayer() { - echo "Disabling PulseAudio for mplayer..." if test -f /etc/mplayer/mplayer.conf; then + echo "Disabling PulseAudio for mplayer..." perl -pi -e "s|ao=pulse||g;" /etc/mplayer/mplayer.conf fi } disable_openal() { - echo "Disabling PulseAudio for openal..." - # FIXME: openal uses ~/.openalrc - echo "" + # nothing to do here. openal-soft is patched to prefer pulse but + # it won't autostart the daemon. + return 0 } disable_oss() { - echo "Disabling PulseAudio for OSS..." + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + for app in $LIST_OF_OSS_APPS; do perl -pi -e "s|alias $app=padsp $app||g;" /etc/environment done @@ -154,14 +163,18 @@ disable_sdl() { } disable_timidity() { + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + echo "Disabling PulseAudio for Timidity..." perl -pi -e "s|alias timidity=timidity -Oe||g;" /etc/environment } disable_xine() { - echo "Disabling PulseAudio for Xine..." + #echo "Disabling PulseAudio for Xine..." # FIXME: xine uses $HOME/.xine/config - echo "" + return 0 } disable_autospawn() { From 5f9567af59a07d6139540919c6744b1fc297b50ad345a3985ebeeb323edc43c1 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Mon, 2 Nov 2009 15:09:36 +0000 Subject: [PATCH 2/5] checked in OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=27 --- pulseaudio.changes | 6 ------ setup-pulseaudio | 53 +++++++++++++++++----------------------------- 2 files changed, 20 insertions(+), 39 deletions(-) diff --git a/pulseaudio.changes b/pulseaudio.changes index 5cf2a68..92abb45 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de - -- clean up and fix setup-pulseaudio to not corrupt /etc/environment - (bnc#547384) - ------------------------------------------------------------------- Tue Oct 6 19:10:19 UTC 2009 - sreeves@novell.com diff --git a/setup-pulseaudio b/setup-pulseaudio index 65aaa1e..d9df611 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -5,13 +5,12 @@ LIST_OF_OSS_APPS="aumix sox" show_help() { echo "setup-pulseaudio [ --enable | --disable | --status ]" echo "" - echo "Modifies configuration files of some applications for PulseAudio" + echo "Sets up PulseAudio configuration for all sound-based applications" echo " --enable Enables PulseAudio" echo " --disable Disables PulseAudio" echo " --status Shows activation state (disabled or enabled) for PulseAudio" echo "" echo "You need to be root for this command to succeed" - echo "You may need to re-login for changes to take effect" exit } @@ -49,28 +48,27 @@ enable_libao() { enable_mplayer() { echo "Enabling PulseAudio for mplayer..." + # Maybe it would be better to just add a alias mplayer=mplayer -ao pulse to /etc/environment? if test -f /etc/mplayer/mplayer.conf; then - if grep -q '^ao=' /etc/mplayer/mplayer.conf; then - perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/pulse/client.conf + if grep "ao=pulse" /etc/mplayer/mplayer.conf; then + echo "Default driver is pulse already in /etc/mplayer/mplayer.conf" else - echo "ao=pulse" >> /etc/mplayer/mplayer.conf + echo "" fi + else + echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi # FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf } enable_openal() { - # nothing to do here. openal-soft is patched to prefer pulse but - # it won't autostart the daemon. - return 0 + echo "Enabling PulseAudio for openal..." + # FIXME: openal uses ~/.openalrc + echo "" } enable_oss() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - echo "Enabling PulseAudio for OSS..." for app in $LIST_OF_OSS_APPS; do if grep "alias $app=padsp $app" /etc/environment; then @@ -92,10 +90,6 @@ enable_sdl() { } enable_timidity() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - echo "Enabling PulseAudio for Timidity..." # Use esound output for timidity if grep "alias timidity=timidity -Oe" /etc/environment; then @@ -106,9 +100,9 @@ enable_timidity() { } enable_xine() { - #echo "Enabling PulseAudio for Xine..." + echo "Enabling PulseAudio for Xine..." # FIXME: xine uses $HOME/.xine/config - return 0 + echo "" } enable_autospawn() { @@ -126,30 +120,27 @@ disable_alsa() { } disable_libao() { + echo "Disabling PulseAudio for libao..." if test -f /etc/libao.conf; then - echo "Disabling PulseAudio for libao..." perl -pi -e "s|default_driver=pulse||g;" /etc/libao.conf fi } disable_mplayer() { + echo "Disabling PulseAudio for mplayer..." if test -f /etc/mplayer/mplayer.conf; then - echo "Disabling PulseAudio for mplayer..." perl -pi -e "s|ao=pulse||g;" /etc/mplayer/mplayer.conf fi } disable_openal() { - # nothing to do here. openal-soft is patched to prefer pulse but - # it won't autostart the daemon. - return 0 + echo "Disabling PulseAudio for openal..." + # FIXME: openal uses ~/.openalrc + echo "" } disable_oss() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - + echo "Disabling PulseAudio for OSS..." for app in $LIST_OF_OSS_APPS; do perl -pi -e "s|alias $app=padsp $app||g;" /etc/environment done @@ -163,18 +154,14 @@ disable_sdl() { } disable_timidity() { - # this is broken. /etc/environment must only contain environment - # variables. It's not a shell script - return 0 - echo "Disabling PulseAudio for Timidity..." perl -pi -e "s|alias timidity=timidity -Oe||g;" /etc/environment } disable_xine() { - #echo "Disabling PulseAudio for Xine..." + echo "Disabling PulseAudio for Xine..." # FIXME: xine uses $HOME/.xine/config - return 0 + echo "" } disable_autospawn() { From 7b3ee47cade8afc57c7f84b9d7191ed82160ebfc6e196f5b8897f5f0b3f58909 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 5 Nov 2009 17:23:10 +0000 Subject: [PATCH 3/5] Accepting request 23807 from home:sreeves1:branches:multimedia:libs Copy from home:sreeves1:branches:multimedia:libs/pulseaudio via accept of submit request 23807 revision 2. Request was accepted with message: reviewed ok. OBS-URL: https://build.opensuse.org/request/show/23807 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=28 --- pulseaudio.changes | 11 ++++++++++ pulseaudio.spec | 2 +- setup-pulseaudio | 53 +++++++++++++++++++++++++++++----------------- 3 files changed, 45 insertions(+), 21 deletions(-) diff --git a/pulseaudio.changes b/pulseaudio.changes index 92abb45..334d28d 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Nov 3 20:06:20 UTC 2009 - sreeves@novell.com + +- Fix mplayer section of setup-pulseaudio. bnc#547384 + +------------------------------------------------------------------- +Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de + +- clean up and fix setup-pulseaudio to not corrupt /etc/environment + (bnc#547384) + ------------------------------------------------------------------- Tue Oct 6 19:10:19 UTC 2009 - sreeves@novell.com diff --git a/pulseaudio.spec b/pulseaudio.spec index 6d19b5f..d78612e 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -22,7 +22,7 @@ Name: pulseaudio Summary: A Networked Sound Server Version: 0.9.19 -Release: 1 +Release: 2 License: LGPL v2.1 or later Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 diff --git a/setup-pulseaudio b/setup-pulseaudio index d9df611..3fd8dd4 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -5,12 +5,13 @@ LIST_OF_OSS_APPS="aumix sox" show_help() { echo "setup-pulseaudio [ --enable | --disable | --status ]" echo "" - echo "Sets up PulseAudio configuration for all sound-based applications" + echo "Modifies configuration files of some applications for PulseAudio" echo " --enable Enables PulseAudio" echo " --disable Disables PulseAudio" echo " --status Shows activation state (disabled or enabled) for PulseAudio" echo "" echo "You need to be root for this command to succeed" + echo "You may need to re-login for changes to take effect" exit } @@ -48,27 +49,28 @@ enable_libao() { enable_mplayer() { echo "Enabling PulseAudio for mplayer..." - # Maybe it would be better to just add a alias mplayer=mplayer -ao pulse to /etc/environment? if test -f /etc/mplayer/mplayer.conf; then - if grep "ao=pulse" /etc/mplayer/mplayer.conf; then - echo "Default driver is pulse already in /etc/mplayer/mplayer.conf" + if grep -q '^ao=' /etc/mplayer/mplayer.conf; then + perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/mplayer/mplayer.conf else - echo "" + echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi - else - echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi # FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf } enable_openal() { - echo "Enabling PulseAudio for openal..." - # FIXME: openal uses ~/.openalrc - echo "" + # nothing to do here. openal-soft is patched to prefer pulse but + # it won't autostart the daemon. + return 0 } enable_oss() { + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + echo "Enabling PulseAudio for OSS..." for app in $LIST_OF_OSS_APPS; do if grep "alias $app=padsp $app" /etc/environment; then @@ -90,6 +92,10 @@ enable_sdl() { } enable_timidity() { + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + echo "Enabling PulseAudio for Timidity..." # Use esound output for timidity if grep "alias timidity=timidity -Oe" /etc/environment; then @@ -100,9 +106,9 @@ enable_timidity() { } enable_xine() { - echo "Enabling PulseAudio for Xine..." + #echo "Enabling PulseAudio for Xine..." # FIXME: xine uses $HOME/.xine/config - echo "" + return 0 } enable_autospawn() { @@ -120,27 +126,30 @@ disable_alsa() { } disable_libao() { - echo "Disabling PulseAudio for libao..." if test -f /etc/libao.conf; then + echo "Disabling PulseAudio for libao..." perl -pi -e "s|default_driver=pulse||g;" /etc/libao.conf fi } disable_mplayer() { - echo "Disabling PulseAudio for mplayer..." if test -f /etc/mplayer/mplayer.conf; then + echo "Disabling PulseAudio for mplayer..." perl -pi -e "s|ao=pulse||g;" /etc/mplayer/mplayer.conf fi } disable_openal() { - echo "Disabling PulseAudio for openal..." - # FIXME: openal uses ~/.openalrc - echo "" + # nothing to do here. openal-soft is patched to prefer pulse but + # it won't autostart the daemon. + return 0 } disable_oss() { - echo "Disabling PulseAudio for OSS..." + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + for app in $LIST_OF_OSS_APPS; do perl -pi -e "s|alias $app=padsp $app||g;" /etc/environment done @@ -154,14 +163,18 @@ disable_sdl() { } disable_timidity() { + # this is broken. /etc/environment must only contain environment + # variables. It's not a shell script + return 0 + echo "Disabling PulseAudio for Timidity..." perl -pi -e "s|alias timidity=timidity -Oe||g;" /etc/environment } disable_xine() { - echo "Disabling PulseAudio for Xine..." + #echo "Disabling PulseAudio for Xine..." # FIXME: xine uses $HOME/.xine/config - echo "" + return 0 } disable_autospawn() { From 7525680670306261a1160c0baba4fd79cb8cb32201f28c86e73fd343019288cd Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 10 Nov 2009 09:09:43 +0000 Subject: [PATCH 4/5] checked in OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=29 --- pulseaudio.changes | 5 ----- setup-pulseaudio | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/pulseaudio.changes b/pulseaudio.changes index 334d28d..5cf2a68 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Tue Nov 3 20:06:20 UTC 2009 - sreeves@novell.com - -- Fix mplayer section of setup-pulseaudio. bnc#547384 - ------------------------------------------------------------------- Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de diff --git a/setup-pulseaudio b/setup-pulseaudio index 3fd8dd4..65aaa1e 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -51,7 +51,7 @@ enable_mplayer() { echo "Enabling PulseAudio for mplayer..." if test -f /etc/mplayer/mplayer.conf; then if grep -q '^ao=' /etc/mplayer/mplayer.conf; then - perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/mplayer/mplayer.conf + perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/pulse/client.conf else echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi From a3eee53de5d10c7d144962d19d70599eca723b00052c4c59f2b4d4cdc5a5097f Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 10 Nov 2009 09:09:45 +0000 Subject: [PATCH 5/5] Updating link to change in openSUSE:Factory/pulseaudio revision 53.0 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=8f49b81a37c6498b0e9112ae5245c8d3 --- pulseaudio.changes | 5 +++++ pulseaudio.spec | 2 +- setup-pulseaudio | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pulseaudio.changes b/pulseaudio.changes index 5cf2a68..334d28d 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 3 20:06:20 UTC 2009 - sreeves@novell.com + +- Fix mplayer section of setup-pulseaudio. bnc#547384 + ------------------------------------------------------------------- Thu Oct 29 09:33:55 UTC 2009 - lnussel@suse.de diff --git a/pulseaudio.spec b/pulseaudio.spec index d78612e..ed149cc 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -22,7 +22,7 @@ Name: pulseaudio Summary: A Networked Sound Server Version: 0.9.19 -Release: 2 +Release: 3 License: LGPL v2.1 or later Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 diff --git a/setup-pulseaudio b/setup-pulseaudio index 65aaa1e..3fd8dd4 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -51,7 +51,7 @@ enable_mplayer() { echo "Enabling PulseAudio for mplayer..." if test -f /etc/mplayer/mplayer.conf; then if grep -q '^ao=' /etc/mplayer/mplayer.conf; then - perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/pulse/client.conf + perl -pi -e "s|^ao=.*|ao=pulse|g;" /etc/mplayer/mplayer.conf else echo "ao=pulse" >> /etc/mplayer/mplayer.conf fi