source: general/sysutils/unzip.xml@ ef1a22c6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since ef1a22c6 was ef1a22c6, checked in by Randy McMurchy <randy@…>, 14 years ago

Updated to UnZip-6.0

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8251 af4574ff-66df-0310-9fd7-8a98e5e911e0

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