From 20ef1fe7556a1c77d5bdc29c7342a46891a40851 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:35:07 +0100 Subject: [PATCH] %post: fix command to clean autospawn multiple entries [release 16.1-3mamba;Tue Jan 31 2023] --- pulseaudio.spec | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pulseaudio.spec b/pulseaudio.spec index 237e84d..aa004c8 100644 --- a/pulseaudio.spec +++ b/pulseaudio.spec @@ -5,7 +5,7 @@ %define majver %(echo %{version} | cut -d. -f 1-2) Name: pulseaudio Version: 16.1 -Release: 1mamba +Release: 3mamba Summary: Improved Linux sound server Group: System/Libraries Vendor: openmamba @@ -31,6 +31,7 @@ BuildRequires: libavahi-devel BuildRequires: libcap-devel BuildRequires: libdbus-devel BuildRequires: libfftw-devel +BuildRequires: libgcc BuildRequires: libglib-devel BuildRequires: libgst-plugins-base-devel BuildRequires: libgstreamer-devel @@ -42,9 +43,11 @@ BuildRequires: libsbc-devel BuildRequires: libsndfile-devel BuildRequires: libsoxr-devel BuildRequires: libspeexdsp-devel +BuildRequires: libstdc++6-devel BuildRequires: libsystemd-devel BuildRequires: libtdb-devel BuildRequires: libudev-devel +BuildRequires: libwebrtc-audio-processing-devel BuildRequires: libxcb-devel BuildRequires: lirc-devel ## AUTOBUILDREQ-END @@ -291,8 +294,7 @@ 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 +sed -i 's|; autospawn = yes.*|autospawn = no|' %{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 @@ -340,9 +342,15 @@ fi sed -i "s|module-gconf|module-gsettings|" %{_sysconfdir}/pulse/default.pa sed -i "s|^\(load-module module-rescue-streams\)|#\1|" %{_sysconfdir}/pulse/default.pa +# Fix multiple autospawn = no lines inserted on each previous update +if [ `grep "^autospawn = no" /etc/pulse/client.conf |wc -l` -gt 1 ]; then + sed -i -e '/^autospawn = no/d' %{_sysconfdir}/pulse/client.conf +fi + # Superseded by socket activation -sed -e '/autospawn/iautospawn = no' \ - -i %{_sysconfdir}/pulse/client.conf +grep -q "^autospawn = no" /etc/pulse/client.conf || { + sed -i 's|; autospawn = yes.*|autospawn = no|' %{_sysconfdir}/pulse/client.conf +} # Required by qpaeq sed -e '/Load several protocols/aload-module module-dbus-protocol' \ @@ -407,6 +415,7 @@ fi %{_libdir}/pulseaudio/modules/libprotocol-*.so %{_libdir}/pulseaudio/modules/libraop.so %{_libdir}/pulseaudio/modules/librtp.so +%{_libdir}/pulseaudio/modules/libwebrtc-util.so %{_libdir}/pulseaudio/modules/module-*.so %exclude %{_libdir}/pulseaudio/modules/module-gsettings.so %exclude %{_libdir}/pulseaudio/modules/module-jack*.so @@ -571,6 +580,12 @@ fi #%{_libdir}/pulse-%{majver}/modules/*.a %changelog +* Tue Jan 31 2023 Silvan Calarco 16.1-3mamba +- %post: fix command to clean autospawn multiple entries + +* Mon Jan 30 2023 Silvan Calarco 16.1-2mamba +- fix multiple 'autospawn = no' lines inserted on updates in file /etc/pulseaudio/client.conf + * Thu Jun 23 2022 Automatic Build System 16.1-1mamba - automatic version update by autodist