Linux::debian::packages: Difference between revisions
Jump to navigation
Jump to search
(Created page with " =Change the dependencies of a deb package= [https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiK3sGZ_qj0AhXMwAIHHfiHDE0QFnoECAQQAw&url=https%3A%2F%2Fc...") |
(No difference)
|
Latest revision as of 14:41, 21 November 2021
Change the dependencies of a deb package
You can change the dependencies of a deb package like this:
- Unpack deb: ar x golden-linux.deb (will create i.e. three files: debian-binary control.tar.gz data.tar.gz)
- Unpack control archive and store to variable: FILES=$(tar zxvf control.tar.gz) (will create: postinst postrm preinst prerm md5sums control)
- Fix dependencies in control (use a text editor)
- Repack control.tar.gz: tar zcf control.tar.gz $FILES
- Repack deb: ar rcs newpackage.deb debian-binary control.tar.gz data.tar.gz (order important! See [Note] )
[Note]: dpkg wouldn't be able to read the metadata of a package quickly if it had to search for where the data section ended!