source: general/sysutils/unzip.xml@ fce275e

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 fce275e was fce275e, checked in by Randy McMurchy <randy@…>, 16 years ago

Modified all the Sourceforge download URLs to use a newly created entity instead of a hard-coded URL

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