source: general/sysutils/unzip.xml@ 9029db2

10.1 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 9029db2 was 9029db2, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tag most of General Libraries and dependencies

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

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