Bug 2188174

Summary: RHEL9 gnome-remote-desktop provides bundled libvncserver dependency
Product: Red Hat Enterprise Linux 9 Reporter: Yaakov Selkowitz <yselkowi>
Component: gnome-remote-desktopAssignee: Jonas Ådahl <jadahl>
Status: VERIFIED --- QA Contact: Jiri Koten <jkoten>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.1CC: jkoten, tpelka
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-remote-desktop-40.0-9.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yaakov Selkowitz 2023-04-20 01:51:06 UTC
Description of problem:
RHEL9 gnome-remote-desktop builds and bundles a private copy of libvncserver.so.1 in a package-specific rpath, in order to provide a VNC server without supporting the libvncserver package standalone (see bug 1893947).  However, provides filtering is not set, so the library is added to provides.  This results in falsely resolving that library dependency in EPEL9 packages which are built against the EPEL9 version of that library, but since the RHEL bundled library is in a private rpath, the EPEL package cannot find it and fails to start.

The erroneous provides can be seen in the package info in Stream Koji and Brew, and once installed:

$ rpm -q gnome-remote-desktop
gnome-remote-desktop-40.0-7.el9.x86_64

$ rpm -q --provides gnome-remote-desktop
bundled(libvncserver) = 0.9.13
gnome-remote-desktop = 40.0-7.el9
gnome-remote-desktop(x86-64) = 40.0-7.el9
libvncserver.so.1()(64bit)


Steps to Reproduce:
1. Install gnome-remote-desktop on RHEL9
2. Enable EPEL9
3. Install krfb
4. Run krfb


Actual results:
libvncserver is not installed as a dependency of krfb, and krfb fails to start:

krfb: error while loading shared libraries: libvncserver.so.1: cannot open shared object file: No such file or directory


Expected results:
libvncserver is installed as a dependency of krfb, and krfb starts successfully.


Solution:
The following should be added to gnome-remote-desktop.spec:

%global __provides_exclude_from ^%{_libdir}/%{name}


Other information:
krfb appears to be the only affected package currently in EPEL9, but it's not a flaw in krfb's packaging.  (There are a few similar packages in Fedora that would also be affected if built for EPEL9.)
x11vnc requires not only libvncserver.so.1()(64bit) but also libvncclient.so.1()(64bit), which is also part of the libvncserver package and therefore masks this problem, as would the presence of any other EPEL9 package which requires (only) libvncclient.so.1()(64bit) (namely krdc-libs, libguac-client-vnc, remmina-plugins-vnc).  Perhaps this is the reason this has (AFAICS) not been reported until now, as it seems likely that a user installs both krdc and krfb together with Plasma.

Comment 1 Jonas Ådahl 2023-06-29 13:53:55 UTC
@yselkowi gating is now failing with

package gnome-remote-desktop-40.0-8.el9.x86_64 requires libvncserver.so.1()(64bit), but none of the providers can be installed

any chance you can have a look at why that started to happen? Is

Provides:       bundled(libvncserver) = %{libvncserver_version}

perhaps problematic here?

Comment 2 Yaakov Selkowitz 2023-07-04 00:59:16 UTC
See MR#7.