我正在尝试构建一个 rpm,但不幸的是在我的构建机器中我只有有限的权限,这意味着 %install 中的操作无法在构建机器内完成。如何在不运行 %install 部分的情况下构建包(.rpm 文件)?看起来没有可用于此目的的选项:
http://www.rpm.org/max-rpm-snapshot/ch-rpm-b-command.html
我的 bu.spec 文件:
Summary: xxxx
Name: xx
Version: 1.0
Release: 1
Group: Applications/Sound
License: Share
%description
%prep
echo "prep"
%build
%install
echo "install"
mkdir -p /opt/xcp_src/
cp scripts.tgz /opt/xcp_src/
%files
/tmp/xcp_src/scripts.tgz
%post
cd /opt/xcp_src/
tar zxvf scripts.tgz