#5 Fix jack and pulseaudio subpackages to generate dependencies properly
Merged 2 years ago by wtaymans. Opened 2 years ago by ngompa.
rpms/ ngompa/pipewire fix-jack-and-pa-subpackages  into  master

file modified
+58 -37
@@ -1,5 +1,11 @@ 

+ %global majorversion 0

+ %global minorversion 3

+ %global microversion 13

+ 

  %global apiversion   0.3

  %global spaversion   0.2

+ %global soversion    0

+ %global libversion   %{soversion}.%(bash -c '((intversion = (%{minorversion} * 100) + %{microversion})); echo ${intversion}').0

  

  #global snap       20141103

  #global gitrel     327
@@ -20,20 +26,10 @@ 

  %global enable_vulkan 1

  %endif

  

- # libpulse and libjack subpackages shouldn't have library provides

- # as the files they ship are not in the linker path. We also have

- # to exclude requires or else the subpackages wind up requiring the

- # libs they're no longer providing

- # FIXME: the jack-audio-connection-kit and pulseaudio subpackages

- # should get the auto-generated Provides: instead, but they do not,

- # either with or without the lines below, not sure how to fix that

- %global __provides_exclude_from ^%{_libdir}/pipewire-%{apiversion}/.*$

- %global __requires_exclude_from ^%{_libdir}/pipewire-%{apiversion}/.*$

- 

  Name:           pipewire

  Summary:        Media Sharing Server

- Version:        0.3.13

- Release:        5%{?snap:.%{snap}git%{shortcommit}}%{?dist}

+ Version:        %{majorversion}.%{minorversion}.%{microversion}

+ Release:        6%{?snap:.%{snap}git%{shortcommit}}%{?dist}

  License:        MIT

  URL:            https://pipewire.org/

  %if 0%{?gitrel}
@@ -151,8 +147,14 @@ 

  Recommends:     %{name}%{?_isa} = %{version}-%{release}

  Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

  BuildRequires:  jack-audio-connection-kit-devel >= 1.9.10

+ Conflicts:      jack-audio-connection-kit

+ Conflicts:      jack-audio-connection-kit-dbus

  # Renamed in F32

  Obsoletes:      pipewire-jack < 0.2.96-2

+ # Fixed jack subpackages

+ Conflicts:      %{name}-libjack < 0.3.13-6

+ Conflicts:      %{name}-jack-audio-connection-kit < 0.3.13-6

+ Obsoletes:      %{name}-jack-audio-connection-kit < 0.3.13-6

  

  %description libjack

  This package contains a PipeWire replacement for JACK audio connection kit
@@ -166,7 +168,9 @@ 

  BuildRequires:  jack-audio-connection-kit-devel >= 1.9.10

  Conflicts:      jack-audio-connection-kit

  Conflicts:      jack-audio-connection-kit-dbus

- Provides:       jack-audio-connection-kit

+ # Fixed jack subpackages

+ Conflicts:      %{name}-libjack < 0.3.13-6

+ Conflicts:      %{name}-jack-audio-connection-kit < 0.3.13-6

  

  %description jack-audio-connection-kit

  This package provides a JACK implementation based on PipeWire
@@ -190,8 +194,14 @@ 

  Recommends:     %{name}%{?_isa} = %{version}-%{release}

  Requires:       %{name}-libs%{?_isa} = %{version}-%{release}

  BuildRequires:  pulseaudio-libs-devel

+ Conflicts:      pulseaudio-libs

+ Conflicts:      pulseaudio-libs-glib2

  # Renamed in F32

  Obsoletes:      pipewire-pulseaudio < 0.2.96-2

+ # Fixed pulseaudio subpackages

+ Conflicts:      %{name}-libpulse < 0.3.13-6

+ Conflicts:      %{name}-pulseaudio < 0.3.13-6

+ Obsoletes:      %{name}-pulseaudio < 0.3.13-6

  

  %description libpulse

  This package contains a PipeWire replacement for PulseAudio "libpulse" library.
@@ -202,10 +212,9 @@ 

  Recommends:     %{name}%{?_isa} = %{version}-%{release}

  Requires:       %{name}-libpulse%{?_isa} = %{version}-%{release}

  BuildRequires:  pulseaudio-libs-devel

- Conflicts:      pulseaudio-libs

- Conflicts:      pulseaudio-libs-glib2

- Provides:       pulseaudio-libs

- Provides:       pulseaudio-libs-glib2

+ # Fixed pulseaudio subpackages

+ Conflicts:      %{name}-libpulse < 0.3.13-6

+ Conflicts:      %{name}-pulseaudio < 0.3.13-6

  

  %description pulseaudio

  This package provides a PulseAudio implementation based on PipeWire
@@ -235,18 +244,30 @@ 

  %meson_install

  

  %if 0%{?enable_jack}

- ln -s pipewire-%{apiversion}/jack/libjack.so.0 %{buildroot}%{_libdir}/libjack.so.0.1.0

+ mv %{buildroot}%{_libdir}/pipewire-%{apiversion}/jack/libjack.so.%{libversion} %{buildroot}%{_libdir}

+ ln -sr %{buildroot}%{_libdir}/libjack.so.%{libversion} %{buildroot}%{_libdir}/pipewire-%{apiversion}/jack/libjack.so.%{libversion}

+ ln -s libjack.so.%{libversion} %{buildroot}%{_libdir}/libjack.so.0.1.0

  ln -s libjack.so.0.1.0 %{buildroot}%{_libdir}/libjack.so.0

- ln -s pipewire-%{apiversion}/jack/libjackserver.so.0 %{buildroot}%{_libdir}/libjackserver.so.0.1.0

+ mv %{buildroot}%{_libdir}/pipewire-%{apiversion}/jack/libjackserver.so.%{libversion} %{buildroot}%{_libdir}

+ ln -sr %{buildroot}%{_libdir}/libjackserver.so.%{libversion} %{buildroot}%{_libdir}/pipewire-%{apiversion}/jack/libjackserver.so.%{libversion}

+ ln -s libjackserver.so.%{libversion} %{buildroot}%{_libdir}/libjackserver.so.0.1.0

  ln -s libjackserver.so.0.1.0 %{buildroot}%{_libdir}/libjackserver.so.0

- ln -s pipewire-%{apiversion}/jack/libjacknet.so.0 %{buildroot}%{_libdir}/libjacknet.so.0.1.0

+ mv %{buildroot}%{_libdir}/pipewire-%{apiversion}/jack/libjacknet.so.%{libversion} %{buildroot}%{_libdir}

+ ln -sr %{buildroot}%{_libdir}/libjacknet.so.%{libversion} %{buildroot}%{_libdir}/pipewire-%{apiversion}/jack/libjacknet.so.%{libversion}

+ ln -s libjacknet.so.%{libversion} %{buildroot}%{_libdir}/libjacknet.so.0.1.0

  ln -s libjacknet.so.0.1.0 %{buildroot}%{_libdir}/libjacknet.so.0

  %endif

  

  %if 0%{?enable_pulse}

- ln -s pipewire-%{apiversion}/pulse/libpulse.so.0 %{buildroot}%{_libdir}/libpulse.so.0

- ln -s pipewire-%{apiversion}/pulse/libpulse-simple.so.0 %{buildroot}%{_libdir}/libpulse-simple.so.0

- ln -s pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so.0 %{buildroot}%{_libdir}/libpulse-mainloop-glib.so.0

+ mv %{buildroot}%{_libdir}/pipewire-%{apiversion}/pulse/libpulse.so.%{libversion} %{buildroot}%{_libdir}

+ ln -sr %{buildroot}%{_libdir}/libpulse.so.%{libversion} %{buildroot}%{_libdir}/pipewire-%{apiversion}/pulse/libpulse.so.%{libversion}

+ ln -s libpulse.so.%{libversion} %{buildroot}%{_libdir}/libpulse.so.0

+ mv %{buildroot}%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-simple.so.%{libversion} %{buildroot}%{_libdir}

+ ln -sr %{buildroot}%{_libdir}/libpulse-simple.so.%{libversion} %{buildroot}%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-simple.so.%{libversion}

+ ln -s libpulse-simple.so.%{libversion} %{buildroot}%{_libdir}/libpulse-simple.so.0

+ mv %{buildroot}%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so.%{libversion} %{buildroot}%{_libdir}

+ ln -sr %{buildroot}%{_libdir}/libpulse-mainloop-glib.so.%{libversion} %{buildroot}%{_libdir}/pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so.%{libversion}

+ ln -s libpulse-mainloop-glib.so.%{libversion} %{buildroot}%{_libdir}/libpulse-mainloop-glib.so.0

  %endif

  

  %if 0%{?enable_alsa}
@@ -280,12 +301,9 @@ 

  exit 0

  

  %post

- %{?ldconfig}

  %systemd_user_post pipewire.service

  %systemd_user_post pipewire.socket

  

- %ldconfig_postun

- 

  %triggerun -- %{name} < 0.3.6-2

  # This is for upgrades from previous versions which had a static symlink.

  # The %%post scriptlet above only does anything on initial package installation.
@@ -376,14 +394,14 @@ 

  %endif

  

  %if 0%{?enable_jack}

- %files libjack

+ %files jack-audio-connection-kit

+ %{_bindir}/pw-jack

+ %{_mandir}/man1/pw-jack.1*

  %{_libdir}/pipewire-%{apiversion}/jack/libjack.so*

  %{_libdir}/pipewire-%{apiversion}/jack/libjacknet.so*

  %{_libdir}/pipewire-%{apiversion}/jack/libjackserver.so*

- %{_bindir}/pw-jack

- %{_mandir}/man1/pw-jack.1*

  

- %files jack-audio-connection-kit

+ %files libjack

  %{_libdir}/libjack.so.*

  %{_libdir}/libjackserver.so.*

  %{_libdir}/libjacknet.so.*
@@ -393,20 +411,23 @@ 

  %endif

  

  %if 0%{?enable_pulse}

- %files libpulse

+ %files pulseaudio

+ %{_bindir}/pw-pulse

+ %{_mandir}/man1/pw-pulse.1*

  %{_libdir}/pipewire-%{apiversion}/pulse/libpulse.so*

  %{_libdir}/pipewire-%{apiversion}/pulse/libpulse-simple.so*

  %{_libdir}/pipewire-%{apiversion}/pulse/libpulse-mainloop-glib.so*

- %{_bindir}/pw-pulse

- %{_mandir}/man1/pw-pulse.1*

  

- %files pulseaudio

- %{_libdir}/libpulse.so.0

- %{_libdir}/libpulse-simple.so.0

- %{_libdir}/libpulse-mainloop-glib.so.0

+ %files libpulse

+ %{_libdir}/libpulse.so.*

+ %{_libdir}/libpulse-simple.so.*

+ %{_libdir}/libpulse-mainloop-glib.so.*

  %endif

  

  %changelog

+ * Sun Oct 18 2020 Neal Gompa <ngompa13@gmail.com> - 0.3.13-6

+ - Fix jack and pulseaudio subpackages to generate dependencies properly

+ 

  * Tue Oct 13 2020 Wim Taymans <wtaymans@redhat.com> - 0.3.13-5

  - Disable device provider for now

  - Fixes rhbz#1884260

With this change, the shim libraries are installed into the correct
paths so that dependencies are generated properly and that PipeWire
will function properly as a substitute for JACK and PulseAudio library
packages.

rebased onto 22a3be3

2 years ago

I'm worried that it will be pulled in as the default in a distro build (I think we had this problem before with a similar patch)

@wtaymans If we remove the Provides: for pulseaudio-libs and jack-audio-connection-kit, we can avoid that problem. As long as packages aren't specifically asking for those package names, we should be fine. The Conflicts should remain in place, though, and that will make it so that anything that depends on a specific libpulse or libjack implementation will pull the right one in (i.e. PulseAudio and JACK itself), and only the removal of those for PipeWire will switch the implementation.

rebased onto d9cf9ca

2 years ago

@wtaymans I've dropped the Provides as mentioned above, so it should no longer be possible for that to happen.

Pull-Request has been merged by wtaymans

2 years ago

@wtaymans Thanks for merging this, I've kicked off a build in Rawhide so @eeickmeyer and I can start poking at it.