forked from pool/pulseaudio
Accepting request 666499 from home:tiwai:branches:multimedia:libs
- Enable systemd user socket for activating PA (bsc#1083473) - Disable auto-spawn along with the change above OBS-URL: https://build.opensuse.org/request/show/666499 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=198
This commit is contained in:
parent
b1c18aae0d
commit
b0bac42ba6
1
client-system.conf
Normal file
1
client-system.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
autospawn = no
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 15 12:46:45 CET 2019 - tiwai@suse.de
|
||||||
|
|
||||||
|
- Enable systemd user socket for activating PA (bsc#1083473)
|
||||||
|
- Disable auto-spawn along with the change above
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 18 11:34:25 CET 2018 - tiwai@suse.de
|
Sun Nov 18 11:34:25 CET 2018 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ Source5: pulseaudio.service
|
|||||||
Source6: disable_flat_volumes.conf
|
Source6: disable_flat_volumes.conf
|
||||||
Source7: pulseaudio.tmpfiles
|
Source7: pulseaudio.tmpfiles
|
||||||
Source8: pulseaudio-gdm-hooks.tmpfiles
|
Source8: pulseaudio-gdm-hooks.tmpfiles
|
||||||
|
Source9: client-system.conf
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
Patch0: disabled-start.diff
|
Patch0: disabled-start.diff
|
||||||
Patch1: suppress-socket-error-msg.diff
|
Patch1: suppress-socket-error-msg.diff
|
||||||
@ -368,7 +369,8 @@ export CFLAGS="%{optflags} -fPIE"
|
|||||||
--enable-gconf \
|
--enable-gconf \
|
||||||
--enable-gsettings \
|
--enable-gsettings \
|
||||||
--with-udev-rules-dir=%{_udevrulesdir} \
|
--with-udev-rules-dir=%{_udevrulesdir} \
|
||||||
--with-pulsedsp-location='%{_prefix}/\\$$LIB/pulseaudio'
|
--with-pulsedsp-location='%{_prefix}/\\$$LIB/pulseaudio' \
|
||||||
|
--with-systemduserunitdir=%{_userunitdir}
|
||||||
|
|
||||||
make %{?_smp_mflags} V=1
|
make %{?_smp_mflags} V=1
|
||||||
make %{?_smp_mflags} doxygen
|
make %{?_smp_mflags} doxygen
|
||||||
@ -383,6 +385,7 @@ rm -rf \
|
|||||||
# configure --disable-static had no effect; delete manually.
|
# configure --disable-static had no effect; delete manually.
|
||||||
rm -rf "%{buildroot}%{_libdir}"/*.a
|
rm -rf "%{buildroot}%{_libdir}"/*.a
|
||||||
|
|
||||||
|
# system-wide service (optional)
|
||||||
install -D -m 0644 %{SOURCE5} %{buildroot}%{_libexecdir}/systemd/system/%{name}.service
|
install -D -m 0644 %{SOURCE5} %{buildroot}%{_libexecdir}/systemd/system/%{name}.service
|
||||||
mkdir -p %{buildroot}%{_sbindir}
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
@ -414,11 +417,10 @@ install -m 0644 %{SOURCE4} %{buildroot}/%{_fwdefdir}/pulseaudio-server
|
|||||||
%endif
|
%endif
|
||||||
# create .d conf dirs (since 8.0)
|
# create .d conf dirs (since 8.0)
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/pulse/client.conf.d
|
mkdir -p %{buildroot}%{_sysconfdir}/pulse/client.conf.d
|
||||||
|
install -m 0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pulse/client.conf.d/50-system.conf
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/pulse/daemon.conf.d
|
mkdir -p %{buildroot}%{_sysconfdir}/pulse/daemon.conf.d
|
||||||
# Install disable_flat_volumes.conf
|
# Install disable_flat_volumes.conf
|
||||||
install -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pulse/daemon.conf.d
|
install -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pulse/daemon.conf.d/60-disable_flat_volumes.conf
|
||||||
# created by setup-pulseaudio script
|
|
||||||
touch %{buildroot}%{_sysconfdir}/pulse/client.conf.d/50-system.conf
|
|
||||||
%fdupes doxygen/html
|
%fdupes doxygen/html
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -428,18 +430,37 @@ getent group pulse-access >/dev/null || groupadd -r pulse-access
|
|||||||
getent group audio | grep pulse >/dev/null || usermod -a -G audio pulse
|
getent group audio | grep pulse >/dev/null || usermod -a -G audio pulse
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post -n libpulse%{soname} -p /sbin/ldconfig
|
|
||||||
%postun -n libpulse%{soname} -p /sbin/ldconfig
|
|
||||||
%post -n libpulse-mainloop-glib%{soname} -p /sbin/ldconfig
|
|
||||||
%postun -n libpulse-mainloop-glib%{soname} -p /sbin/ldconfig
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%tmpfiles_create pulseaudio.conf
|
%tmpfiles_create pulseaudio.conf
|
||||||
%{fillup_only -an sound}
|
%{fillup_only -an sound}
|
||||||
|
if [ ! -f /etc/systemd/user/sockets.target.wants/%{name}.socket ]; then
|
||||||
|
echo "Switching PulseAudio activation using systemd user socket."
|
||||||
|
echo "Please log out from all sessions once to make it effective."
|
||||||
|
fi
|
||||||
|
%systemd_user_post pulseaudio.socket
|
||||||
|
# FIXME: workaround to make sure the user socket symlink creation (bsc#1083473)
|
||||||
|
if [ ! -f /etc/systemd/user/sockets.target.wants/%{name}.socket ]; then
|
||||||
|
# below should work once when preset is defined properly:
|
||||||
|
# /usr/bin/systemctl --no-reload --global preset pulseaudio.socket
|
||||||
|
mkdir -p /etc/systemd/user/sockets.target.wants
|
||||||
|
ln -s %{_userunitdir}/%{name}.socket /etc/systemd/user/sockets.target.wants/%{name}.socket
|
||||||
|
fi
|
||||||
# Update the /etc/profile.d/pulseaudio.* files
|
# Update the /etc/profile.d/pulseaudio.* files
|
||||||
setup-pulseaudio --auto > /dev/null
|
setup-pulseaudio --auto > /dev/null
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%preun
|
||||||
|
%systemd_user_preun pulseaudio.socket
|
||||||
|
|
||||||
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
%systemd_user_postun pulseaudio.socket
|
||||||
|
|
||||||
|
%post -n libpulse%{soname} -p /sbin/ldconfig
|
||||||
|
%postun -n libpulse%{soname} -p /sbin/ldconfig
|
||||||
|
%post -n libpulse-mainloop-glib%{soname} -p /sbin/ldconfig
|
||||||
|
%postun -n libpulse-mainloop-glib%{soname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%pre system-wide
|
%pre system-wide
|
||||||
%service_add_pre pulseaudio.service
|
%service_add_pre pulseaudio.service
|
||||||
exit 0
|
exit 0
|
||||||
@ -562,16 +583,16 @@ exit 0
|
|||||||
%{_mandir}/man5/pulse-cli-syntax.5*
|
%{_mandir}/man5/pulse-cli-syntax.5*
|
||||||
%dir %{_sysconfdir}/pulse/
|
%dir %{_sysconfdir}/pulse/
|
||||||
%dir %{_sysconfdir}/pulse/daemon.conf.d
|
%dir %{_sysconfdir}/pulse/daemon.conf.d
|
||||||
%config(noreplace) %{_sysconfdir}/pulse/daemon.conf.d/disable_flat_volumes.conf
|
%config %{_sysconfdir}/pulse/client.conf.d/50-system.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/pulse/daemon.conf.d/60-disable_flat_volumes.conf
|
||||||
%config(noreplace) %{_sysconfdir}/pulse/daemon.conf
|
%config(noreplace) %{_sysconfdir}/pulse/daemon.conf
|
||||||
%config(noreplace) %{_sysconfdir}/pulse/default.pa
|
%config(noreplace) %{_sysconfdir}/pulse/default.pa
|
||||||
%config(noreplace) %{_sysconfdir}/pulse/system.pa
|
%config(noreplace) %{_sysconfdir}/pulse/system.pa
|
||||||
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf
|
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf
|
||||||
# init
|
# init
|
||||||
%dir %{_libexecdir}/systemd
|
%dir %{_userunitdir}
|
||||||
%dir %{_libexecdir}/systemd/user
|
%{_userunitdir}/%{name}.service
|
||||||
%{_libexecdir}/systemd/user/%{name}.service
|
%{_userunitdir}/%{name}.socket
|
||||||
%{_libexecdir}/systemd/user/%{name}.socket
|
|
||||||
%{_prefix}/lib/tmpfiles.d/pulseaudio.conf
|
%{_prefix}/lib/tmpfiles.d/pulseaudio.conf
|
||||||
|
|
||||||
%if %{defined suse_version}
|
%if %{defined suse_version}
|
||||||
@ -580,7 +601,6 @@ exit 0
|
|||||||
# created by setup-pulseaudio script
|
# created by setup-pulseaudio script
|
||||||
%ghost %{_sysconfdir}/profile.d/pulseaudio.sh
|
%ghost %{_sysconfdir}/profile.d/pulseaudio.sh
|
||||||
%ghost %{_sysconfdir}/profile.d/pulseaudio.csh
|
%ghost %{_sysconfdir}/profile.d/pulseaudio.csh
|
||||||
%ghost %{_sysconfdir}/pulse/client.conf.d/50-system.conf
|
|
||||||
|
|
||||||
%files esound-compat
|
%files esound-compat
|
||||||
%{_bindir}/esdcompat
|
%{_bindir}/esdcompat
|
||||||
|
@ -208,6 +208,7 @@ enable_qemu () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enable_autospawn() {
|
enable_autospawn() {
|
||||||
|
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket && return
|
||||||
echo "Enabling PulseAudio autospawn..."
|
echo "Enabling PulseAudio autospawn..."
|
||||||
if grep -q ^autospawn $pulse_client_conf >/dev/null 2>&1; then
|
if grep -q ^autospawn $pulse_client_conf >/dev/null 2>&1; then
|
||||||
sed -i -e "s|^autospawn.*|autospawn = yes|g" $pulse_client_conf
|
sed -i -e "s|^autospawn.*|autospawn = yes|g" $pulse_client_conf
|
||||||
@ -316,6 +317,7 @@ disable_qemu () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable_autospawn() {
|
disable_autospawn() {
|
||||||
|
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket && return
|
||||||
echo "Disabling PulseAudio autospawn..."
|
echo "Disabling PulseAudio autospawn..."
|
||||||
if grep -q ^autospawn $pulse_client_conf >/dev/null 2>&1; then
|
if grep -q ^autospawn $pulse_client_conf >/dev/null 2>&1; then
|
||||||
sed -i -e "s|^autospawn.*|autospawn = no|g" $pulse_client_conf
|
sed -i -e "s|^autospawn.*|autospawn = no|g" $pulse_client_conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user