Re: how to extract *.deb files, etc.
On Wed, Jul 04, 2001 at 09:40:18AM +0200, Sebastiaan wrote:
>
> On Wed, 4 Jul 2001, Jeremy Gaddis wrote:
>
> > As far as extracting Debian package files ("*.deb's") goes,
> > I've found the easiest way is to use "alien" (apt-get install
> > alien) and convert it to a tarball ("*.tar.gz").
> >
> Why go that way?
> $ mkdir /tmp/foo
> $ dpkg -X foo.deb /tmp/foo
Try this, even works on $proprietary_unix.
[ Of course, that doesn't mean that you shouldn't use
the appropriate high-level tools (like dselect). :-) ]
# what's that?
man ar
ar --help
# list archive members:
ar t foo.deb
# same, with file attributes:
ar tv foo.deb
# version of binary package:
ar p foo.deb debian-binary
# the package metadata:
ap p foo.deb control.tar.gz | file -
ar p foo.deb control.tar.gz | zcat | file -
ar p foo.deb control.tar.gz | tar ztf -
ar p foo.deb control.tar.gz | tar ztvf -
# extract all metadata files to current directory:
ar p foo.deb control.tar.gz | tar zxf -
# dump plain text contents of metadata to stdout:
ar p foo.deb control.tar.gz | tar zxOf -
# with filenames interspersed:
ar p foo.deb control.tar.gz | tar zxvOf - 2>&1
# extract the control info to stdout:
ar p foo.deb control.tar.gz | tar zxOf - ./control
# the package payload:
ar p foo.deb data.tar.gz | file -
ar p foo.deb data.tar.gz | zcat | file -
ar p foo.deb data.tar.gz | tar ztf -
ar p foo.deb data.tar.gz | tar ztvf -
# extract all installable files from package to current directory:
ar p foo.deb data.tar.gz | tar zxf -
# extract all installable files from package to /:
ar p foo.deb data.tar.gz | ( cd / ; tar zxf - )
# extract the copyright info from package contents to stdout:
ar p foo.deb data.tar.gz | tar zxOf - "*/doc/*/copyright"
Cheers,
Joost
Reply to: