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