[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[8dfc5c3] | 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">
|
---|
[ef1a22c6] | 9 | <!ENTITY unzip-md5sum "62b490407489521db863b523a7f86375">
|
---|
| 10 | <!ENTITY unzip-size "1.3 MB">
|
---|
| 11 | <!ENTITY unzip-buildsize "9 MB">
|
---|
[d45a8367] | 12 | <!ENTITY unzip-time "less than 0.1 SBU">
|
---|
[52d29f7] | 13 | ]>
|
---|
| 14 |
|
---|
[5c5cdbc] | 15 | <sect1 id="unzip" xreflabel="UnZip-&unzip-version;">
|
---|
[c88ffaa] | 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 |
|
---|
[539ace5] | 32 | <para>The <application>UnZip</application> package contains
|
---|
[9c90b1b] | 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.</para>
|
---|
| 38 |
|
---|
[048b9a46] | 39 | &lfs83_checked;
|
---|
[06f76d2c] | 40 |
|
---|
[9c90b1b] | 41 | <caution>
|
---|
[ef1a22c6] | 42 | <para>The previous version of the <application>UnZip</application>
|
---|
| 43 | package had some locale related issues. Currently there are no BLFS
|
---|
[8c5d05a7] | 44 | editors capable of testing these locale issues. Therefore, the
|
---|
[ef1a22c6] | 45 | locale related information is left on this page, but has not been
|
---|
[f1c2a4f] | 46 | tested. <!--Note that the patch recommended for the locale issues will not
|
---|
[ef1a22c6] | 47 | apply to this version of <application>UnZip</application>. See the
|
---|
[f1c2a4f] | 48 | discussion below in <xref linkend="unzip-locale-issues"/>. --> A more
|
---|
[ef1a22c6] | 49 | general discussion of these problems can be found in the
|
---|
| 50 | <xref linkend="locale-assumed-encoding"/> section of the
|
---|
[86eaa277] | 51 | <xref linkend="locale-issues"/> page.</para>
|
---|
[9c90b1b] | 52 | </caution>
|
---|
[c88ffaa] | 53 |
|
---|
| 54 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 55 | <itemizedlist spacing="compact">
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Download (HTTP): <ulink url="&unzip-download-http;"/></para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>Download (FTP): <ulink url="&unzip-download-ftp;"/></para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>Download MD5 sum: &unzip-md5sum;</para>
|
---|
| 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
| 66 | <para>Download size: &unzip-size;</para>
|
---|
| 67 | </listitem>
|
---|
| 68 | <listitem>
|
---|
| 69 | <para>Estimated disk space required: &unzip-buildsize;</para>
|
---|
| 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
| 72 | <para>Estimated build time: &unzip-time;</para>
|
---|
| 73 | </listitem>
|
---|
| 74 | </itemizedlist>
|
---|
[f1c2a4f] | 75 | <!--
|
---|
[864b24de] | 76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[f1c2a4f] | 77 | <itemizedlist spacing='compact'> -->
|
---|
[ef1a22c6] | 78 | <!-- <listitem>
|
---|
[864b24de] | 79 | <para>Required patch: <ulink
|
---|
| 80 | url="&patch-root;/unzip-&unzip-version;-security_fix-1.patch"/></para>
|
---|
| 81 | </listitem>
|
---|
[c91c114] | 82 | <listitem>
|
---|
| 83 | <para>Required patch: <ulink
|
---|
| 84 | url="&patch-root;/unzip-&unzip-version;-security_fix-2.patch"/></para>
|
---|
[ef1a22c6] | 85 | </listitem> -->
|
---|
[f1c2a4f] | 86 | <!--
|
---|
[c91c114] | 87 | <listitem>
|
---|
[ef1a22c6] | 88 | <para>Optional patch (will not apply properly): <ulink
|
---|
[c91c114] | 89 | url="&patch-root;/unzip-5.50-alt-iconv-v1.1.patch"/></para>
|
---|
| 90 | </listitem>
|
---|
[864b24de] | 91 | </itemizedlist>
|
---|
[f1c2a4f] | 92 | -->
|
---|
[1039de3] | 93 | <para condition="html" role="usernotes">User Notes:
|
---|
| 94 | <ulink url="&blfs-wiki;/unzip"/></para>
|
---|
| 95 |
|
---|
[c88ffaa] | 96 | </sect2>
|
---|
| 97 |
|
---|
[86eaa277] | 98 | <sect2 id="unzip-locale-issues">
|
---|
| 99 | <title>UnZip Locale Issues</title>
|
---|
| 100 |
|
---|
| 101 | <note>
|
---|
| 102 | <para>Use of <application>UnZip</application> in the
|
---|
| 103 | <application>JDK</application>, <application>Mozilla</application>,
|
---|
| 104 | <application>DocBook</application> or any other BLFS package
|
---|
| 105 | installation is not a problem, as BLFS instructions never use
|
---|
| 106 | <application>UnZip</application> to extract a file with non-ASCII
|
---|
| 107 | characters in the file's name.</para>
|
---|
| 108 | </note>
|
---|
| 109 |
|
---|
| 110 | <para>The <application>UnZip</application> package assumes that filenames
|
---|
| 111 | stored in the ZIP archives created on non-Unix systems are encoded in
|
---|
| 112 | CP850, and that they should be converted to ISO-8859-1 when writing files
|
---|
| 113 | onto the filesystem. Such assumptions are not always valid. In fact,
|
---|
| 114 | inside the ZIP archive, filenames are encoded in the DOS codepage that is
|
---|
| 115 | in use in the relevant country, and the filenames on disk should be in
|
---|
| 116 | the locale encoding. In MS Windows, the OemToChar() C function (from
|
---|
| 117 | <filename>User32.DLL</filename>) does the correct conversion (which is
|
---|
| 118 | indeed the conversion from CP850 to a superset of ISO-8859-1 if MS
|
---|
| 119 | Windows is set up to use the US English language), but there is no
|
---|
| 120 | equivalent in Linux.</para>
|
---|
| 121 |
|
---|
| 122 | <para>When using <command>unzip</command> to unpack a ZIP archive
|
---|
| 123 | containing non-ASCII filenames, the filenames are damaged because
|
---|
| 124 | <command>unzip</command> uses improper conversion when any of its
|
---|
| 125 | encoding assumptions are incorrect. For example, in the ru_RU.KOI8-R
|
---|
| 126 | locale, conversion of filenames from CP866 to KOI8-R is required, but
|
---|
| 127 | conversion from CP850 to ISO-8859-1 is done, which produces filenames
|
---|
| 128 | consisting of undecipherable characters instead of words (the closest
|
---|
| 129 | equivalent understandable example for English-only users is rot13). There
|
---|
| 130 | are several ways around this limitation:</para>
|
---|
| 131 |
|
---|
| 132 | <para>1) For unpacking ZIP archives with filenames containing non-ASCII
|
---|
[8fdf129] | 133 | characters, use <ulink url="http://www.winzip.com/">WinZip</ulink> while
|
---|
| 134 | running the <ulink url="http://www.winehq.com/">Wine</ulink> Windows
|
---|
[86eaa277] | 135 | emulator.</para>
|
---|
| 136 |
|
---|
| 137 | <para>2) After running <command>unzip</command>, fix the damage made to
|
---|
| 138 | the filenames using the <command>convmv</command> tool
|
---|
| 139 | (<ulink url="http://j3e.de/linux/convmv/"/>). The following is an example
|
---|
| 140 | for the ru_RU.KOI8-R locale:</para>
|
---|
| 141 |
|
---|
| 142 | <blockquote>
|
---|
| 143 | <para>Step 1. Undo the conversion done by
|
---|
| 144 | <command>unzip</command>:</para>
|
---|
| 145 |
|
---|
| 146 | <screen><userinput>convmv -f iso-8859-1 -t cp850 -r --nosmart --notest \
|
---|
| 147 | <replaceable></path/to/unzipped/files></replaceable></userinput></screen>
|
---|
| 148 |
|
---|
| 149 | <para>Step 2. Do the correct conversion instead:</para>
|
---|
| 150 |
|
---|
| 151 | <screen><userinput>convmv -f cp866 -t koi8-r -r --nosmart --notest \
|
---|
| 152 | <replaceable></path/to/unzipped/files></replaceable></userinput></screen>
|
---|
| 153 | </blockquote>
|
---|
[f1c2a4f] | 154 | <!--
|
---|
[81066706] | 155 | <para>3) Apply the optional
|
---|
| 156 | <filename>unzip-5.50-alt-iconv-v1.1.patch</filename> patch to
|
---|
| 157 | <application>UnZip</application>. It will apply with some offsets.</para>
|
---|
[86eaa277] | 158 |
|
---|
| 159 | <para>It allows to specify the assumed filename encoding in the ZIP
|
---|
| 160 | archive using the <option>-O charset_name</option> option and the
|
---|
| 161 | on-disk filename encoding using the <option>-I charset_name</option>
|
---|
| 162 | option. Defaults: the on-disk filename encoding is the locale encoding,
|
---|
| 163 | the encoding inside the ZIP archive is guessed according to the builtin
|
---|
| 164 | table based on the locale encoding. For US English users, this still
|
---|
| 165 | means that unzip converts from CP850 to ISO-8859-1 by default.</para>
|
---|
| 166 |
|
---|
| 167 | <para>Caveat: this method works only with 8-bit locale encodings, not
|
---|
| 168 | with UTF-8. Attempting to use a patched <command>unzip</command> in UTF-8
|
---|
| 169 | locales may result in a segmentation fault and is probably a security
|
---|
| 170 | risk.</para>
|
---|
[f1c2a4f] | 171 | -->
|
---|
[86eaa277] | 172 | </sect2>
|
---|
| 173 |
|
---|
[c88ffaa] | 174 | <sect2 role="installation">
|
---|
| 175 | <title>Installation of UnZip</title>
|
---|
| 176 |
|
---|
[ef1a22c6] | 177 | <!-- <para>Note that if you applied the patch described above for locale issues,
|
---|
[c91c114] | 178 | the first required security patch will have some offsets. Now install
|
---|
[ef1a22c6] | 179 | <application>UnZip</application> by running the following commands:</para> -->
|
---|
[c88ffaa] | 180 |
|
---|
[abd464a] | 181 | <screen><userinput>make -f unix/Makefile generic</userinput></screen>
|
---|
[c88ffaa] | 182 |
|
---|
[a706332] | 183 | <para>The test suite does not work for present target <quote>generic</quote>.</para>
|
---|
[f3429309] | 184 |
|
---|
[c88ffaa] | 185 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 186 |
|
---|
[abd464a] | 187 | <screen role="root"><userinput>make prefix=/usr MANDIR=/usr/share/man/man1 \
|
---|
| 188 | -f unix/Makefile install</userinput></screen>
|
---|
[c88ffaa] | 189 |
|
---|
| 190 | </sect2>
|
---|
| 191 |
|
---|
| 192 | <sect2 role="commands">
|
---|
| 193 | <title>Command Explanations</title>
|
---|
| 194 |
|
---|
[f1d7196] | 195 | <para><command>make -f unix/Makefile generic</command>:
|
---|
[abd464a] | 196 | This target begins by running a configure script (unlike the older targets
|
---|
| 197 | such as linux and linux_noasm) which creates a flags file that is then used
|
---|
| 198 | in the build. This ensures that the 32-bit x86 build receives the right
|
---|
| 199 | flags to unzip files which which are larger than 2GB when extracted.</para>
|
---|
[c88ffaa] | 200 |
|
---|
| 201 | </sect2>
|
---|
| 202 |
|
---|
| 203 | <sect2 role="content">
|
---|
| 204 | <title>Contents</title>
|
---|
| 205 |
|
---|
| 206 | <segmentedlist>
|
---|
| 207 | <segtitle>Installed Programs</segtitle>
|
---|
[0573d3fc] | 208 | <segtitle>Installed Libraries</segtitle>
|
---|
[c88ffaa] | 209 | <segtitle>Installed Directories</segtitle>
|
---|
| 210 |
|
---|
| 211 | <seglistitem>
|
---|
| 212 | <seg>funzip, unzip, unzipfsx, zipgrep, and zipinfo</seg>
|
---|
[0573d3fc] | 213 | <seg>None</seg>
|
---|
[c88ffaa] | 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>
|
---|
[539ace5] | 226 | <para>allows the output of <command>unzip</command> commands to be
|
---|
[c88ffaa] | 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>
|
---|
[0619e6d] | 237 | <para>lists, tests or extracts files from a <filename>ZIP</filename>
|
---|
[c88ffaa] | 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>
|
---|
[539ace5] | 248 | <para>is a self-extracting stub that can be prepended to a
|
---|
[9c90b1b] | 249 | <filename>ZIP</filename> archive. Files in this format allow the
|
---|
| 250 | recipient to decompress the archive without installing
|
---|
[c88ffaa] | 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>
|
---|
[539ace5] | 261 | <para>searches files in a <filename>ZIP</filename> archive for
|
---|
[c88ffaa] | 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>
|
---|
[539ace5] | 272 | <para>produces technical information about the files in a
|
---|
| 273 | <filename>ZIP</filename> archive, including file access permissions,
|
---|
[c88ffaa] | 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>
|
---|
[44b8f10] | 280 | <!--
|
---|
[c88ffaa] | 281 | <varlistentry id="libunzip">
|
---|
| 282 | <term><filename class='libraryfile'>libunzip.so</filename></term>
|
---|
| 283 | <listitem>
|
---|
[539ace5] | 284 | <para>contains the API functions required by the
|
---|
[c88ffaa] | 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>
|
---|
[44b8f10] | 291 | -->
|
---|
[c88ffaa] | 292 | </variablelist>
|
---|
| 293 |
|
---|
| 294 | </sect2>
|
---|
[f45b1953] | 295 |
|
---|
| 296 | </sect1>
|
---|