For various reasons, sometimes you need to modify the contents of various files in the deb package directly There are three main issues that need to be addressed: 0. How to unpack the deb package file? 1. Modify the file to be modified? 2. Generate a deb package for the modified content? The unpacking command is #Unzip the files in the package to the extract directory lin@lin-host:~/Desktop/100 restart tools$ ls LongTestTools.sh loong-test-s2s3_1.0.0-2_all.deb readme.txt lin@lin-host:~/Desktop/100 times restart tool$ dpkg -X loong-test-s2s3_1.0.0-2_all.deb extract/ ./ ./usr/ ./usr/bin/ ./usr/bin/BootReplace.sh ./usr/bin/BootTest.sh ./usr/bin/LongTestTools.sh ./usr/bin/RebootReplace.sh ./usr/bin/RebootTest.sh ./usr/bin/SleepTest.sh ./usr/bin/SuspendTest.sh lin@lin-host:~/Desktop/100 restart tools$ ls extract LongTestTools.sh loong-test-s2s3_1.0.0-2_all.deb readme.txt lin@lin-host:~/Desktop/100 restart tools$ tree extract/ extract/ └── usr └── bin ├── BootReplace.sh ├── BootTest.sh ├── LongTestTools.sh ├── RebootReplace.sh ├── RebootTest.sh ├── SleepTest.sh └── SuspendTest.sh # Extract the control information of the package extract/DEBIAN/: lin@lin-host:~/Desktop/100 times restart tool$ dpkg -e loong-test-s2s3_1.0.0-2_all.deb extract/DEBIAN/ lin@lin-host:~/Desktop/100 restart tools$ tree extract/ extract/ ├── DEBIAN │ ├── control │ └── md5sums └── usr └── bin ├── BootReplace.sh ├── BootTest.sh ├── LongTestTools.sh ├── RebootReplace.sh ├── RebootTest.sh ├── SleepTest.sh └── SuspendTest.sh 3 directories, 9 files #Modify the file vi extract/usr/bin/BootTest.sh Repackage the modified content to generate a deb package lin@lin-host:~/Desktop/100 restart tool$ dpkg-deb -b extract/ dpkg-deb: Creating new software package loong-test-s2s3, package file is extract.deb. lin@lin-host:~/Desktop/100 restart tools$ ls extract extract.deb LongTestTools.sh readme.txt The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: The whole process of configuring hive metadata to MySQL
Introduction The module that limits the number of...
This article shares the specific code of Vue to i...
1.MySQL functions 1. Mathematical functions PI() ...
This article uses examples to illustrate the func...
A distinct Meaning: distinct is used to query the...
What is em? em refers to the font height, and the ...
There are two ways to install MySQL 5.7. One is t...
Table of contents Install jupyter Docker port map...
1. What is Docker? (1) Docker is an open source t...
Table of contents 1. Overview 2. Use Keepalived t...
Table of contents 1. Basic overview of the proces...
Table of contents Problem Description Cause Analy...
I believe everyone has used JD. There is a very c...
Today, the error "No input file specified&qu...
Effect: <!doctype html> <html> <he...