当前位置:网站首页>Rpm2rpm packaging steps
Rpm2rpm packaging steps
2022-06-30 13:42:00 【Erik_ ly】
List of articles
This article mainly introduces will rpm After unpacking the package , Modify the file inside , And repackage it into rpm The process of .
Prepare the environment
- install rpm-build package
yum install rpm-build -y
- install rpmdevtools
yum install rpmdevtools -y
- Create a workspace
rpmdev-setuptree
Check the working directory

- establish BUILDROOT Catalog
mkdir /root/rpmbuild/BUILDROOT
Complete directory structure

decompression rpm package
- Copy file
Copy to be modified rpm Package to /root/rpmbuild/BUILDROOT/ Catalog ,

- decompression rpm package
cd /root/rpmbuild/BUILDROOT
rpm2cpio zookeeper_3_0_1_0_187-3.4.6.3.0.1.0-187.noarch.rpm | cpio -idv
- extract spec file
rpmrebuild --package --notest-install --spec-only=zookeeper.spec zookeeper_3_0_1_0_187-3.4.6.3.0.1.0-187.noarch.rpm
notes : It's used here rpmrebuild Tools , Details can be viewed : Use rpmrebuild from rpm Extract in package spec file , There are download links and usage methods .
- Move SPEC file
mv zookeeper.spec /root/rpmbuild/SPECS/
- Delete the original rpm package
rm -rf zookeeper_3_0_1_0_187-3.4.6.3.0.1.0-187.noarch.rpm
Modify the content
View the contents of the extracted file ,

Modify as needed ,
- If you just need to replace the file with the same name , Then directly replace it ;
- If you need to add files or folders , You need to in
zookeeper.specAdd files or folders in the original format ; - If you need to delete a file or folder , It also needs to be
zookeeper.specDelete the corresponding file or folder . - If there are many modified files , You can also convert the original
%filesChange the content to
%files
%defattr(-,root,root,-)
/usr/hdp/3.0.1.0-187
Call again rpm package
After modifying the document , Repackage into rpm file ,
cd /root/rpmbuild/SPECS
rpmbuild -ba --buildroot /root/rpmbuild/BUILDROOT/ zookeeper.spec

After the execution is completed, the /root/rpmbuild/RPMS View new rpm package

notes : This article was first published on personal blog website : http://www.erik-ly.com/
边栏推荐
- 60 个神级 VS Code 插件!!
- Hangzhou E-Commerce Research Institute: the official website (website) is the only form of private domain
- Unity 频繁切换分支 结果模型出现莫名其妙的错误
- 用Unity实现Flat Shading
- 数字化转型道阻且长,如何迈好关键的第一步
- VisualStudio and SQL
- Common UI components
- More than 20 years after Hong Kong's return, Tupu digital twin Hong Kong Zhuhai Macao Bridge has shocked
- 可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹
- rxjs Observable 两大类操作符简介
猜你喜欢

深度长文探讨Join运算的简化和提速

Waving flags and shouting for basic language
![【科研数据处理】[实践]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)](/img/5a/eaa845f4332f0b8ee8b6409d6a79e8.png)
【科研数据处理】[实践]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)

On the simplification and acceleration of join operation
![[Select] resource realization information, news, we media, blog applet (can be drained, open traffic master, with PC background management)](/img/e7/1c34d8aa364b944688ec2ffb4feb7c.jpg)
[Select] resource realization information, news, we media, blog applet (can be drained, open traffic master, with PC background management)

【刷题篇】供暖器

今日睡眠质量记录80分

There is no utf8 option for creating tables in Navicat database.

This editor will open source soon!

可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹
随机推荐
Common UI components
SQL programming problem, test case failed
Unity Animator 参数
深度长文探讨Join运算的简化和提速
Clearing TinyMCE rich text cache in elementui
mysql拒绝访问、管理员身份打开的
【招聘(广州)】成功易(广州).Net Core中高级开发工程师
【Kubernetes系列】K8s设置MySQL8大小写不敏感
【科学文献计量】外文文献及中文文献关键词的挖掘与可视化
腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
Apache Doris Compaction優化百科全書
Service online governance
知识传播不能取代专业学习!
“即服务”,企业数字化转型的必然选择
单元测试效率优化:为什么要对程序进行测试?测试有什么好处?
golang模板(text/template)
Google Earth Engine(GEE)——GHSL:全球人类住区层,建成网格 1975-1990-2000-2015 (P2016) 数据集
The independent station is Web3.0. The national "14th five year plan" requires enterprises to build digital websites!
Knowledge dissemination cannot replace professional learning!
一条查询SQL是如何执行的