修改了SRPM冲突解决方案

时间:2017-08-09 22:36:09

标签: redhat rpmbuild rpm-spec

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

所以我拿了libvncserver SRPM,修改了spec文件,并更新了libvncserver tarball,创建了一个0.9.11版本的libvncserver和libvncclient RPM' s。

我在安装时遇到了依赖性挑战。

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(没有)

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)

我可以"强制安装"但在我这样做之前,我感兴趣的是有更好的方法吗?是否可以指定依赖检查器不突出显示依赖关系?另一种方法是创建自定义x11vnc RPM,只是为了更新库路径。

1 个答案:

答案 0 :(得分:1)

问题是您的软件包不提供libvncserver.so.0,而是替换提供libvncserver的{​​{1}}。最简单的解决方案是重命名您的包,以便它可以与现有的libvncserver.so.0包一起安装。

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

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

(您还可以保留libvncserver.so.1软件包名称,并使用旧库创建一个libvncserver软件包,但这样做的工作量相当多,效果不大。)