Accepting request 934559 from home:tiwai:branches:multimedia:libs
- Improving the handling with pipewire (bsc#1188516): * Split the setup script to a sub-package pulseaudio-setup to be shared with pipewire-pulseaudio package * Modified setup script to adapt pipewire-pulse OBS-URL: https://build.opensuse.org/request/show/934559 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=249
This commit is contained in:
parent
eaba00ef93
commit
e74fa2a5ac
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 23 10:52:47 CET 2021 - tiwai@suse.de
|
||||||
|
|
||||||
|
- Improving the handling with pipewire (bsc#1188516):
|
||||||
|
* Split the setup script to a sub-package pulseaudio-setup to be
|
||||||
|
shared with pipewire-pulseaudio package
|
||||||
|
* Modified setup script to adapt pipewire-pulse
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Nov 17 11:11:29 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
Wed Nov 17 11:11:29 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ Requires: udev >= 146
|
|||||||
Requires(pre): user(pulse)
|
Requires(pre): user(pulse)
|
||||||
## needs the same liborc version which was used to build against
|
## needs the same liborc version which was used to build against
|
||||||
%requires_eq liborc-0_4-0
|
%requires_eq liborc-0_4-0
|
||||||
Requires(post): %fillup_prereq
|
Requires(post): pulseaudio-setup
|
||||||
Recommends: alsa-plugins-pulse
|
Recommends: alsa-plugins-pulse
|
||||||
Suggests: libsoxr0 >= 0.1.1
|
Suggests: libsoxr0 >= 0.1.1
|
||||||
Conflicts: kernel < 2.6.31
|
Conflicts: kernel < 2.6.31
|
||||||
@ -118,6 +118,15 @@ pulseaudio is a networked sound server for Linux, other Unix like
|
|||||||
operating systems and Microsoft Windows. It is intended to be an
|
operating systems and Microsoft Windows. It is intended to be an
|
||||||
improved drop-in replacement for the Enlightened Sound Daemon (ESOUND).
|
improved drop-in replacement for the Enlightened Sound Daemon (ESOUND).
|
||||||
|
|
||||||
|
%package setup
|
||||||
|
Summary: Set-up script for PulseAudio
|
||||||
|
Group: System/Sound Daemons
|
||||||
|
Requires(post): %fillup_prereq
|
||||||
|
|
||||||
|
%description setup
|
||||||
|
This package contains a setup script for making PulseAudio working with
|
||||||
|
various applications.
|
||||||
|
|
||||||
%package module-lirc
|
%package module-lirc
|
||||||
Summary: LIRC module for PulseAudio
|
Summary: LIRC module for PulseAudio
|
||||||
Group: System/Sound Daemons
|
Group: System/Sound Daemons
|
||||||
@ -407,7 +416,6 @@ install -Dm0644 %{SOURCE10} %{buildroot}%{_sysusersdir}/system-user-pulse.conf
|
|||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%tmpfiles_create pulseaudio.conf
|
%tmpfiles_create pulseaudio.conf
|
||||||
%{fillup_only -an sound}
|
|
||||||
if [ ! -f /etc/systemd/user/sockets.target.wants/%{name}.socket ]; then
|
if [ ! -f /etc/systemd/user/sockets.target.wants/%{name}.socket ]; then
|
||||||
echo "Switching PulseAudio activation using systemd user socket."
|
echo "Switching PulseAudio activation using systemd user socket."
|
||||||
echo "Please log out from all sessions once to make it effective."
|
echo "Please log out from all sessions once to make it effective."
|
||||||
@ -451,6 +459,9 @@ exit 0
|
|||||||
%service_del_postun pulseaudio.service
|
%service_del_postun pulseaudio.service
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
%post setup
|
||||||
|
%{fillup_only -an sound}
|
||||||
|
|
||||||
%post gdm-hooks
|
%post gdm-hooks
|
||||||
%tmpfiles_create pulseaudio-gdm-hooks.conf
|
%tmpfiles_create pulseaudio-gdm-hooks.conf
|
||||||
|
|
||||||
@ -458,11 +469,9 @@ exit 0
|
|||||||
%doc README
|
%doc README
|
||||||
%license LICENSE GPL LGPL
|
%license LICENSE GPL LGPL
|
||||||
%{_bindir}/pulseaudio
|
%{_bindir}/pulseaudio
|
||||||
%{_bindir}/setup-pulseaudio
|
|
||||||
%{_bindir}/qpaeq
|
%{_bindir}/qpaeq
|
||||||
%dir %{_datadir}/pulseaudio
|
%dir %{_datadir}/pulseaudio
|
||||||
%{_datadir}/pulseaudio/alsa-mixer
|
%{_datadir}/pulseaudio/alsa-mixer
|
||||||
%{_fillupdir}/sysconfig.sound-pulseaudio
|
|
||||||
%dir %{_libdir}/pulseaudio
|
%dir %{_libdir}/pulseaudio
|
||||||
%{_libdir}/pulseaudio/libpulsecore-%{drvver}.so
|
%{_libdir}/pulseaudio/libpulsecore-%{drvver}.so
|
||||||
%dir %{_libdir}/pulse-%{drvver}/
|
%dir %{_libdir}/pulse-%{drvver}/
|
||||||
@ -564,13 +573,16 @@ exit 0
|
|||||||
%{_prefix}/lib/tmpfiles.d/pulseaudio.conf
|
%{_prefix}/lib/tmpfiles.d/pulseaudio.conf
|
||||||
%ghost %dir %{_localstatedir}/lib/pulseaudio
|
%ghost %dir %{_localstatedir}/lib/pulseaudio
|
||||||
|
|
||||||
|
# xwayland integration
|
||||||
|
%{_userunitdir}/pulseaudio-x11.service
|
||||||
|
|
||||||
|
%files setup
|
||||||
|
%{_bindir}/setup-pulseaudio
|
||||||
|
%{_fillupdir}/sysconfig.sound-pulseaudio
|
||||||
# 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
|
||||||
|
|
||||||
# xwayland integration
|
|
||||||
%{_userunitdir}/pulseaudio-x11.service
|
|
||||||
|
|
||||||
%files gdm-hooks
|
%files gdm-hooks
|
||||||
%attr(0750, gdm, gdm) %ghost %dir %{_localstatedir}/lib/gdm
|
%attr(0750, gdm, gdm) %ghost %dir %{_localstatedir}/lib/gdm
|
||||||
%attr(0700, gdm, gdm) %ghost %dir %{_localstatedir}/lib/gdm/.pulse
|
%attr(0700, gdm, gdm) %ghost %dir %{_localstatedir}/lib/gdm/.pulse
|
||||||
|
@ -66,6 +66,20 @@ setup_gconf_vendor() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_user_pulseaudio() {
|
||||||
|
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket && reutrn 0
|
||||||
|
test -f /etc/systemd/user/sockets.target.wants/pipewire-pulse.socket && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
pulseaudio_bin_name() {
|
||||||
|
if [ -x /usr/bin/pulseaudio ]; then
|
||||||
|
echo "pulseaudio"
|
||||||
|
else
|
||||||
|
echo "pipewire-pulse"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
enable_phonon() {
|
enable_phonon() {
|
||||||
echo "Enabling PulseAudio for Phonon..."
|
echo "Enabling PulseAudio for Phonon..."
|
||||||
delete_variable PHONON_PULSEAUDIO_DISABLE
|
delete_variable PHONON_PULSEAUDIO_DISABLE
|
||||||
@ -213,7 +227,8 @@ enable_qemu () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enable_autospawn() {
|
enable_autospawn() {
|
||||||
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket && return
|
has_user_pulseaudio && return
|
||||||
|
test -x /usr/bin/pulseaudio || 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
|
||||||
@ -223,10 +238,11 @@ enable_autospawn() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enable_systemd() {
|
enable_systemd() {
|
||||||
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket || return
|
has_user_pulseaudio || return
|
||||||
echo "Enabling systemd user socket..."
|
echo "Enabling systemd user socket..."
|
||||||
systemctl --global unmask pulseaudio.socket
|
s=$(pulseaudio_bin_name)
|
||||||
systemctl --global unmask pulseaudio.service
|
systemctl --global unmask $s.socket
|
||||||
|
systemctl --global unmask $s.service
|
||||||
}
|
}
|
||||||
|
|
||||||
disable_alsa() {
|
disable_alsa() {
|
||||||
@ -329,7 +345,8 @@ disable_qemu () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable_autospawn() {
|
disable_autospawn() {
|
||||||
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket && return
|
has_user_pulseaudio && return
|
||||||
|
test -x /usr/bin/pulseaudio || 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
|
||||||
@ -341,12 +358,13 @@ disable_autospawn() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
disable_systemd() {
|
disable_systemd() {
|
||||||
test -f /etc/systemd/user/sockets.target.wants/pulseaudio.socket || return
|
has_user_pulseaudio || return
|
||||||
echo "Disabling systemd user socket..."
|
echo "Disabling systemd user socket..."
|
||||||
systemctl --global mask pulseaudio.socket
|
s=$(pulseaudio_bin_name)
|
||||||
systemctl --global mask pulseaudio.service
|
systemctl --global mask $s.socket
|
||||||
|
systemctl --global mask $s.service
|
||||||
# kill leftover PA processes
|
# kill leftover PA processes
|
||||||
killall pulseaudio > /dev/null 2>&1
|
killall $s > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_all() {
|
enable_all() {
|
||||||
|
Loading…
Reference in New Issue
Block a user