From 928690bf2ecee6ea7bf67903b7075c07493d65a5 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:35:07 +0100 Subject: [PATCH] enable pulseaudio.socket also on update from previous releases [release 15.0-6mamba;Sun Nov 21 2021] --- pulseaudio.spec | 55 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/pulseaudio.spec b/pulseaudio.spec index 76c920f..f4b6573 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -5,7 +5,7 @@ %define majver %(echo %{version} | cut -d. -f 1-2) Name: pulseaudio Version: 15.0 -Release: 3mamba +Release: 6mamba Summary: Improved Linux sound server Group: System/Libraries Vendor: openmamba @@ -32,8 +32,6 @@ BuildRequires: libcap-devel BuildRequires: libdbus-devel BuildRequires: libfftw-devel BuildRequires: libglib-devel -BuildRequires: libgst-plugins-base-devel -BuildRequires: libgstreamer-devel BuildRequires: libjack-devel BuildRequires: libltdl-devel BuildRequires: libopenssl-devel @@ -45,7 +43,6 @@ BuildRequires: libspeexdsp-devel BuildRequires: libsystemd-devel BuildRequires: libtdb-devel BuildRequires: libudev-devel -BuildRequires: libwrap-devel BuildRequires: libxcb-devel BuildRequires: lirc-devel ## AUTOBUILDREQ-END @@ -74,6 +71,7 @@ Requires: rtkit Requires: udev Requires(post): /usr/sbin/alternatives Obsoletes: pulseaudio-esound-compat < 15.0 +Requires: %{name}-utils = %{?epoch:%epoch:}%{version}-%{release} %description PulseAudio is a sound server for Linux and other Unix like operating systems. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (ESOUND). @@ -239,10 +237,16 @@ This contains the static library needed by %{name} based applications. %prep %setup -q +#-D -T #%patch0 -p1 %build +#:<< _EOF %meson \ + -Dstream-restore-clear-old-devices=true \ + -Dbluez5-gstreamer=disabled \ + -Delogind=disabled \ + -Dtcpwrap=disabled \ -Dsystem_user="pulse" \ -Dsystem_group="pulse" \ -Daccess_group="pulse-access" \ @@ -283,6 +287,20 @@ rm -f %{buildroot}%{_libdir}/*.{a,la} rm -f %{buildroot}%{_libdir}/pulseaudio/*.{a,la} rm -f %{buildroot}%{_libdir}/pulse-%{majver}/modules/*.{a,la} +# Superseded by socket activation +sed -e '/autospawn/iautospawn = no' \ + -i %{buildroot}%{_sysconfdir}/pulse/client.conf +rm -f %{buildroot}%{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf + +# Disable cork-request module, can result in e.g. media players unpausing +# when there's a Skype call incoming +sed -e 's|/usr/bin/pactl load-module module-x11-cork-request|#&|' \ + -i %{buildroot}%{_bindir}/start-pulseaudio-x11 + +# Required by qpaeq +sed -e '/Load several protocols/aload-module module-dbus-protocol' \ + -i %{buildroot}%{_sysconfdir}/pulse/default.pa + %find_lang %{name} %clean @@ -301,6 +319,11 @@ if [ $1 -ge 1 ]; then /etc/asound.conf asound.conf /etc/asound.conf.pulseaudio 30 /usr/sbin/alternatives --auto asound.conf fi +%systemd_user_post pulseaudio.socket +: + +%preun +%systemd_user_preun pulseaudio.socket : %postun @@ -313,6 +336,15 @@ fi %posttrans sed -i "s|module-gconf|module-gsettings|" %{_sysconfdir}/pulse/default.pa sed -i "s|^\(load-module module-rescue-streams\)|#\1|" %{_sysconfdir}/pulse/default.pa + +# Superseded by socket activation +sed -e '/autospawn/iautospawn = no' \ + -i %{_sysconfdir}/pulse/client.conf + +# Required by qpaeq +sed -e '/Load several protocols/aload-module module-dbus-protocol' \ + -i %{_sysconfdir}/pulse/default.pa + grep -q default.pa.d %{_sysconfdir}/pulse/default.pa || { cat >> %{_sysconfdir}/pulse/default.pa << _EOF @@ -324,6 +356,11 @@ _EOF } : +%triggerpostun -- pulseaudio <= 15.0-5mamba +# Enable as socket if coming from older versions +/usr/bin/systemctl --no-reload preset --global pulseaudio.socket +: + %post -n lib%{name}-glib -p /sbin/ldconfig %postun -n lib%{name}-glib -p /sbin/ldconfig @@ -357,7 +394,6 @@ fi %config(noreplace) %{_sysconfdir}/pulse/default.pa %dir %{_sysconfdir}/pulse/default.pa.d %config(noreplace) %{_sysconfdir}/pulse/system.pa -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/pulseaudio-system.conf %attr(4755,root,root) %{_bindir}/pulseaudio %attr(0700, pulse, pulse) %dir %{_localstatedir}/lib/pulse %{_udevrulesdir}/90-pulseaudio.rules @@ -530,6 +566,15 @@ fi #%{_libdir}/pulse-%{majver}/modules/*.a %changelog +* Sun Nov 21 2021 Silvan Calarco 15.0-6mamba +- enable pulseaudio.socket also on update from previous releases + +* Sun Nov 21 2021 Silvan Calarco 15.0-5mamba +- restore gsettings module required by paprefs + +* Sat Nov 20 2021 Silvan Calarco 15.0-4mamba +- configure for socket activation; add meson options for bluez5-gstreamer and other + * Thu Sep 02 2021 Silvan Calarco 15.0-3mamba - update existing default.pa configuration on upgrade