RPM spec to require specific RHEL release

。_饼干妹妹 提交于 2019-12-08 17:06:34

The redhat-release-server-6Server-6.3.0.3.el6.x86_64 (on my system) seems to be a good candidate as a prerequisite. See http://rhn.redhat.com/errata/RHEA-2012-0971.html . What is not obvious for a novice looking at the package name is that "6Server" is actually the package version. "rpm -q --info" make this clear, though:

$ rpm -q redhat-release-server-6Server --info
Name        : redhat-release-server        Relocations: (not relocatable)
Version     : 6Server                           Vendor: Red Hat, Inc.
Release     : 6.3.0.3.el6                   Build Date: Wed 30 May 2012 11:19:03 AM PDT
Install Date: Tue 02 Oct 2012 09:48:26 AM PDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: redhat-release-server-6Server-6.3.0.3.el6.src.rpm
Size        : 38585                            License: GPLv2
Signature   : RSA/8, Wed 30 May 2012 12:19:55 PM PDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : Red Hat Enterprise Linux Server release file
Description :
Red Hat Enterprise Linux Server release files

So the correct directive is:

Requires: redhat-release-server >= 6Server-6.3

I would suggest that instead of required specific version of RHEL, Require the dependency that only appear in the target version (e.g. RHEL 6.3)

Following not only cause problem you mentioned, but also block the installation for the client and workstation users (6Client and 6Workstation)

Requires: redhat-release-server-6Server >= 6.3
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!