source: general/sysutils/unzip.xml@ acf7e2c

basic
Last change on this file since acf7e2c was acf7e2c, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Updates to Basic BLFS Chapter 3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/basic@20519 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY unzip-download-http "&sourceforge-dl;/infozip/unzip60.tar.gz">
8 <!ENTITY unzip-download-ftp "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz">
9 <!ENTITY unzip-md5sum "62b490407489521db863b523a7f86375">
10 <!ENTITY unzip-size "1.3 MB">
11 <!ENTITY unzip-buildsize "9 MB">
12 <!ENTITY unzip-time "less than 0.1 SBU">
13]>
14
15<sect1 id="unzip" xreflabel="UnZip-&unzip-version;">
16 <?dbhtml filename="unzip.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>UnZip-&unzip-version;</title>
24
25 <indexterm zone="unzip">
26 <primary sortas="a-UnZip">UnZip</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to UnZip</title>
31
32 <para>The <application>UnZip</application> package contains
33 <filename>ZIP</filename> extraction utilities. These are useful for
34 extracting files from <filename>ZIP</filename> archives.
35 <filename>ZIP</filename> archives are created with
36 <application>PKZIP</application> or <application>Info-ZIP</application>
37 utilities, primarily in a DOS environment.</para>
38
39 &lfs83_checked;
40
41 <caution>
42 <para>The previous version of the <application>UnZip</application>
43 package had some locale related issues. Currently there are no BLFS
44 editors capable of testing these locale issues. Therefore, the
45 locale related information is left on this page, but has not been
46 tested. <!--Note that the patch recommended for the locale issues will not
47 apply to this version of <application>UnZip</application>. See the
48 discussion below in <xref linkend="unzip-locale-issues"/>. A more
49 general discussion of these problems can be found in the
50 <xref linkend="locale-assumed-encoding"/> section of the
51 <xref linkend="locale-issues"/> page.-->
52 </para>
53 </caution>
54
55 <bridgehead renderas="sect3">Package Information</bridgehead>
56 <itemizedlist spacing="compact">
57 <listitem>
58 <para>Download (HTTP): <ulink url="&unzip-download-http;"/></para>
59 </listitem>
60 <listitem>
61 <para>Download (FTP): <ulink url="&unzip-download-ftp;"/></para>
62 </listitem>
63 <listitem>
64 <para>Download MD5 sum: &unzip-md5sum;</para>
65 </listitem>
66 <listitem>
67 <para>Download size: &unzip-size;</para>
68 </listitem>
69 <listitem>
70 <para>Estimated disk space required: &unzip-buildsize;</para>
71 </listitem>
72 <listitem>
73 <para>Estimated build time: &unzip-time;</para>
74 </listitem>
75 </itemizedlist>
76<!--
77 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
78 <itemizedlist spacing='compact'> -->
79 <!-- <listitem>
80 <para>Required patch: <ulink
81 url="&patch-root;/unzip-&unzip-version;-security_fix-1.patch"/></para>
82 </listitem>
83 <listitem>
84 <para>Required patch: <ulink
85 url="&patch-root;/unzip-&unzip-version;-security_fix-2.patch"/></para>
86 </listitem> -->
87 <!--
88 <listitem>
89 <para>Optional patch (will not apply properly): <ulink
90 url="&patch-root;/unzip-5.50-alt-iconv-v1.1.patch"/></para>
91 </listitem>
92 </itemizedlist>
93 -->
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/unzip"/></para>
96
97 </sect2>
98
99 <sect2 id="unzip-locale-issues">
100 <title>UnZip Locale Issues</title>
101
102 <note>
103 <para>Use of <application>UnZip</application> in the
104 <application>JDK</application>, <application>Mozilla</application>,
105 <application>DocBook</application> or any other BLFS package
106 installation is not a problem, as BLFS instructions never use
107 <application>UnZip</application> to extract a file with non-ASCII
108 characters in the file's name.</para>
109 </note>
110
111 <para>The <application>UnZip</application> package assumes that filenames
112 stored in the ZIP archives created on non-Unix systems are encoded in
113 CP850, and that they should be converted to ISO-8859-1 when writing files
114 onto the filesystem. Such assumptions are not always valid. In fact,
115 inside the ZIP archive, filenames are encoded in the DOS codepage that is
116 in use in the relevant country, and the filenames on disk should be in
117 the locale encoding. In MS Windows, the OemToChar() C function (from
118 <filename>User32.DLL</filename>) does the correct conversion (which is
119 indeed the conversion from CP850 to a superset of ISO-8859-1 if MS
120 Windows is set up to use the US English language), but there is no
121 equivalent in Linux.</para>
122
123 <para>When using <command>unzip</command> to unpack a ZIP archive
124 containing non-ASCII filenames, the filenames are damaged because
125 <command>unzip</command> uses improper conversion when any of its
126 encoding assumptions are incorrect. For example, in the ru_RU.KOI8-R
127 locale, conversion of filenames from CP866 to KOI8-R is required, but
128 conversion from CP850 to ISO-8859-1 is done, which produces filenames
129 consisting of undecipherable characters instead of words (the closest
130 equivalent understandable example for English-only users is rot13). There
131 are several ways around this limitation:</para>
132
133 <para>1) For unpacking ZIP archives with filenames containing non-ASCII
134 characters, use <ulink url="http://www.winzip.com/">WinZip</ulink> while
135 running the <ulink url="http://www.winehq.com/">Wine</ulink> Windows
136 emulator.</para>
137
138 <para>2) After running <command>unzip</command>, fix the damage made to
139 the filenames using the <command>convmv</command> tool
140 (<ulink url="http://j3e.de/linux/convmv/"/>). The following is an example
141 for the ru_RU.KOI8-R locale:</para>
142
143 <blockquote>
144 <para>Step 1. Undo the conversion done by
145 <command>unzip</command>:</para>
146
147<screen><userinput>convmv -f iso-8859-1 -t cp850 -r --nosmart --notest \
148 <replaceable>&lt;/path/to/unzipped/files&gt;</replaceable></userinput></screen>
149
150 <para>Step 2. Do the correct conversion instead:</para>
151
152<screen><userinput>convmv -f cp866 -t koi8-r -r --nosmart --notest \
153 <replaceable>&lt;/path/to/unzipped/files&gt;</replaceable></userinput></screen>
154 </blockquote>
155<!--
156 <para>3) Apply the optional
157 <filename>unzip-5.50-alt-iconv-v1.1.patch</filename> patch to
158 <application>UnZip</application>. It will apply with some offsets.</para>
159
160 <para>It allows to specify the assumed filename encoding in the ZIP
161 archive using the <option>-O charset_name</option> option and the
162 on-disk filename encoding using the <option>-I charset_name</option>
163 option. Defaults: the on-disk filename encoding is the locale encoding,
164 the encoding inside the ZIP archive is guessed according to the builtin
165 table based on the locale encoding. For US English users, this still
166 means that unzip converts from CP850 to ISO-8859-1 by default.</para>
167
168 <para>Caveat: this method works only with 8-bit locale encodings, not
169 with UTF-8. Attempting to use a patched <command>unzip</command> in UTF-8
170 locales may result in a segmentation fault and is probably a security
171 risk.</para>
172-->
173 </sect2>
174
175 <sect2 role="installation">
176 <title>Installation of UnZip</title>
177
178 <!-- <para>Note that if you applied the patch described above for locale issues,
179 the first required security patch will have some offsets. Now install
180 <application>UnZip</application> by running the following commands:</para> -->
181
182<screen><userinput>make -f unix/Makefile generic</userinput></screen>
183
184 <para>The test suite does not work for present target <quote>generic</quote>.</para>
185
186 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
187
188<screen role="root"><userinput>make prefix=/usr MANDIR=/usr/share/man/man1 \
189 -f unix/Makefile install</userinput></screen>
190
191 </sect2>
192
193 <sect2 role="commands">
194 <title>Command Explanations</title>
195
196 <para><command>make -f unix/Makefile generic</command>:
197 This target begins by running a configure script (unlike the older targets
198 such as linux and linux_noasm) which creates a flags file that is then used
199 in the build. This ensures that the 32-bit x86 build receives the right
200 flags to unzip files which which are larger than 2GB when extracted.</para>
201
202 </sect2>
203
204 <sect2 role="content">
205 <title>Contents</title>
206
207 <segmentedlist>
208 <segtitle>Installed Programs</segtitle>
209 <segtitle>Installed Libraries</segtitle>
210 <segtitle>Installed Directories</segtitle>
211
212 <seglistitem>
213 <seg>funzip, unzip, unzipfsx, zipgrep, and zipinfo</seg>
214 <seg>None</seg>
215 <seg>None</seg>
216 </seglistitem>
217 </segmentedlist>
218
219 <variablelist>
220 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
221 <?dbfo list-presentation="list"?>
222 <?dbhtml list-presentation="table"?>
223
224 <varlistentry id="funzip">
225 <term><command>funzip</command></term>
226 <listitem>
227 <para>allows the output of <command>unzip</command> commands to be
228 redirected.</para>
229 <indexterm zone="unzip funzip">
230 <primary sortas="b-funzip">funzip</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry id="unzip-prog">
236 <term><command>unzip</command></term>
237 <listitem>
238 <para>lists, tests or extracts files from a <filename>ZIP</filename>
239 archive.</para>
240 <indexterm zone="unzip unzip-prog">
241 <primary sortas="b-unzip">unzip</primary>
242 </indexterm>
243 </listitem>
244 </varlistentry>
245
246 <varlistentry id="unzipfsx">
247 <term><command>unzipfsx</command></term>
248 <listitem>
249 <para>is a self-extracting stub that can be prepended to a
250 <filename>ZIP</filename> archive. Files in this format allow the
251 recipient to decompress the archive without installing
252 <application>UnZip</application>.</para>
253 <indexterm zone="unzip unzipfsx">
254 <primary sortas="b-unzipfsx">unzipfsx</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="zipgrep">
260 <term><command>zipgrep</command></term>
261 <listitem>
262 <para>searches files in a <filename>ZIP</filename> archive for
263 lines matching a pattern.</para>
264 <indexterm zone="unzip zipgrep">
265 <primary sortas="b-zipgrep">zipgrep</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="zipinfo">
271 <term><command>zipinfo</command></term>
272 <listitem>
273 <para>produces technical information about the files in a
274 <filename>ZIP</filename> archive, including file access permissions,
275 encryption status, type of compression, etc.</para>
276 <indexterm zone="unzip zipinfo">
277 <primary sortas="b-zipinfo">zipinfo</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281<!--
282 <varlistentry id="libunzip">
283 <term><filename class='libraryfile'>libunzip.so</filename></term>
284 <listitem>
285 <para>contains the API functions required by the
286 <application>UnZip</application> programs.</para>
287 <indexterm zone="unzip libunzip">
288 <primary sortas="c-libunzip">libunzip.so</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292-->
293 </variablelist>
294
295 </sect2>
296
297</sect1>
Note: See TracBrowser for help on using the repository browser.