[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 |
|
---|
[82bdecf] | 39 | &lfs90_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>
|
---|
[f5304565] | 75 |
|
---|
[864b24de] | 76 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[f5304565] | 77 | <itemizedlist spacing='compact'>
|
---|
[c91c114] | 78 | <listitem>
|
---|
| 79 | <para>Required patch: <ulink
|
---|
[f5304565] | 80 | url="&patch-root;/unzip-&unzip-version;-consolidated_fixes-1.patch"/></para>
|
---|
[c91c114] | 81 | </listitem>
|
---|
[864b24de] | 82 | </itemizedlist>
|
---|
[f5304565] | 83 |
|
---|
[1039de3] | 84 | <para condition="html" role="usernotes">User Notes:
|
---|
| 85 | <ulink url="&blfs-wiki;/unzip"/></para>
|
---|
| 86 |
|
---|
[c88ffaa] | 87 | </sect2>
|
---|
| 88 |
|
---|
[86eaa277] | 89 | <sect2 id="unzip-locale-issues">
|
---|
| 90 | <title>UnZip Locale Issues</title>
|
---|
| 91 |
|
---|
| 92 | <note>
|
---|
| 93 | <para>Use of <application>UnZip</application> in the
|
---|
| 94 | <application>JDK</application>, <application>Mozilla</application>,
|
---|
| 95 | <application>DocBook</application> or any other BLFS package
|
---|
| 96 | installation is not a problem, as BLFS instructions never use
|
---|
| 97 | <application>UnZip</application> to extract a file with non-ASCII
|
---|
| 98 | characters in the file's name.</para>
|
---|
| 99 | </note>
|
---|
| 100 |
|
---|
[f5304565] | 101 | <para>These issues are thought to be fixed in the patch. But since none
|
---|
| 102 | of the editors have data to test this, the following workarounds are
|
---|
| 103 | retained in case they might still be needed.</para>
|
---|
| 104 |
|
---|
[86eaa277] | 105 | <para>The <application>UnZip</application> package assumes that filenames
|
---|
| 106 | stored in the ZIP archives created on non-Unix systems are encoded in
|
---|
| 107 | CP850, and that they should be converted to ISO-8859-1 when writing files
|
---|
| 108 | onto the filesystem. Such assumptions are not always valid. In fact,
|
---|
| 109 | inside the ZIP archive, filenames are encoded in the DOS codepage that is
|
---|
| 110 | in use in the relevant country, and the filenames on disk should be in
|
---|
| 111 | the locale encoding. In MS Windows, the OemToChar() C function (from
|
---|
| 112 | <filename>User32.DLL</filename>) does the correct conversion (which is
|
---|
| 113 | indeed the conversion from CP850 to a superset of ISO-8859-1 if MS
|
---|
| 114 | Windows is set up to use the US English language), but there is no
|
---|
| 115 | equivalent in Linux.</para>
|
---|
| 116 |
|
---|
| 117 | <para>When using <command>unzip</command> to unpack a ZIP archive
|
---|
| 118 | containing non-ASCII filenames, the filenames are damaged because
|
---|
| 119 | <command>unzip</command> uses improper conversion when any of its
|
---|
| 120 | encoding assumptions are incorrect. For example, in the ru_RU.KOI8-R
|
---|
| 121 | locale, conversion of filenames from CP866 to KOI8-R is required, but
|
---|
| 122 | conversion from CP850 to ISO-8859-1 is done, which produces filenames
|
---|
| 123 | consisting of undecipherable characters instead of words (the closest
|
---|
| 124 | equivalent understandable example for English-only users is rot13). There
|
---|
| 125 | are several ways around this limitation:</para>
|
---|
| 126 |
|
---|
| 127 | <para>1) For unpacking ZIP archives with filenames containing non-ASCII
|
---|
[8fdf129] | 128 | characters, use <ulink url="http://www.winzip.com/">WinZip</ulink> while
|
---|
| 129 | running the <ulink url="http://www.winehq.com/">Wine</ulink> Windows
|
---|
[86eaa277] | 130 | emulator.</para>
|
---|
| 131 |
|
---|
[8a3feaa] | 132 | <para>2) Use <command>bsdtar -xf</command> from
|
---|
| 133 | <xref role="nodep" linkend="libarchive"/> to unpack the ZIP archive.
|
---|
| 134 | Then fix the damage made to
|
---|
[86eaa277] | 135 | the filenames using the <command>convmv</command> tool
|
---|
| 136 | (<ulink url="http://j3e.de/linux/convmv/"/>). The following is an example
|
---|
[810c25c] | 137 | for the zh_CN.UTF-8 locale:</para>
|
---|
[86eaa277] | 138 |
|
---|
[810c25c] | 139 | <screen><userinput>convmv -f cp936 -t utf-8 -r --nosmart --notest \
|
---|
[86eaa277] | 140 | <replaceable></path/to/unzipped/files></replaceable></userinput></screen>
|
---|
[f1c2a4f] | 141 | <!--
|
---|
[81066706] | 142 | <para>3) Apply the optional
|
---|
| 143 | <filename>unzip-5.50-alt-iconv-v1.1.patch</filename> patch to
|
---|
| 144 | <application>UnZip</application>. It will apply with some offsets.</para>
|
---|
[86eaa277] | 145 |
|
---|
| 146 | <para>It allows to specify the assumed filename encoding in the ZIP
|
---|
| 147 | archive using the <option>-O charset_name</option> option and the
|
---|
| 148 | on-disk filename encoding using the <option>-I charset_name</option>
|
---|
| 149 | option. Defaults: the on-disk filename encoding is the locale encoding,
|
---|
| 150 | the encoding inside the ZIP archive is guessed according to the builtin
|
---|
| 151 | table based on the locale encoding. For US English users, this still
|
---|
| 152 | means that unzip converts from CP850 to ISO-8859-1 by default.</para>
|
---|
| 153 |
|
---|
| 154 | <para>Caveat: this method works only with 8-bit locale encodings, not
|
---|
| 155 | with UTF-8. Attempting to use a patched <command>unzip</command> in UTF-8
|
---|
| 156 | locales may result in a segmentation fault and is probably a security
|
---|
| 157 | risk.</para>
|
---|
[f1c2a4f] | 158 | -->
|
---|
[86eaa277] | 159 | </sect2>
|
---|
| 160 |
|
---|
[c88ffaa] | 161 | <sect2 role="installation">
|
---|
| 162 | <title>Installation of UnZip</title>
|
---|
| 163 |
|
---|
[f5304565] | 164 | <para>
|
---|
| 165 | First apply the patch:
|
---|
| 166 | </para>
|
---|
| 167 |
|
---|
| 168 | <screen><userinput remap="pre">patch -Np1 -i ../unzip-&unzip-version;-consolidated_fixes-1.patch</userinput></screen>
|
---|
| 169 |
|
---|
| 170 | <para>
|
---|
| 171 | Now compile the package:
|
---|
| 172 | </para>
|
---|
[c88ffaa] | 173 |
|
---|
[abd464a] | 174 | <screen><userinput>make -f unix/Makefile generic</userinput></screen>
|
---|
[c88ffaa] | 175 |
|
---|
[f5304565] | 176 | <para>The test suite does not work for target <quote>generic</quote>.</para>
|
---|
[f3429309] | 177 |
|
---|
[c88ffaa] | 178 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 179 |
|
---|
[abd464a] | 180 | <screen role="root"><userinput>make prefix=/usr MANDIR=/usr/share/man/man1 \
|
---|
| 181 | -f unix/Makefile install</userinput></screen>
|
---|
[c88ffaa] | 182 |
|
---|
| 183 | </sect2>
|
---|
| 184 |
|
---|
| 185 | <sect2 role="commands">
|
---|
| 186 | <title>Command Explanations</title>
|
---|
| 187 |
|
---|
[f1d7196] | 188 | <para><command>make -f unix/Makefile generic</command>:
|
---|
[abd464a] | 189 | This target begins by running a configure script (unlike the older targets
|
---|
| 190 | such as linux and linux_noasm) which creates a flags file that is then used
|
---|
| 191 | in the build. This ensures that the 32-bit x86 build receives the right
|
---|
| 192 | flags to unzip files which which are larger than 2GB when extracted.</para>
|
---|
[c88ffaa] | 193 |
|
---|
| 194 | </sect2>
|
---|
| 195 |
|
---|
| 196 | <sect2 role="content">
|
---|
| 197 | <title>Contents</title>
|
---|
| 198 |
|
---|
| 199 | <segmentedlist>
|
---|
| 200 | <segtitle>Installed Programs</segtitle>
|
---|
[0573d3fc] | 201 | <segtitle>Installed Libraries</segtitle>
|
---|
[c88ffaa] | 202 | <segtitle>Installed Directories</segtitle>
|
---|
| 203 |
|
---|
| 204 | <seglistitem>
|
---|
| 205 | <seg>funzip, unzip, unzipfsx, zipgrep, and zipinfo</seg>
|
---|
[0573d3fc] | 206 | <seg>None</seg>
|
---|
[c88ffaa] | 207 | <seg>None</seg>
|
---|
| 208 | </seglistitem>
|
---|
| 209 | </segmentedlist>
|
---|
| 210 |
|
---|
| 211 | <variablelist>
|
---|
| 212 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 213 | <?dbfo list-presentation="list"?>
|
---|
| 214 | <?dbhtml list-presentation="table"?>
|
---|
| 215 |
|
---|
| 216 | <varlistentry id="funzip">
|
---|
| 217 | <term><command>funzip</command></term>
|
---|
| 218 | <listitem>
|
---|
[539ace5] | 219 | <para>allows the output of <command>unzip</command> commands to be
|
---|
[c88ffaa] | 220 | redirected.</para>
|
---|
| 221 | <indexterm zone="unzip funzip">
|
---|
| 222 | <primary sortas="b-funzip">funzip</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | <varlistentry id="unzip-prog">
|
---|
| 228 | <term><command>unzip</command></term>
|
---|
| 229 | <listitem>
|
---|
[0619e6d] | 230 | <para>lists, tests or extracts files from a <filename>ZIP</filename>
|
---|
[c88ffaa] | 231 | archive.</para>
|
---|
| 232 | <indexterm zone="unzip unzip-prog">
|
---|
| 233 | <primary sortas="b-unzip">unzip</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
| 238 | <varlistentry id="unzipfsx">
|
---|
| 239 | <term><command>unzipfsx</command></term>
|
---|
| 240 | <listitem>
|
---|
[539ace5] | 241 | <para>is a self-extracting stub that can be prepended to a
|
---|
[9c90b1b] | 242 | <filename>ZIP</filename> archive. Files in this format allow the
|
---|
| 243 | recipient to decompress the archive without installing
|
---|
[c88ffaa] | 244 | <application>UnZip</application>.</para>
|
---|
| 245 | <indexterm zone="unzip unzipfsx">
|
---|
| 246 | <primary sortas="b-unzipfsx">unzipfsx</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
| 250 |
|
---|
| 251 | <varlistentry id="zipgrep">
|
---|
| 252 | <term><command>zipgrep</command></term>
|
---|
| 253 | <listitem>
|
---|
[539ace5] | 254 | <para>searches files in a <filename>ZIP</filename> archive for
|
---|
[c88ffaa] | 255 | lines matching a pattern.</para>
|
---|
| 256 | <indexterm zone="unzip zipgrep">
|
---|
| 257 | <primary sortas="b-zipgrep">zipgrep</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
| 262 | <varlistentry id="zipinfo">
|
---|
| 263 | <term><command>zipinfo</command></term>
|
---|
| 264 | <listitem>
|
---|
[539ace5] | 265 | <para>produces technical information about the files in a
|
---|
| 266 | <filename>ZIP</filename> archive, including file access permissions,
|
---|
[c88ffaa] | 267 | encryption status, type of compression, etc.</para>
|
---|
| 268 | <indexterm zone="unzip zipinfo">
|
---|
| 269 | <primary sortas="b-zipinfo">zipinfo</primary>
|
---|
| 270 | </indexterm>
|
---|
| 271 | </listitem>
|
---|
| 272 | </varlistentry>
|
---|
[44b8f10] | 273 | <!--
|
---|
[c88ffaa] | 274 | <varlistentry id="libunzip">
|
---|
| 275 | <term><filename class='libraryfile'>libunzip.so</filename></term>
|
---|
| 276 | <listitem>
|
---|
[539ace5] | 277 | <para>contains the API functions required by the
|
---|
[c88ffaa] | 278 | <application>UnZip</application> programs.</para>
|
---|
| 279 | <indexterm zone="unzip libunzip">
|
---|
| 280 | <primary sortas="c-libunzip">libunzip.so</primary>
|
---|
| 281 | </indexterm>
|
---|
| 282 | </listitem>
|
---|
| 283 | </varlistentry>
|
---|
[44b8f10] | 284 | -->
|
---|
[c88ffaa] | 285 | </variablelist>
|
---|
| 286 |
|
---|
| 287 | </sect2>
|
---|
[f45b1953] | 288 |
|
---|
| 289 | </sect1>
|
---|