diff --git a/wireplumber.changes b/wireplumber.changes index e5e7b90..519fe9d 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Jan 13 10:51:07 UTC 2023 - Antonio Larrosa + +- Backport the workaround from SLE/Leap for the bug in systemd + scripts that didn't set the default enable state for the + wireplumber user service when installing wireplumber. The bug + (boo#1200485) was fixed but that's only for new installations + while this workaround will fix old installations (boo#1202008). + This is used to automatically fix installations of + SLE 15 SP4/Leap 15.4 that were not updated during it's lifetime + and upgrade directly to SP5/15.5 . + ------------------------------------------------------------------- Wed Jan 11 12:41:28 UTC 2023 - Antonio Larrosa diff --git a/wireplumber.spec b/wireplumber.spec index 3be6abb..4021b23 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -77,6 +77,8 @@ BuildRequires: gcc9-c++ %else BuildRequires: gcc-c++ %endif +%{?systemd_ordering} + %description WirePlumber is a modular session / policy manager for PipeWire and @@ -182,6 +184,29 @@ export XDG_RUNTIME_DIR=/tmp %post %systemd_user_post wireplumber.service +%if 0%{?suse_version} <= 1500 +# If the pipewire.socket user unit is not enabled and the workaround +# for boo#1186561 has never been executed, we need to execute it now +if [ ! -L %{_sysconfdir}/systemd/user/pipewire.service.wants/wireplumber.service \ + -a ! -f %{_localstatedir}/lib/pipewire/wireplumber_post_workaround \ + -a -x %{_bindir}/systemctl ]; then + for service in wireplumber.service ; do + %{_bindir}/systemctl --global preset "$service" || : + done + + mkdir -p %{_localstatedir}/lib/pipewire + cat << EOF > %{_localstatedir}/lib/pipewire/wireplumber_post_workaround +# The existence of this file means that the wireplumber user services were +# enabled at least once. Please don't remove this file as that would +# make the services to be enabled again in the next package update. +# +# Check the following bugs for more information: +# https://bugzilla.opensuse.org/show_bug.cgi?id=1200485 +EOF +fi +%endif + + %preun %systemd_user_preun wireplumber.service