source: general/sysutils/unzip.xml@ eede1a3

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since eede1a3 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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