Hello community, here is the log from the commit of package pulseaudio checked in at Fri Nov 28 15:53:08 CET 2008. -------- --- pulseaudio/pulseaudio.changes 2008-11-19 13:16:25.000000000 +0100 +++ pulseaudio/pulseaudio.changes 2008-11-24 12:05:15.000000000 +0100 @@ -1,0 +2,7 @@ +Mon Nov 24 11:42:43 CET 2008 - rodrigo@novell.com + +- Use /etc/alsa-pulse.conf for ALSA when enabling PulseAudio, as we + already do in GNOME, instead of touching /etc/alsa.conf +- Don't run the script if user is not root (bnc#445997) + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pulseaudio.spec ++++++ --- /var/tmp/diff_new_pack.O17776/_old 2008-11-28 15:52:24.000000000 +0100 +++ /var/tmp/diff_new_pack.O17776/_new 2008-11-28 15:52:24.000000000 +0100 @@ -22,7 +22,7 @@ %define drvver 0.9 Summary: A Networked Sound Server Version: 0.9.12 -Release: 8 +Release: 9 License: GPL v2 or later; LGPL v2.1 or later Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 @@ -548,6 +548,10 @@ %{_mandir}/man1/pax11publish.1.gz %changelog +* Mon Nov 24 2008 rodrigo@novell.com +- Use /etc/alsa-pulse.conf for ALSA when enabling PulseAudio, as we + already do in GNOME, instead of touching /etc/alsa.conf +- Don't run the script if user is not root (bnc#445997) * Wed Nov 19 2008 rodrigo@novell.com - Some fixes in setup-pulseaudio script (bnc#445015) * Wed Nov 19 2008 rodrigo@novell.com ++++++ setup-pulseaudio ++++++ --- /var/tmp/diff_new_pack.O17776/_old 2008-11-28 15:52:25.000000000 +0100 +++ /var/tmp/diff_new_pack.O17776/_new 2008-11-28 15:52:25.000000000 +0100 @@ -9,60 +9,27 @@ 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" exit } +check_root() { + id=`id -u` + if [ "x$id" = "x0" ]; then + true + else + echo "You need to be root in order to enable/disable pulseaudio" + false + fi +} + enable_alsa() { echo "Enabling PulseAudio for ALSA..." - # Add PCM PA device - if test -f /etc/asound.conf; then - if grep pcm.pulse /etc/asound.conf; then - echo "pcm.pulse device already in /etc/asound.conf" - else - echo "" >> /etc/asound.conf - echo "pcm.pulse {" >> /etc/asound.conf - echo " type pulse" >> /etc/asound.conf - echo "}" >> /etc/asound.conf - fi - - # Add CTL PA device - if grep ctl.pulse /etc/asound.conf; then - echo "ctl.pulse device already in /etc/asound.conf" - else - echo "" >> /etc/asound.conf - echo "ctl.pulse {" >> /etc/asound.conf - echo " type pulse" >> /etc/asound.conf - echo "}" >> /etc/asound.conf - fi + if grep "ALSA_CONFIG_PATH" /etc/environment; then + echo "PulseAudio config for ALSA already in use" else - echo "" >> /etc/asound.conf - echo "pcm.pulse {" >> /etc/asound.conf - echo " type pulse" >> /etc/asound.conf - echo "}" >> /etc/asound.conf - - echo "" >> /etc/asound.conf - echo "ctl.pulse {" >> /etc/asound.conf - echo " type pulse" >> /etc/asound.conf - echo "}" >> /etc/asound.conf - fi - - # Now set the default devices - if grep "pcm.!default" /etc/asound.conf; then - echo "" - else - echo "" >> /etc/asound.conf - echo "pcm.!default {" >> /etc/asound.conf - echo " type pulse" >> /etc/asound.conf - echo "}" >> /etc/asound.conf - fi - - if grep "ctl.!default" /etc/asound.conf; then - echo "" - else - echo "" >> /etc/asound.conf - echo "ctl.!default {" >> /etc/asound.conf - echo " type pulse" >> /etc/asound.conf - echo "}" >> /etc/asound.conf + echo "ALSA_CONFIG_PATH=/etc/alsa-pulse.conf" >> /etc/environment fi } @@ -116,7 +83,7 @@ echo "Enabling PulseAudio for SDL..." # For SDL, we just add an environment variable, so that apps use the PA audio driver if grep SDL_AUDIODRIVER /etc/environment; then - sed s/SDL_AUDIODRIVER*/SDL_AUDIODRIVER=pulse /etc/environment + echo "SDL already setup to use PulseAudio" else echo "SDL_AUDIODRIVER=pulse" >> /etc/environment fi @@ -140,8 +107,7 @@ disable_alsa() { echo "Disabling PulseAudio for ALSA..." - # FIXME: perl -pi -e ... - echo "" + perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment } disable_libao() { @@ -174,7 +140,7 @@ disable_sdl() { echo "Disabling PulseAudio for SDL..." if grep "SDL_AUDIODRIVER=pulse" /etc/environment; then - sed s/SDL_AUDIODRIVER=pulse// /etc/environment + perl -pi -e "s|SDL_AUDIODRIVER=pulse||g;" /etc/environment fi } @@ -191,6 +157,7 @@ case $1 in --enable) + check_root || exit ENABLE=1 enable_alsa enable_libao @@ -202,6 +169,7 @@ enable_xine ;; --disable) + check_root || exit ENABLE=0 disable_alsa disable_libao @@ -241,4 +209,4 @@ fi fi -/sbin/SuSEconfig \ No newline at end of file +/sbin/SuSEconfig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org