diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-07-18 22:22:05 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-07-18 22:22:05 +0000 |
commit | 7a903b42adf03d55712d2523d740a65887f754cf (patch) | |
tree | 78f7e682793ec183f1c2bcb1caf25d270ffc0a71 /media-sound | |
parent | Stable on ppc, too. (diff) | |
download | gentoo-2-7a903b42adf03d55712d2523d740a65887f754cf.tar.gz gentoo-2-7a903b42adf03d55712d2523d740a65887f754cf.tar.bz2 gentoo-2-7a903b42adf03d55712d2523d740a65887f754cf.zip |
Split pulseaudio access in pulse-access group, as suggested by upstream, use a different script to initialise system-wide pulseaudio, so that the default is the same as in other distributions and in vanilla, allowing users to set the system-wide mode if they want, disable module loading at runtime for systemwide setup, and explain everythign in a postinst message.
(Portage version: 2.1.1_pre3-r1)
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/pulseaudio/ChangeLog | 10 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/pulseaudio.conf.d | 2 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/pulseaudio.init.d | 13 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.2.ebuild | 22 |
4 files changed, 36 insertions, 11 deletions
diff --git a/media-sound/pulseaudio/ChangeLog b/media-sound/pulseaudio/ChangeLog index e74ba0580944..bacc20c6ff6b 100644 --- a/media-sound/pulseaudio/ChangeLog +++ b/media-sound/pulseaudio/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for media-sound/pulseaudio # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.7 2006/07/18 17:43:40 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.8 2006/07/18 22:22:05 flameeyes Exp $ + + 18 Jul 2006; Diego Pettenò <flameeyes@gentoo.org> + files/pulseaudio.conf.d, files/pulseaudio.init.d, pulseaudio-0.9.2.ebuild: + Split pulseaudio access in pulse-access group, as suggested by upstream, use + a different script to initialise system-wide pulseaudio, so that the default + is the same as in other distributions and in vanilla, allowing users to set + the system-wide mode if they want, disable module loading at runtime for + systemwide setup, and explain everythign in a postinst message. 18 Jul 2006; Diego Pettenò <flameeyes@gentoo.org> +files/pulseaudio-0.9.2-moduledetect.patch, pulseaudio-0.9.2.ebuild: diff --git a/media-sound/pulseaudio/files/pulseaudio.conf.d b/media-sound/pulseaudio/files/pulseaudio.conf.d index 01521ede4aee..9e7245344a57 100644 --- a/media-sound/pulseaudio/files/pulseaudio.conf.d +++ b/media-sound/pulseaudio/files/pulseaudio.conf.d @@ -3,4 +3,4 @@ # For more see "pulseaudio -h". # Startup options -PA_OPTS="--log-target=syslog" +PA_OPTS="--log-target=syslog --disallow-module-loading=1" diff --git a/media-sound/pulseaudio/files/pulseaudio.init.d b/media-sound/pulseaudio/files/pulseaudio.init.d index 08dbadfe2f57..d039bf5443f2 100644 --- a/media-sound/pulseaudio/files/pulseaudio.init.d +++ b/media-sound/pulseaudio/files/pulseaudio.init.d @@ -10,13 +10,18 @@ depend() { start() { ebegin "Starting pulseaudio" HOME=/var/run/pulse + + PA_ALL_OPTS="${PA_OPTS} --fail=1 --daemonize=1 --use-pid-file=0 + -n -F /etc/pulse/system.pa" start-stop-daemon --start --chuid pulse:pulse \ - --exec /usr/bin/pulseaudio -- ${PA_OPTS} --fail=true -D + --exec /usr/bin/pulseaudio -- ${PA_ALL_OPTS} eend $? - chgrp -R audio /var/run/pulse - chmod 0750 /var/run/pulse - chmod 0660 /var/run/pulse/native + if [[ -S /var/run/pulse/native ]]; then + chgrp -R pulse-access /var/run/pulse + chmod 0750 /var/run/pulse + chmod 0660 /var/run/pulse/native + fi } stop() { diff --git a/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild index d8924d3e6b6e..003f002f47b4 100644 --- a/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild +++ b/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild,v 1.5 2006/07/18 17:43:39 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.2.ebuild,v 1.6 2006/07/18 22:22:05 flameeyes Exp $ inherit eutils libtool autotools @@ -41,6 +41,7 @@ pkg_setup() { fi enewgroup audio 18 # Just make sure it exists + enewgroup pulse-access enewgroup pulse enewuser pulse -1 -1 /var/run/pulse pulse,audio } @@ -103,12 +104,23 @@ src_install() { # - use socket at /var/run/pulse/native # - enable anonymous access (relies on filesystem-level access to the socket) # - changes the dafault server path for the clients - sed -i -e '/load-module module-native-protocol-unix/s:$: auth-anonymous=1 socket=/var/run/pulse/native:' \ - "${D}/etc/pulse/default.pa" - sed -i -e '/default-server/d' "${D}/etc/pulse/client.conf" + sed -e '/load-module module-native-protocol-unix/s:$: auth-anonymous=1 socket=/var/run/pulse/native:' \ + "${D}/etc/pulse/default.pa" > "${D}/etc/pulse/system.pa" + cp "${D}"/etc/pulse/client.conf{,.system} + sed -i -e '/default-server/d' "${D}/etc/pulse/client.conf.system" echo "default-server = unix:/var/run/pulse/native" >> \ - "${D}/etc/pulse/client.conf" + "${D}/etc/pulse/client.conf.system" dohtml -r doc dodoc README doc/todo } + +pkg_postinst() { + elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon." + elog "This support is enabled by starting the pulsedaemon init.d and is configured" + elog "to read the settings from /etc/pulse/system.pa ." + elog "To be able to use that global daemon, you need also to replace the configuration" + elog "file /etc/pulse/client.conf with the copy in /etc/pulse/client.conf.system" + elog "(or to put it in your ~/.pulse/client.conf)." + elog "To be able to access that you need to be in the group pulse-access." +} |