After installing a package using dpkg, you find that the package manager tools no longer function. You isolate the problem to a broken library and you have a copy of the fixed library in a Debian .deb file. How can you extract files from a .deb file without using the Debian package manager?
A. deb packages are compressed tar files with custom scripts.
Use GNU ‘tar’ to extract the file.
B. deb packages are redhat (rpm) packages with different fields.
Use ‘rpm’ to extract the file.
C. deb packages are simply gziped cpio files.
Use ‘gunzip’ to decompress the package and then use ‘cpio’ to extract the file.
D. deb packages use a proprietary format and the file cannot be extracted without specialized tools.
E. deb packages are ar archives with a special magic number.
Use ‘ar’ to extract the data member and then use GNU ‘tar’ to extract the file.
Correct Answer: E
Explanation/Reference:
Explanation: Debian archive (.deb) files can be parsed and manipulated by the utilityar. The precise contents of Debian archive files changed since Debian 0.93. The new contents are understood by versions of the primary package tool, dpkg, later than 0.93.76, and is described in the "deb"(5) man page. The old format is described in "deb-old"(5).
Using the command ar -t foo_VVV-RRR.deb, you’ll see that a Debian archive file contains these members:
debian-binary: Contains one or more lines; currently it contains only one line giving the version number (2.0) of the Debian package format.
control.tar.gz: A compressed (gzip’d) tar file which contains the Debian control files for this package. (Confusingly, one of these files, and the only one which is required, is itself named control.) data.tar.gz: A compressed (gzip’d) tar file which contains the executables, libraries, documentation, etc., associated with this package. In other words, this component is the filesystem data part of a Debian package.
You can extract files from the .tar.gz files using the ‘tar’ utility.
Reference: http://flits102-126.flits.rug.nl/~erik/debian/debian-faq-6.html
Incorrect Answers
A:You must first use the ‘ar’ utility to open the .deb file. Then you can use ‘tar’ to extract the required files.
B:.deb files are not rpm (redhat package manager) files, and therefore cannot be opened with the rpm utility.
C:.deb packages are not gziped cpio files, and therefore cannot be opened with gunzip and cpio.
D:.deb packages can be opened with the ‘ar’ utility; therefore, specialist tools are not required.
Download Printable PDF. VALID exam to help you PASS.
|
|