文章目录
redhat cve站点:
https://listman.redhat.com/archives/rhsa-announce/
centos7.9 patch/spec下载站点:
https://git.centos.org/
centos 源码tar包下载站点:
centos7.9 cve源码下载:
例如下载:xterm-295-3.el7_9.1.src.rpm
git clone项目:
查看项目有多少远程branch
切换至c7的branch:
此刻的仓库结果为 “specfile” 与 “patch”
下载tar类型的源码包:
先找tar源码的信息:
https://git.centos.org/rpms/xterm
扫描二维码关注公众号,回复:
12647685 查看本文章

去下载tar源码:
https://git.centos.org/sources/包名/分支名/tar源码的编码
wget https://git.centos.org/sources/xterm/c7/e17742c01c447ab64e02275e96a1939a01f0f731
将tar源码 “编码” 类型转换为 具体tar包
e17742c01c447ab64e02275e96a1939a01f0f731 SOURCES/xterm-295.tgz
上面是网站 .xterm.metadata给的信息,所有需要将“编码” 重命名为tar包
不然rpmbuild打包时,会识别不了该源码
pushd xterm/SOURCES
mv e17742c01c447ab64e02275e96a1939a01f0f731 xterm-295.tgz
popd
打srpm包:
整合打包目录:
mkdir -p ~/rpmbuild/{
SOURCES,SPECS}
cp xterm/SOURCES/* ~/rpmbuild/SOURCES/
cp xterm/SPECS/xterm.spec ~/rpmbuild/SPECS/
修改自己的spec信息:
执行srpm打包命令:
rpmbuild -bs xterm.spec --define “dist .wl7”
编译二进制包(使用mock工具编译):
centos8 module类型cve源码下载:
例如:subversion-1.14.1-1.module+el8.4.0+9885+2150d1b0.src.rpm
选择branch:
下载源码:
同上面
打srpm包:
rpmbuild -bs subversion.sepc --define ".module+el8.4.0+9885+2150d1b0"
【注意】:
1 moudle包是subversion-1.14.1-1.module+el8.4.0+9885+2150d1b0.src.rpm
2 它对于的dist是.module+el8.4.0+9885+2150d1b0
rpmbuild -bb --target aarch64 --nodeps /builddir/build/SPECS/perl.spec