打包RPM时如何添加安装RPM安装的必备包

How to add the prerequisite package to be installed with RPM installation while packaging the RPM

我正在创建一个依赖于 nss 工具的 RPM 包(例如 test.RPM)。 因为我的 test.RPM 应用程序将 CA 证书添加到 Chromum\firefox 浏览器以信任我的自签名 certificate.So 我添加了

yum install nss-tools in the %prep section of the spec file. 

在安装 test.RPM(yum install test.rpm) 时抛出错误

Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum

我知道原因了,yum 已经被测试包锁定了。

谁能建议如何在打包 RPM 时添加要与 RPM 安装一起安装的必备包。

Requires: nss-tool

有关详细信息,请参阅 http://ftp.rpm.org/api/4.4.2.2/dependencies.html