source: general/sysutils/unzip.xml@ 8fdf129

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 8fdf129 was 8fdf129, checked in by Randy McMurchy <randy@…>, 17 years ago

Fixed the Zip and Unzip download URLs

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

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