mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
pulseaudio: load only requred modules, add default dbus policy
This commit is contained in:
parent
150c18761d
commit
07d58321b7
33
packages/audio/pulseaudio/config/pulseaudio-system.conf
Normal file
33
packages/audio/pulseaudio/config/pulseaudio-system.conf
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?><!--*-nxml-*-->
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
|
||||
<!--
|
||||
This file is part of PulseAudio.
|
||||
|
||||
PulseAudio is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
PulseAudio is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<busconfig>
|
||||
|
||||
<!-- System-wide PulseAudio runs as 'root' user. This fragment is
|
||||
not necessary for user PulseAudio instances. -->
|
||||
|
||||
<policy user="root">
|
||||
<allow own="org.pulseaudio.Server"/>
|
||||
<allow send_destination="org.pulseaudio.Server"/>
|
||||
<allow receive_sender="org.pulseaudio.Server"/>
|
||||
</policy>
|
||||
|
||||
</busconfig>
|
@ -55,6 +55,12 @@ load-module module-suspend-on-idle
|
||||
### Enable positioned event sounds
|
||||
load-module module-position-event-sounds
|
||||
|
||||
|
||||
### Automatically load modules for dbus
|
||||
.ifexists module-dbus-protocol.so
|
||||
load-module module-dbus-protocol
|
||||
.endif
|
||||
|
||||
### Automatically load modules for bluetooth
|
||||
.ifexists module-bluetooth-policy.so
|
||||
load-module module-bluetooth-policy
|
||||
@ -66,9 +72,11 @@ load-module module-position-event-sounds
|
||||
|
||||
.ifexists module-zeroconf-publish.so
|
||||
load-module module-zeroconf-publish
|
||||
.endif
|
||||
|
||||
.ifexists module-zeroconf-discover.so
|
||||
load-module module-zeroconf-discover
|
||||
.endif
|
||||
|
||||
load-module module-native-protocol-tcp auth-anonymous=1
|
||||
load-module module-switch-on-connect
|
||||
|
||||
|
@ -98,12 +98,6 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-silent-rules \
|
||||
--with-module-dir=/usr/lib/pulse"
|
||||
|
||||
post_makeinstall_target() {
|
||||
# add_user pulse x 499 498 "PulseAudio System Daemon" "/var/run/pulse" "/bin/sh"
|
||||
# add_group pulse 498
|
||||
# add_group pulse-access 497
|
||||
|
||||
sed -e 's%user="pulse"%user="root"%g' -i $INSTALL/etc/dbus-1/system.d/pulseaudio-system.conf
|
||||
|
||||
rm -rf $INSTALL/usr/bin/esdcompat
|
||||
rm -rf $INSTALL/usr/include
|
||||
rm -rf $INSTALL/usr/lib/cmake
|
||||
@ -114,6 +108,7 @@ post_makeinstall_target() {
|
||||
rm -rf $INSTALL/usr/share/bash-completion
|
||||
|
||||
cp $PKG_DIR/config/system.pa $INSTALL/etc/pulse/
|
||||
cp $PKG_DIR/config/pulseaudio-system.conf $INSTALL/etc/dbus-1/system.d/
|
||||
|
||||
# Remove unwanted symlinks
|
||||
for file in $INSTALL/*; do
|
||||
|
@ -1 +0,0 @@
|
||||
export SDL_AUDIODRIVER=pulse
|
@ -1,15 +1,10 @@
|
||||
[Unit]
|
||||
Description=PulseAudio Sound System
|
||||
After=syslog.target local-fs.target
|
||||
Requires=bluetooth.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/pulseaudio --start --daemonize --log-level=0
|
||||
TimeoutStopSec=5
|
||||
ExecStart=/usr/bin/pulseaudio --system
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user