我想创建一个 rpm 包,它执行以下操作:
设置时:
将脚本复制到 rpm
将文件解压到 rpm
运行时:
运行
script.sh运行
install提取到 rpm 中的文件
当用户运行 rpm 时,它应该执行 2 和 3,因为这些文件已经存在于 rpm 中。
我知道如何进行设置,*.spec 文件是:
%description
# lets skip this for now
%prep
# lets skip this for now
%build
# lets skip this for now
%install
cd ${RPM_BUILD_ROOT}
cp -v /home/methuselah/script.sh ${RPM_BUILD_ROOT}
tar xvpf /home/methuselah/bin.tar
chmod 775 -R ${RPM_BUILD_ROOT}/*
%files
/*
%changelog
* Tue Jan 28 2014 Pavel Šimerda - 3.0.9-14
- Resolves: #1052814 - rsync command is terminated with SIGSEGV
- Resolves: #1052814 - add missing patch file
我不确定将执行 rpm 时运行的实际安装步骤放在哪里。