0

I'm trying to decompile a source package because I want to look at the preist en prerm files. Those files are normally in the debian folder but when I extract the source package I don't find any debian folder. Is there a simple command or other way to get the debian folder?

Thanks in advance

Mr.B
  • 67
  • 3
  • 9

4 Answers4

1

try ar x [dpkg-package] (where dpkg-package is the binary-package) which generates a control.tar.gz which contains the postinst (and other) files.

theomega
  • 31,591
  • 21
  • 89
  • 127
1

If you want to to it from the source for package foo:

apt-get source foo

which will get the .orig.tar.gz, the .dsc with control information and the .diff.gz with Debian changes (if any) and the debian/ directory added to the source for the build. It will have (pre|post)(inst|rm) files too.

From the .deb binary, you can use ar and tar as per the other answer.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
0

It is actually simple: The debian subdirectory is only there in the source for dpkg, i.e. it is a meta-directory used by dpkg, and dpkg will look at it and build the final .deb, where there is only a textfile "debian-binary", a "data.tar.gz" and a "control.tar.gz".

To get the initial "debian" directory, you would have to look at the upstream source control, or ask the maintainer/s of the package.

Sebastian Mach
  • 38,570
  • 8
  • 95
  • 130
0

Try

apt-get source packagename

this will download the file and decompress it, along with debian specific files.

lbedogni
  • 7,917
  • 8
  • 30
  • 51