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
Primitive values -> primitive types Number S...
Mysql supports 3 types of lock structures Table-l...
This article summarizes various ways to implement...
Async Hooks is a new feature of Node8. It provide...
Detailed explanation of MySql automatic truncatio...
Preface The CentOS environment variable configura...
Are you still looking for a way to enable Hyper-v...
1. Find the corresponding nodejs package, refer t...
CSS has two pseudo-classes that are not commonly ...
BEM from QQtabBar First of all, what does BEM mea...
Table of contents Basic database operations 2) Vi...
Table of contents Million-level data processing s...
This article shares the installation and configur...
As shown below: //Query the year and month of the...
Tab switching is also a common technology in proj...