修改后的 SRPM 冲突解决

Modified SRPM conflict resolution

我需要将 libvncserver 和 libvncclient 库更新到 0.9.11。 我是运行 CentOS 7.3,目前最新的libvncserver RPM是0.9.9

所以我使用了 libvncserver SRPM,修改了规范文件,并更新了 libvncserver tarball 以创建 0.9.11 版本的 libvncserver 和 libvncclient RPM。

我在安装时遇到依赖问题。

Loaded plugins: fastestmirror
Examining ../RPMS/x86_64/libvncserver-0.9.11-1.el7.centos.1.x86_64.rpm: libvncserver-0.9.11-1.el7.centos.1.x86_64
Marking ../RPMS/x86_64/libvncserver-0.9.11-1.el7.centos.1.x86_64.rpm as an update to libvncserver-0.9.9-9.el7_0.1.x86_64
Examining ../RPMS/x86_64/libvncserver-debuginfo-0.9.11-1.el7.centos.1.x86_64.rpm: libvncserver-debuginfo-0.9.11-1.el7.centos.1.x86_64
Marking ../RPMS/x86_64/libvncserver-debuginfo-0.9.11-1.el7.centos.1.x86_64.rpm to be installed
Examining ../RPMS/x86_64/libvncserver-devel-0.9.11-1.el7.centos.1.x86_64.rpm: libvncserver-devel-0.9.11-1.el7.centos.1.x86_64
Marking ../RPMS/x86_64/libvncserver-devel-0.9.11-1.el7.centos.1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libvncserver.x86_64 0:0.9.9-9.el7_0.1 will be updated
--> Processing Dependency: libvncclient.so.0()(64bit) for package: x11vnc-0.9.13-11.el7.x86_64
Loading mirror speeds from cached hostfile
--> Processing Dependency: libvncserver.so.0()(64bit) for package: x11vnc-0.9.13-11.el7.x86_64
---> Package libvncserver.x86_64 0:0.9.11-1.el7.centos.1 will be an update
---> Package libvncserver-debuginfo.x86_64 0:0.9.11-1.el7.centos.1 will be installed
---> Package libvncserver-devel.x86_64 0:0.9.11-1.el7.centos.1 will be installed
--> Finished Dependency Resolution
Error: Package: x11vnc-0.9.13-11.el7.x86_64 (@epel)
           Requires: libvncclient.so.0()(64bit)
           Removing: libvncserver-0.9.9-9.el7_0.1.x86_64 (@base)
               libvncclient.so.0()(64bit)
           Updated By: libvncserver-0.9.11-1.el7.centos.1.x86_64 (/libvncserver-0.9.11-1.el7.centos.1.x86_64)
              ~libvncclient.so.1()(64bit)
Error: Package: x11vnc-0.9.13-11.el7.x86_64 (@epel)
           Requires: libvncserver.so.0()(64bit)
           Removing: libvncserver-0.9.9-9.el7_0.1.x86_64 (@base)
               libvncserver.so.0()(64bit)
           Updated By: libvncserver-0.9.11-1.el7.centos.1.x86_64 (/libvncserver-0.9.11-1.el7.centos.1.x86_64)
              ~libvncserver.so.1()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

x11vnc 从 0.9.9

使用 libvncserver.so.0 和 libvncclient.so.0
[localhost SPECS]$ sudo ldd /usr/bin/x11vnc | grep -i vnc
        libvncserver.so.0 => /lib64/libvncserver.so.0 (0x00007fee9387d000)
        libvncclient.so.0 => /lib64/libvncclient.so.0 (0x00007fee9365f000)

运行 上面很详细,rpm 尝试更新 x11vnc(到有 none)

Potential Provider: libvncserver.x86_64 0:0.9.9-9.el7_0.1
Mode is ud for provider of libvncserver.so.0()(64bit): libvncserver.x86_64 0:0.9.9-9.el7_0.1
Mode for pkg providing libvncserver.so.0()(64bit): ud
Trying to update x11vnc-0.9.13-11.el7.x86_64 to resolve dep
No update paths found for x11vnc-0.9.13-11.el7.x86_64. Failure!
Searching pkgSack for dep: libvncserver.so.0()(64bit)

我可以 "force-install" 但在我这样做之前我想知道是否有更好的方法来做到这一点?是否可以指定依赖项检查器不突出显示依赖项?另一种方法是创建自定义 x11vnc RPM,仅用于更新库路径。

问题是你的包没有提供libvncserver.so.0,而是替换了libvncserver,它提供了libvncserver.so.0。最简单的解决方案是重命名您的包,以便它可以与现有的 libvncserver 包一起安装。

-devel 子包可能会与 libvncserver-devel 冲突,因为有些文件会重叠,但对于主包,您应该可以启用并行安装。

您已经提到了另一个干净的解决方案:将所有包从 libvncserver.so.0 移植到 libvncserver.so.1。但这可能涉及很多不必要的工作,并使您的系统与其他系统不太相似。

(您也可以保留 libvncserver 包名称并使用旧库创建一个 compat-libvncserver 包,但这又是相当多的工作却收效甚微。)