source: general/sysutils/unzip.xml@ 0fab41a

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 0fab41a was f8b4f14, checked in by Bruce Dubbs <bdubbs@…>, 15 months ago

Minor changes.
Remove unzipi ftp url.
Add jemalloc as an optional external dependency for bind.

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