当前位置:网站首页>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/
边栏推荐
- 【观察】智能产业加速,为何AI算力要先行?
- 可观测,才可靠:云上自动化运维CloudOps系列沙龙 第一弹
- Rk356x u-boot Institute (command section) 3.2 usage of help command
- Step by step | help you easily submit Google play data security form
- exlipse同时操作多行。比如同时在多行同列输入相同的文字
- Basic syntax of unity script (1) - common operations of game objects
- Development of unity script program
- Assertions of regular series
- Why can't the database table be written into data
- How can c write an SQL parser
猜你喜欢

WTM重大更新,多租户和单点登录

Data Lake (11): Iceberg table data organization and query

一文讲清楚什么是类型化数组、ArrayBuffer、TypedArray、DataView等概念
![【科研数据处理】[实践]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)](/img/5a/eaa845f4332f0b8ee8b6409d6a79e8.png)
【科研数据处理】[实践]类别变量频数分析图表、数值变量分布图表与正态性检验(包含对数正态)
![[recruitment (Guangzhou)] Chenggong Yi (Guangzhou) Net core middle and Senior Development Engineer](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[recruitment (Guangzhou)] Chenggong Yi (Guangzhou) Net core middle and Senior Development Engineer

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

用Unity实现Flat Shading

Basic syntax of unity script (1) - common operations of game objects

Apache Doris comparison optimization Encyclopedia

VisualStudio and SQL
随机推荐
我如何才能保护我的私钥?
Kaniko official documents - build images in kubernetes
Basic syntax of unity script (3) - accessing game object components
【系统分析师之路】第五章 复盘软件工程(敏捷开发)
“即服务”,企业数字化转型的必然选择
2022-06-23 sail soft part formula and SQL generation (month and quarter retrieval)
香港回归20余年,图扑数字孪生港珠澳大桥,超震撼
RK356x U-Boot研究所(命令篇)3.2 help命令的用法
SQL考勤统计月报表
In the digital age, XDR (extended detection and response) has unlimited possibilities
Google Earth Engine(GEE)——将字符串的转化为数字并且应用于时间搜索( ee.Date.fromYMD)
PG基础篇--逻辑结构管理(表继承、分区表)
Idea 2021.3 golang error: rning: undefined behavior version of delve is too old for go version 1.18
Wechat applet reports an error: typeerror: cannot read property 'SetData' of undefined
优思学院:六西格玛不只是统计!
Directory related commands
[recruitment (Guangzhou)] Chenggong Yi (Guangzhou) Net core middle and Senior Development Engineer
Paper interpretation (AGC) attributed graph clustering via adaptive graph revolution
知识传播不能取代专业学习!
How can I protect my private key?