将RPM依赖性指定为“下列之一”
我正在为内部软件包开发 RPM 规范文件。该软件包依赖于 libuuid
,它在 Fedora 上作为 libuuid
软件包提供,但标准 RPM 中没有针对 CentOS 5 的 libuuid
软件包存储库。我们可以使用 e2fsprogs-devel 开发 RPM 来满足对 CentOS 的依赖(e2fsprogs-devel
安装 libuuid
和相关标头)。我想指定我们的 RPM 依赖于 libuuid
,以便在安装 RPM 期间将 libuuid
软件包安装在 Fedora 上,但是 e2fsprogs-devel
code> 在 CentOS 上安装期间安装。有没有办法在 RPM 规范文件中将依赖项指定为“按该顺序的 libuuid 或 e2fsprogs-devel 之一”?
I am developing an RPM spec file for an in-house package. The package depends on libuuid
, which is available as the libuuid
package on Fedora, but there is no libuuid
package for CentOS 5 in the standard RPM repositories. We can satisfy the dependency on CentOS with the e2fsprogs-devel development RPM (e2fsprogs-devel
installs libuuid
and the associated headers). I would like to specify that our RPM depends on libuuid
, such that the libuuid
package is installed on Fedora during installation of our RPM, but e2fsprogs-devel
is installed during installation on CentOS. Is there a way to specify a dependency as "one of libuuid or e2fsprogs-devel, in that order" in an RPM spec file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以直接指定文件作为要求,但这很丑陋。也不要使用 %dist 来区分。
您应该只依赖构建过程。如果一个特定文件位于不同的软件包中,具体取决于发行版,那么您应该在您希望支持的每个发行版上(重新)构建该软件包(不得禁用 AutoReq/AutoReqProv)。
You may directly specify files as a requirement but this is ugly. Also don't use %dist for distinguishing.
You should just rely on the build process. If one specific file is located in different packages depending on the distro then you should just (re-) build the package on every distro you wish to support (AutoReq/AutoReqProv must not be disabled).
不可以。使用 Dist 标签 来区分 Fedora 及其衍生产品之一。
No. Use the Dist Tag to distinguish between Fedora and one of its derivatives.