1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>InfoZIP Archive Utilities Issue 12</title>
</HEAD>
<BODY >
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>
"</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H2>InfoZIP Archive Utilities</H2>
<H4>By Robert G. "Doc" Savage,
<a href="mailto:dsavage@accessus.net">dsavage@accessus.net</a></H4>
</center>
<P> <HR> <P>
I'm a big fan of utilities. When I saw that CND/RHS were distributed
with older versions of the InfoZIP zip/unzip suite of archive utilities,
I made upgrading them my first Linux project. It turned out to be a
little bit more complicated than I thought it would be.
<P>
I especially wanted to add in the DES encryption modules to zip/unzip so
they would be 100% file compatible with PKWare's archivers for MS-DOS.
U.S. State Department rules make it difficult to implement this as an
RPM, so I decided to do it as a classic shell script. The end user will
have to ftp the source code (especially the DES code module) from the
site specified in the script.
<P>
<P> <HR> <P>
Script #1:
<PRE>
#!/bin/sh
#
# undatezip reverses updatezip and restores a Caldera Network Desktop v1.0 or
# Red Hat Software v2.1/v3.0.3 InfoZIP suite installation to its original zip
# v2.01 and unzip v5.12 configuration. This should only be necessary if you
# need to upgrade from a pristine as-installed configuration.
#
# original versions >>updatezip >>> new versions
# without encryption <<< undatezip <<< with encryption
#
# Copyright (C) 1996 by Robert G. "Doc" Savage. Permission is granted to
# distribute this document by electronic means and on CDs provided that it
# is kept entirely in its original format. Permission is also granted to
# print and execute this document for personal use. The republishing of
# this document in part or in whole without the permission of the copyright
# holder by any means other than as noted above is prohibited.
#
# First, the executables
#
cd /usr/bin
rm -f *.encrypt
rm -f funzip unzip unzipsfx zip zipcloak zipgrep zipinfo zipnote zipsplit
mv funzip383.export funzip
mv unzip512.export unzip
mv unzipsfx512.export unzipsfx
mv zip201.export zip
mv zipcloak201.export zipcloak
mv zipinfo202.export zipinfo
mv zipnote201.export zipnote
mv zipsplit201.export zipsplit
#
cd /usr/man/man1
rm -f funzip.1 funzip39.1 unzip.1 unzip52.1 unzipsfx.1 unzipsfx52.1 zip.1 \
zip21.1 zipinfo.1 zipinfo21.1 zipgrep.1 zipgrep21.1 zipcloak.1 zipnote.1 \
zipsplit.1
mv funzip383.1 funzip.1
mv unzip512.1 unzip.1
mv unzipsfx512.1 unzipsfx.1
mv zip201.1 zip.1
mv zipinfo202.1 zipinfo.1
#
cd
hash -r
#
# That's it...
</PRE>
<P> <HR> <P>
Script #2:
<PRE>
#!/bin/sh
#
# updatezip is a shell script for Caldera Network Desktop v1.0 or Red Hat
# Software's v2.1/v3.0.3 distributions to upgrade the InfoZIP utilities unzip
# from v5.12 to v5.2, and zip from v2.01 to v2.1. It also adds the zcrypt DES
# encryption module not provided in the RHS (or any other) distribution.
#
# To undo this upgrade and restore a CND v1.0 or RHS v2.1/v3.0.3 installation
# to its original zip/unzip configuration, run the companion file undatezip.
#
# original versions >>updatezip >>> new versions
# without encryption <<< undatezip <<< with encryption
#
# Copyright (C) 1996 by Robert G. "Doc" Savage. Permission is granted to
# distribute this document by electronic means and on CDs provided that it
# is kept entirely in its original format. Permission is also granted to
# print and execute this document for personal use. The republishing of
# this document in part or in whole without the permission of the copyright
# holder by any means other than as noted above is prohibited.
#
# It is divided into four sections:
#
# Section 1 create the working directory.
# Section 2 compile the unzip and zip executables.
# Section 3 replace the existing versions of the zip/unzip suite.
# Section 4 clean up.
#
# Instructions
# ==========================================================
#
# Download these files from <http://www.leo.org/pub/comp/os/os2/archiver>:
#
# unzip52.zip
# zcrypt26.zip
# zip21.zip
#
# Copy them and updatezip to a safe directory (suggest root's home directory
# /root). Use 'chmod 700 updatezip' to make it executable, then run it.
# Execution time is slightly over four minutes on a DX4/100 system with 28M
# of RAM, a 32-bit EISA host adapter, and an older SCSI-1(CCS) hard drive.
#
# IMPORTANT
# ---------
# Caldera Network Desktop 1.0, when first installed, is missing an important
# file required to compile certain programs. The following lines create (or
# recreate) this missing file. This script will fail without it.
#
cd /usr/src/linux
make include/linux/version.h
cd
#
# Section 1. Create the working directory and extract all required files.
#
mkdir /scratch
cp unzip52.zip /scratch
cp zcrypt26.zip /scratch
cp zip21.zip /scratch
cd /scratch
#
# Section 2. Compile unzip first, then zip
#
unzip unzip52
unzip -o zcrypt26 # -o forces overwrite of stub files
cp -f ./unix/Makefile .
make generic
rm -f *.o # clean-up before next compile round
unzip -o zip21
unzip -o zcrypt26
cp -f ./unix/Makefile .
make generic_gcc
#
# Section 3. Install new versions of the zip/unzip suite. Preserve the
# existing executables and man files first. Use soft links to point
# to the new versions.
#
cd /usr/bin
mv funzip funzip383.export
mv unzip unzip512.export
mv unzipsfx unzipsfx512.export
mv zip zip201.export
mv zipcloak zipcloak201.export
mv zipinfo zipinfo202.export
mv zipnote zipnote201.export
mv zipsplit zipsplit201.export
#
cd /usr/man/man1
mv funzip.1 funzip383.1
mv unzip.1 unzip512.1
mv unzipsfx.1 unzipsfx512.1
mv zip.1 zip201.1
# note there is no zipgrep.1 in this distribution
mv zipinfo.1 zipinfo202.1
#
cd /usr/bin
mv /scratch/funzip funzip39.encrypt
mv /scratch/unzip unzip52.encrypt
mv /scratch/unzipsfx unzipsfx52.encrypt
mv /scratch/zip zip21.encrypt
mv /scratch/zipcloak zipcloak21.encrypt
mv /scratch/unix/zipgrep zipgrep21.encrypt
mv /scratch/zipnote zipnote21.encrypt
mv /scratch/zipsplit zipsplit21.encrypt
#
cd /usr/man/man1
mv /scratch/unix/funzip.1 funzip39.1
mv /scratch/unix/unzip.1 unzip52.1
mv /scratch/unix/unzipsfx.1 unzipsfx52.1
mv /scratch/man/zip.1 zip21.1
mv /scratch/man/zipgrep.1 zipgrep21.1
mv /scratch/unix/zipinfo.1 zipinfo21.1
#
# Now establish the soft links
#
ln -s funzip39.1 funzip.1
ln -s unzip52.1 unzip.1
ln -s unzipsfx52.1 unzipsfx.1
ln -s zip21.1 zip.1
ln -s zip.1 zipcloak.1 # remember, zip.1 is
ln -s zipgrep21.1 zipgrep.1
ln -s zipinfo21.1 zipinfo.1
ln -s zip.1 zipnote.1 # already soft-linked
ln -s zip.1 zipsplit.1 # to zip21.1
#
cd /usr/bin
ln -s funzip39.encrypt funzip
ln -s unzip52.encrypt unzip
ln -s unzipsfx52.encrypt unzipsfx
ln -s zip21.encrypt zip
ln -s zipcloak21.encrypt zipcloak
ln -s zipgrep21.encrypt zipgrep
ln -s unzip52.encrypt zipinfo # a special link
ln -s zipnote21.encrypt zipnote
ln -s zipsplit21.encrypt zipsplit
#
# Section 4. Clean up the leftovers.
#
cd # go to your home directory
rm -rf /scratch # nothing worth saving in the scratch directory
hash -r # re-sync the paths
#
# That's it...
</PRE>
<P> <HR> <P>
--Doc Savage, Sr. Network Engineer, I-NET, Inc.
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright © 1996, Robert G. Savage <BR>
Published in Issue 12 of the Linux Gazette</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./lg_toc12.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./gm.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="slang.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
</BODY>
</HTML>
|