[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: .deb File



"Amir" <amir@zedtwo.com> wrote:
>I have downloaded a .deb file and want to examing the source but don't have
>the full Debian system installed.
>
>I was wondering whether:
>
>    a) Is there a utility for Linux/Windows that will allow me to unpack a
>.deb file?

According to deb(5), (modern) Debian packages are just ar archives. ar
has been around for ever, and should be available for any Unix system;
on most Linux systems it'll be in the binutils package.

'ar x package.deb' will unpack a .deb into files called debian-binary,
control.tar.gz, and data.tar.gz, and you can then unpack those with
something like 'tar xzvf data.tar.gz'.

However, if you want the source, you'll need to download the source
package files: *.orig.tar.gz, *.diff.gz, and *.dsc for a normal package,
*.tar.gz and *.dsc for packages native to Debian. If you have the Debian
dpkg-dev package, then you can use 'dpkg-source -x package.dsc' to
unpack these; otherwise, use something like:

  tar xzvf package.orig.tar.gz
  zcat package.diff.gz | patch -p0

... or, for native Debian packages, just:

  tar xzvf package.tar.gz

HTH,

-- 
Colin Watson                                     [cjw44@flatline.org.uk]



Reply to: