Linux::debian::packages

From www.deloptes.org
Revision as of 13:41, 21 November 2021 by Admin (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Change the dependencies of a deb package

https://coderwall.com

You can change the dependencies of a deb package like this:

  1. Unpack deb: ar x golden-linux.deb (will create i.e. three files: debian-binary control.tar.gz data.tar.gz)
  2. Unpack control archive and store to variable: FILES=$(tar zxvf control.tar.gz) (will create: postinst postrm preinst prerm md5sums control)
  3. Fix dependencies in control (use a text editor)
  4. Repack control.tar.gz: tar zcf control.tar.gz $FILES
  5. 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!