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