当前位置:网站首页>How to package rpm
How to package rpm
2022-06-25 14:59:00 【qq_ twenty-three million nine hundred and fifty-three thousand 】
This article describes how to compile the used library , Packaging process , It doesn't contain the compiled part
Basic information
- rpm After the environment is installed, the default packaging path is /root/rpmbuild
- SPECS Yes. spec Where the papers are
- RPMS It's generated rpm Package storage location
- BUIDROOT Where intermediate files are temporarily stored
spec Introduce
Name: by rpm Name
Version: by rpm Package version number
%prep Operations before packaging
%pre install rpm Operations before package
%%%% Here is the real installation process , Will %prep Copy the file directory prepared in to the corresponding place
%post install rpm Post package operations
%preun What to do before uninstalling , Generally, it refers to operations such as stopping service
%%%% Here is the real uninstallation process , Corresponding installation process
%postun What to do after uninstallation , Generally solve the problem of unloading residues
spec Upgrade package
When upgrading , The complete execution process is as follows :
1、 Execute new package spec In file %pre paragraph .
2、 Install the dependent packages of the new package .
3、 Execute new package spec In the document %post paragraph .
4、 Execute old package spec In the document %preun paragraph .
5、 Delete old files that are not needed in the new package .
6、 Execute old package spec In the document %postun paragraph .
Distinguish between upgrade and installation
- Installation phase :%pre and %post paragraph
here $1 The content is 1 and 2
Values for 1 when , Indicates a new installation rpm package .
Values for 2 when , It means upgrading an existing package . - Unloading phase :%preun and %postun paragraph
here $1 The content is 0 and 1
Values for 0 when , Indicates deleting a package .
Values for 1 when , Indicates updating a package .
Packing command
rpmbuild --target x86_64 /mips64el/aarch64/sw_64 --bb x64.spec
边栏推荐
- Mutationobserver listens for DOM changes
- About?: Notes for
- Heavyweight! The domestic IDE is released and developed by Alibaba. It is completely open source! (high performance + high customization)
- Ideal L9 in the eyes of the post-90s: the simplest product philosophy, creating the most popular products
- Source code analysis of zeromq lockless queue
- System Verilog - thread
- Luogu p5707 [deep foundation 2. example 12] late for school
- Installing QT plug-in in Visual Studio
- Compile Caffe's project using cmake
- 【深度学习】多标签学习
猜你喜欢

1090.Phone List

Review of arrays and pointers triggered by a topic

Flexible layout (display:flex;) Attribute details

【Try to Hack】vulhub靶场搭建

15 -- k points closest to the origin

Uniapp cloud packaging app

如何裁剪动图大小?试试这个在线照片裁剪工具

Use Matplotlib to draw a line chart

Source code analysis of zeromq lockless queue
![[Ocean University of China] information sharing for the first and second examinations of postgraduate entrance examination](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[Ocean University of China] information sharing for the first and second examinations of postgraduate entrance examination
随机推荐
Vs2019 scanf error
What moment makes you think there is a bug in the world?
3. Sequential structure multiple choice questions
定位position(5种方式)
Why should the coroutine be set to non blocking IO
Add the resources directory under test in idea
Common classes in QT
使用sphinx根据py源文件自动生成API文档
How to crop GIF dynamic graph? Take this picture online clipping tool
NBD Network Block Device
[untitled] PTA check password
Gif动图如何裁剪?收下这个图片在线裁剪工具
全国首例,中国电信 5G 井下人员定位项目正式商用:可实时跟踪位置,保障作业安全
Go语言Zap库Logger的定制化和封装使用详解
Function of getinstance() method
【Try to Hack】vulnhub DC1
Arithmetic operations and expressions
Installing QT plug-in in Visual Studio
如何裁剪动图大小?试试这个在线照片裁剪工具
2. operator and expression multiple choice questions