@@ -7,17 +7,26 @@ ExtractCode
77- keywords: archive, extraction, libarchive, 7zip, scancode-toolkit
88
99
10- ExtractCode is a universal archive extractor. It uses behind the scenes
11- the Python standard library, a custom ctypes binding to libarchive and
12- the 7zip command line to extract a large number of common and
13- less common archives and compressed files. It tries to extract things
14- in the same way on all OSes, including auto-renaming files that would
15- not have valid names on certain filesystems or when there are multiple
16- copies of the same path in a given archive.
10+ ExtractCode is a universal archive extractor. It uses behind the scenes
11+ multiple tools such as:
12+
13+ - the Python standard library,
14+ - a custom ctypes binding to libarchive,
15+ - the 7zip command line
16+ - optionally libguestfs on Linux
17+
18+ With these it is possible to extract a large number of common and
19+
20+ less common archives and compressed files. ExtractCode tries to extract things
21+ in the same way on all OSes, including auto-renaming files that would not have
22+ valid names on certain filesystems or when there are multiple copies of the same
23+ path in a given archive (which is possible in a tar).
24+
1725The extraction is driven from a "voting" system that considers the
18- file extension(s) and name, the file type and mime type (using a ctypes
26+ file extension(s) and name, the filetype and mimetype (using a ctypes
1927binding to libmagic) to select the most appropriate extractor or
20- uncompressor function. It can handle multi-level archives such as tar.gz.
28+ decompressor function. It can handle multi-level archives such as tar.gz and
29+ can extract recursively nested archives.
2130
2231
2332
@@ -36,3 +45,44 @@ To clean up development environment::
3645 ./configure --clean
3746
3847
48+ To run the command line tool in the activated environment::
49+
50+ ./extractcode -h
51+
52+
53+ Adding support for VM images
54+ ----------------------------
55+
56+ Adding support for VM images requires the manual installation of libguestfs and
57+ it Python binding. You will need to install the libguestfs tools system package.
58+ On Debian and Ubuntu::
59+
60+ sudo apt-get install libguestfs-tools
61+
62+
63+ On Ubuntu, a manual stpe is required if the kernel executable file cannot be read.
64+ This is required by guestfish and libguestfs and this is an oddity there and not on Debian.
65+
66+ Run this command as a temporary fix::
67+
68+ for k in /boot/vmlinuz-*
69+ do sudo dpkg-statoverride --add --update root root 0644 /boot/vmlinuz-$(uname -r)
70+ done
71+
72+ or::
73+
74+ sudo chmod +r /boot/vmlinuz-*,
75+
76+
77+ For a permanent fix see:
78+
79+ - https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1813662/comments/21
80+
81+ See also for a discussion:
82+
83+ - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725
84+ - https://bugzilla.redhat.com/show_bug.cgi?id=1670790
85+ - https://bugs.launchpad.net/ubuntu/+source/libguestfs/+bug/1813662
86+
87+
88+
0 commit comments