From 130ec52377562489576199da7a574226a61a3437bec9dd2b27cf6ea3e546c2bb Mon Sep 17 00:00:00 2001 From: Scott Reeves Date: Thu, 11 Mar 2010 01:11:35 +0000 Subject: [PATCH 1/5] Accepting request 34582 from home:sreeves1:branches:multimedia:libs Copy from home:sreeves1:branches:multimedia:libs/pulseaudio via accept of submit request 34582 revision 2. Request was accepted with message: OBS-URL: https://build.opensuse.org/request/show/34582 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=42 --- ...e-that-we-chmod-only-the-dir-we-ours.patch | 89 +++++++++++++++++++ pulseaudio.changes | 6 ++ pulseaudio.spec | 2 + 3 files changed, 97 insertions(+) create mode 100644 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch diff --git a/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch b/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch new file mode 100644 index 0000000..5e7ad01 --- /dev/null +++ b/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch @@ -0,0 +1,89 @@ +From d3efa43d85ac132c6a5a416a2b6f2115f5d577ee Mon Sep 17 00:00:00 2001 +From: Kees Cook +Date: Tue, 2 Mar 2010 21:33:34 -0800 +Subject: [PATCH] core-util: ensure that we chmod only the dir we ourselves created + +--- + configure.ac | 2 +- + src/pulsecore/core-util.c | 39 ++++++++++++++++++++++++++++++++++----- + 2 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1b80788..abcce13 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -424,7 +424,7 @@ AC_CHECK_FUNCS_ONCE([lrintf strtof]) + AC_FUNC_FORK + AC_FUNC_GETGROUPS + AC_FUNC_SELECT_ARGTYPES +-AC_CHECK_FUNCS_ONCE([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \ ++AC_CHECK_FUNCS_ONCE([chmod chown fstat fchown fchmod clock_gettime getaddrinfo getgrgid_r getgrnam_r \ + getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \ + pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \ + sigaction sleep sysconf pthread_setaffinity_np]) +diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c +index d6017b9..a642553 100644 +--- a/src/pulsecore/core-util.c ++++ b/src/pulsecore/core-util.c +@@ -199,7 +199,7 @@ void pa_make_fd_cloexec(int fd) { + /** Creates a directory securely */ + int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { + struct stat st; +- int r, saved_errno; ++ int r, saved_errno, fd; + + pa_assert(dir); + +@@ -217,16 +217,45 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { + if (r < 0 && errno != EEXIST) + return -1; + +-#ifdef HAVE_CHOWN ++#ifdef HAVE_FSTAT ++ if ((fd = open(dir, ++#ifdef O_CLOEXEC ++ O_CLOEXEC| ++#endif ++#ifdef O_NOCTTY ++ O_NOCTTY| ++#endif ++#ifdef O_NOFOLLOW ++ O_NOFOLLOW| ++#endif ++ O_RDONLY)) < 0) ++ goto fail; ++ ++ if (fstat(fd, &st) < 0) { ++ pa_assert_se(pa_close(fd) >= 0); ++ goto fail; ++ } ++ ++ if (!S_ISDIR(st.st_mode)) { ++ pa_assert_se(pa_close(fd) >= 0); ++ errno = EEXIST; ++ goto fail; ++ } ++ ++#ifdef HAVE_FCHOWN + if (uid == (uid_t)-1) + uid = getuid(); + if (gid == (gid_t)-1) + gid = getgid(); +- (void) chown(dir, uid, gid); ++ (void) fchown(fd, uid, gid); ++#endif ++ ++#ifdef HAVE_FCHMOD ++ (void) fchmod(fd, m); + #endif + +-#ifdef HAVE_CHMOD +- chmod(dir, m); ++ pa_assert_se(pa_close(fd) >= 0); ++ + #endif + + #ifdef HAVE_LSTAT +-- +1.6.0.2 + diff --git a/pulseaudio.changes b/pulseaudio.changes index de3722c..a78552a 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 8 22:24:00 UTC 2010 - sreeves@novell.com + +- Add 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch + Fix bnc#584938 - chmod only the dir we ourselves created. + ------------------------------------------------------------------- Mon Mar 1 21:26:48 UTC 2010 - sreeves@novell.com diff --git a/pulseaudio.spec b/pulseaudio.spec index 5d50d4d..4daa933 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -92,6 +92,7 @@ Patch59: 0059-alsa-reset-max_rewind-max_request-while-suspending.patch Patch60: 0060-core-util-introduce-generic-function-pa_strip.patch Patch61: 0061-esd-simple-use-pa_memblockq_pop_missing.patch Patch62: 0062-core-rework-how-stream-volumes-affect-sink-volumes.patch +Patch63: 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch Url: http://pulseaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: alsa-devel @@ -364,6 +365,7 @@ This package contains GDM integration hooks for the PulseAudio sound server. %patch60 -p1 %patch61 -p1 %patch62 -p1 +%patch63 -p1 %build autoreconf From a5c306cbd421fa24455e1568b7833d586b274a92465059d4f031681a8742350f Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 18 Mar 2010 15:23:31 +0000 Subject: [PATCH 2/5] Updating link to change in openSUSE:Factory/pulseaudio revision 57.0 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=f4a719fb10d01a9ec6bd230a97084525 --- ready | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ready diff --git a/ready b/ready deleted file mode 100644 index 473a0f4..0000000 From 511fc63bab2bf5fd3e3f4aaaadc4e1315d007948d0042058ecd87c9f75c67567 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Wed, 31 Mar 2010 13:41:56 +0000 Subject: [PATCH 3/5] Accepting request 35933 from home:perosb:branches:multimedia:libs Copy from home:perosb:branches:multimedia:libs/pulseaudio via accept of submit request 35933 revision 2. Request was accepted with message: Forwarding to openSUSE:Factory OBS-URL: https://build.opensuse.org/request/show/35933 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=43 --- pulseaudio.changes | 5 +++++ setup-pulseaudio | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/pulseaudio.changes b/pulseaudio.changes index a78552a..ec7c00c 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 29 07:10:31 UTC 2010 - per@osbeck.com + +- add support for phonon in setup-pulseaudio + ------------------------------------------------------------------- Mon Mar 8 22:24:00 UTC 2010 - sreeves@novell.com diff --git a/setup-pulseaudio b/setup-pulseaudio index 3fd8dd4..d9db659 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -25,6 +25,11 @@ check_root() { fi } +enable_phonon() { + echo "Enabling PulseAudio for Phonon..." + perl -pi -e "s|PHONON_PULSEAUDIO_DISABLE=1||g;" /etc/environment +} + enable_alsa() { echo "Enabling PulseAudio for ALSA..." if grep "ALSA_CONFIG_PATH" /etc/environment; then @@ -125,6 +130,15 @@ disable_alsa() { perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment } +disable_phonon() { + echo "Disabling PulseAudio for Phonon..." + if grep "PHONON_PULSEAUDIO_DISABLE" /etc/environment; then + echo "PulseAudio config for Phonon already in use" + else + echo "PHONON_PULSEAUDIO_DISABLE=1" >> /etc/environment + fi +} + disable_libao() { if test -f /etc/libao.conf; then echo "Disabling PulseAudio for libao..." @@ -199,6 +213,7 @@ case $1 in enable_timidity enable_xine enable_autospawn + enable_phonon ;; --disable) check_root || exit @@ -212,6 +227,7 @@ case $1 in disable_timidity disable_xine disable_autospawn + disable_phonon ;; --status) STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"` From 9ce9e344ef48893010d862eb630e04fb533fb4ee056805cf9219204b5a65dcf3 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 1 Apr 2010 01:09:25 +0000 Subject: [PATCH 4/5] Accepting request 36441 from multimedia:libs checked in (request 36441) OBS-URL: https://build.opensuse.org/request/show/36441 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=44 --- ...e-that-we-chmod-only-the-dir-we-ours.patch | 89 ------------------- pulseaudio.changes | 11 --- pulseaudio.spec | 2 - setup-pulseaudio | 16 ---- 4 files changed, 118 deletions(-) delete mode 100644 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch diff --git a/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch b/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch deleted file mode 100644 index 5e7ad01..0000000 --- a/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch +++ /dev/null @@ -1,89 +0,0 @@ -From d3efa43d85ac132c6a5a416a2b6f2115f5d577ee Mon Sep 17 00:00:00 2001 -From: Kees Cook -Date: Tue, 2 Mar 2010 21:33:34 -0800 -Subject: [PATCH] core-util: ensure that we chmod only the dir we ourselves created - ---- - configure.ac | 2 +- - src/pulsecore/core-util.c | 39 ++++++++++++++++++++++++++++++++++----- - 2 files changed, 35 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 1b80788..abcce13 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -424,7 +424,7 @@ AC_CHECK_FUNCS_ONCE([lrintf strtof]) - AC_FUNC_FORK - AC_FUNC_GETGROUPS - AC_FUNC_SELECT_ARGTYPES --AC_CHECK_FUNCS_ONCE([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \ -+AC_CHECK_FUNCS_ONCE([chmod chown fstat fchown fchmod clock_gettime getaddrinfo getgrgid_r getgrnam_r \ - getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \ - pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \ - sigaction sleep sysconf pthread_setaffinity_np]) -diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c -index d6017b9..a642553 100644 ---- a/src/pulsecore/core-util.c -+++ b/src/pulsecore/core-util.c -@@ -199,7 +199,7 @@ void pa_make_fd_cloexec(int fd) { - /** Creates a directory securely */ - int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { - struct stat st; -- int r, saved_errno; -+ int r, saved_errno, fd; - - pa_assert(dir); - -@@ -217,16 +217,45 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { - if (r < 0 && errno != EEXIST) - return -1; - --#ifdef HAVE_CHOWN -+#ifdef HAVE_FSTAT -+ if ((fd = open(dir, -+#ifdef O_CLOEXEC -+ O_CLOEXEC| -+#endif -+#ifdef O_NOCTTY -+ O_NOCTTY| -+#endif -+#ifdef O_NOFOLLOW -+ O_NOFOLLOW| -+#endif -+ O_RDONLY)) < 0) -+ goto fail; -+ -+ if (fstat(fd, &st) < 0) { -+ pa_assert_se(pa_close(fd) >= 0); -+ goto fail; -+ } -+ -+ if (!S_ISDIR(st.st_mode)) { -+ pa_assert_se(pa_close(fd) >= 0); -+ errno = EEXIST; -+ goto fail; -+ } -+ -+#ifdef HAVE_FCHOWN - if (uid == (uid_t)-1) - uid = getuid(); - if (gid == (gid_t)-1) - gid = getgid(); -- (void) chown(dir, uid, gid); -+ (void) fchown(fd, uid, gid); -+#endif -+ -+#ifdef HAVE_FCHMOD -+ (void) fchmod(fd, m); - #endif - --#ifdef HAVE_CHMOD -- chmod(dir, m); -+ pa_assert_se(pa_close(fd) >= 0); -+ - #endif - - #ifdef HAVE_LSTAT --- -1.6.0.2 - diff --git a/pulseaudio.changes b/pulseaudio.changes index ec7c00c..de3722c 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Mon Mar 29 07:10:31 UTC 2010 - per@osbeck.com - -- add support for phonon in setup-pulseaudio - -------------------------------------------------------------------- -Mon Mar 8 22:24:00 UTC 2010 - sreeves@novell.com - -- Add 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch - Fix bnc#584938 - chmod only the dir we ourselves created. - ------------------------------------------------------------------- Mon Mar 1 21:26:48 UTC 2010 - sreeves@novell.com diff --git a/pulseaudio.spec b/pulseaudio.spec index 4daa933..5d50d4d 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -92,7 +92,6 @@ Patch59: 0059-alsa-reset-max_rewind-max_request-while-suspending.patch Patch60: 0060-core-util-introduce-generic-function-pa_strip.patch Patch61: 0061-esd-simple-use-pa_memblockq_pop_missing.patch Patch62: 0062-core-rework-how-stream-volumes-affect-sink-volumes.patch -Patch63: 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch Url: http://pulseaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: alsa-devel @@ -365,7 +364,6 @@ This package contains GDM integration hooks for the PulseAudio sound server. %patch60 -p1 %patch61 -p1 %patch62 -p1 -%patch63 -p1 %build autoreconf diff --git a/setup-pulseaudio b/setup-pulseaudio index d9db659..3fd8dd4 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -25,11 +25,6 @@ check_root() { fi } -enable_phonon() { - echo "Enabling PulseAudio for Phonon..." - perl -pi -e "s|PHONON_PULSEAUDIO_DISABLE=1||g;" /etc/environment -} - enable_alsa() { echo "Enabling PulseAudio for ALSA..." if grep "ALSA_CONFIG_PATH" /etc/environment; then @@ -130,15 +125,6 @@ disable_alsa() { perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment } -disable_phonon() { - echo "Disabling PulseAudio for Phonon..." - if grep "PHONON_PULSEAUDIO_DISABLE" /etc/environment; then - echo "PulseAudio config for Phonon already in use" - else - echo "PHONON_PULSEAUDIO_DISABLE=1" >> /etc/environment - fi -} - disable_libao() { if test -f /etc/libao.conf; then echo "Disabling PulseAudio for libao..." @@ -213,7 +199,6 @@ case $1 in enable_timidity enable_xine enable_autospawn - enable_phonon ;; --disable) check_root || exit @@ -227,7 +212,6 @@ case $1 in disable_timidity disable_xine disable_autospawn - disable_phonon ;; --status) STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"` From 7e5288ea57bdd0140bb335debe0c48e9637ec7aa4c1fa455348e024a39fab857 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 1 Apr 2010 01:09:27 +0000 Subject: [PATCH 5/5] Updating link to change in openSUSE:Factory/pulseaudio revision 58.0 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=c6b196b9055dc86d39e2432b8d7154c9 --- ...e-that-we-chmod-only-the-dir-we-ours.patch | 89 +++++++++++++++++++ pulseaudio.changes | 11 +++ pulseaudio.spec | 4 +- setup-pulseaudio | 16 ++++ 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch diff --git a/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch b/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch new file mode 100644 index 0000000..5e7ad01 --- /dev/null +++ b/0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch @@ -0,0 +1,89 @@ +From d3efa43d85ac132c6a5a416a2b6f2115f5d577ee Mon Sep 17 00:00:00 2001 +From: Kees Cook +Date: Tue, 2 Mar 2010 21:33:34 -0800 +Subject: [PATCH] core-util: ensure that we chmod only the dir we ourselves created + +--- + configure.ac | 2 +- + src/pulsecore/core-util.c | 39 ++++++++++++++++++++++++++++++++++----- + 2 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1b80788..abcce13 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -424,7 +424,7 @@ AC_CHECK_FUNCS_ONCE([lrintf strtof]) + AC_FUNC_FORK + AC_FUNC_GETGROUPS + AC_FUNC_SELECT_ARGTYPES +-AC_CHECK_FUNCS_ONCE([chmod chown clock_gettime getaddrinfo getgrgid_r getgrnam_r \ ++AC_CHECK_FUNCS_ONCE([chmod chown fstat fchown fchmod clock_gettime getaddrinfo getgrgid_r getgrnam_r \ + getpwnam_r getpwuid_r gettimeofday getuid inet_ntop inet_pton mlock nanosleep \ + pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \ + sigaction sleep sysconf pthread_setaffinity_np]) +diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c +index d6017b9..a642553 100644 +--- a/src/pulsecore/core-util.c ++++ b/src/pulsecore/core-util.c +@@ -199,7 +199,7 @@ void pa_make_fd_cloexec(int fd) { + /** Creates a directory securely */ + int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { + struct stat st; +- int r, saved_errno; ++ int r, saved_errno, fd; + + pa_assert(dir); + +@@ -217,16 +217,45 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { + if (r < 0 && errno != EEXIST) + return -1; + +-#ifdef HAVE_CHOWN ++#ifdef HAVE_FSTAT ++ if ((fd = open(dir, ++#ifdef O_CLOEXEC ++ O_CLOEXEC| ++#endif ++#ifdef O_NOCTTY ++ O_NOCTTY| ++#endif ++#ifdef O_NOFOLLOW ++ O_NOFOLLOW| ++#endif ++ O_RDONLY)) < 0) ++ goto fail; ++ ++ if (fstat(fd, &st) < 0) { ++ pa_assert_se(pa_close(fd) >= 0); ++ goto fail; ++ } ++ ++ if (!S_ISDIR(st.st_mode)) { ++ pa_assert_se(pa_close(fd) >= 0); ++ errno = EEXIST; ++ goto fail; ++ } ++ ++#ifdef HAVE_FCHOWN + if (uid == (uid_t)-1) + uid = getuid(); + if (gid == (gid_t)-1) + gid = getgid(); +- (void) chown(dir, uid, gid); ++ (void) fchown(fd, uid, gid); ++#endif ++ ++#ifdef HAVE_FCHMOD ++ (void) fchmod(fd, m); + #endif + +-#ifdef HAVE_CHMOD +- chmod(dir, m); ++ pa_assert_se(pa_close(fd) >= 0); ++ + #endif + + #ifdef HAVE_LSTAT +-- +1.6.0.2 + diff --git a/pulseaudio.changes b/pulseaudio.changes index de3722c..ec7c00c 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon Mar 29 07:10:31 UTC 2010 - per@osbeck.com + +- add support for phonon in setup-pulseaudio + +------------------------------------------------------------------- +Mon Mar 8 22:24:00 UTC 2010 - sreeves@novell.com + +- Add 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch + Fix bnc#584938 - chmod only the dir we ourselves created. + ------------------------------------------------------------------- Mon Mar 1 21:26:48 UTC 2010 - sreeves@novell.com diff --git a/pulseaudio.spec b/pulseaudio.spec index 5d50d4d..cfce81a 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -22,7 +22,7 @@ Name: pulseaudio Summary: A Networked Sound Server Version: 0.9.21 -Release: 3 +Release: 4 License: LGPLv2.1+ Group: System/Sound Daemons Source: %{name}-%{version}.tar.bz2 @@ -92,6 +92,7 @@ Patch59: 0059-alsa-reset-max_rewind-max_request-while-suspending.patch Patch60: 0060-core-util-introduce-generic-function-pa_strip.patch Patch61: 0061-esd-simple-use-pa_memblockq_pop_missing.patch Patch62: 0062-core-rework-how-stream-volumes-affect-sink-volumes.patch +Patch63: 0063-core-util-ensure-that-we-chmod-only-the-dir-we-ours.patch Url: http://pulseaudio.org BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: alsa-devel @@ -364,6 +365,7 @@ This package contains GDM integration hooks for the PulseAudio sound server. %patch60 -p1 %patch61 -p1 %patch62 -p1 +%patch63 -p1 %build autoreconf diff --git a/setup-pulseaudio b/setup-pulseaudio index 3fd8dd4..d9db659 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -25,6 +25,11 @@ check_root() { fi } +enable_phonon() { + echo "Enabling PulseAudio for Phonon..." + perl -pi -e "s|PHONON_PULSEAUDIO_DISABLE=1||g;" /etc/environment +} + enable_alsa() { echo "Enabling PulseAudio for ALSA..." if grep "ALSA_CONFIG_PATH" /etc/environment; then @@ -125,6 +130,15 @@ disable_alsa() { perl -pi -e "s|ALSA_CONFIG_PATH=/etc/alsa-pulse.conf||g;" /etc/environment } +disable_phonon() { + echo "Disabling PulseAudio for Phonon..." + if grep "PHONON_PULSEAUDIO_DISABLE" /etc/environment; then + echo "PulseAudio config for Phonon already in use" + else + echo "PHONON_PULSEAUDIO_DISABLE=1" >> /etc/environment + fi +} + disable_libao() { if test -f /etc/libao.conf; then echo "Disabling PulseAudio for libao..." @@ -199,6 +213,7 @@ case $1 in enable_timidity enable_xine enable_autospawn + enable_phonon ;; --disable) check_root || exit @@ -212,6 +227,7 @@ case $1 in disable_timidity disable_xine disable_autospawn + disable_phonon ;; --status) STATUS=`grep PULSEAUDIO_ENABLE /etc/sysconfig/sound | cut -f2 -d= | cut -f2 -d\"`