并排 RPM 版本
设计 RPM 以便可以通过 YUM/RPM 并排安装多个版本而不会互相干扰,“正确”的方法是什么(如果有的话)?对于库来说,正确的答案似乎与 sonames 有关,尽管我找不到任何关于 sonames、符号链接和 RPM 如何相互作用的好信息。我不知道应该如何命名/放置可执行文件和普通文件以便并排放置。就可执行文件而言,正确的行为似乎是将较新的版本放在 PATH 上,但如果卸载了较新的 RPM,则将旧版本放在 PATH 上。
What is the "right" way, if any, to design RPMs so that multiple versions can be installed via YUM/RPM side by side without stomping on each other? For libraries, the right answer seems to be related to sonames, although I can't find any good information about how sonames, symlinks, and RPMs interact with each other. I have no idea how executables and plain files ought to be named/placed in order to be placed side by side. It seems the right behaviour as far as executables go would be to have the newer version on the PATH, but have the older version be on the PATH if the newer RPM is uninstalled.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
本质上,您需要确保版本不冲突:
请注意,您将使用 yum 安装多个版本时会遇到麻烦,因为 yum 被设计为一次安装一个版本 - 内核除外。如果您使用 yum 安装/更新软件包,所有旧版本都将被删除。因此,您需要对每个版本使用 rpm -i。
对于路径中包含更新的二进制文件,不可能正确执行此操作。您要么需要执行类似 python 的操作,其中用户必须在命令行上指定 python 或 python3,要么您必须在所需二进制文件的路径上创建符号链接。这必须在 scriptlet 中完成,管理它是一个相当大的挑战。这也意味着符号链接不属于任何包。
Essentially you need to ensure that the versions do not conflict:
Note that you will have trouble installing multiple versions with yum as yum is designed to have one version installed at a time - with the exception of the kernel. If you install/update a package with yum all old versions will be removed. Consequently you'll need to use rpm -i for each version.
With regard to have more recent binaries in the path it is not possible to do it properly. You either need to do something like python where the user has to specify python or python3 on the command line or you have to do a dance with creating symlinks on the path to the binary that you want. This would have to be done in the scriptlets and managing it is quite a challenge. It also means that the symlink wouldn't be owned by any package.