Insights in .deb format ( just sharing what I learned )

Hello o/

I have been trying to understand the .deb package format and here is what I have learned about it so far.

first layer is the most simple it's just a basic ar archive and we can extract is using ar x filename.deb command. you will see the following files:

control.tar.xz
data.tar.xz
debian-binary
  • debian-binary file specifies the .deb file version which will be 2.0 in most cases.
  • control.tar.xz file contains all the the metadata about the package like the dependencies etc.
  • data.tar.xz file is the file that actually contains all the provided files by the packages.

source:

28 points · 2 comments · view on lemmy.world

2 Comments

hendrik@palaver.p3x.de · 10 pts · 280d
gerowen@piefed.social · 9 pts · 280d

dpkg-deb --build
Makes it super simple to create one. You just lay out a folder with the contents you want to be installed. Just make sure it has a DEBIAN/control sub folder/file because that control file is where you can specify dependencies, package version, name, etc.