home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.misc
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!rdg.dec.com!decvax.dec.com!decvax!evans
- From: evans@zk3.dec.com (Marc Evans)
- Subject: Re: Programs to create and apply binary patches?
- Message-ID: <1992Nov18.123823.26037@decvax.dec.com>
- Sender: usenet@decvax.dec.com (Usenet News System)
- Nntp-Posting-Host: akrisis.zk3.dec.com
- Reply-To: evans@zk3.dec.com
- Organization: Synergytics
- References: <1992Nov17.194826.26531@spillman.uucp>
- Date: Wed, 18 Nov 1992 12:38:23 GMT
- Lines: 31
-
- >Any great ideas on how to create a "patch" file of differences between
- >two versions of a very large *binary* file (executable) so the patch
- >file could be distributed (via modem) and applied to the many copies
- >of the old version of the file?
-
- A technique that I have used is to convert the binary file(s) to ascii, use
- "diff -c" and then patch as normal. Here is an example:
-
- uuencode prog.ascii <prog >prog.ascii
- uuencode newprog.ascii <newprog >newprog.ascii
- diff -c prog.ascii newprog.ascii >prog.patch
- Mail -s "prog.patch" user@domain <prog.patch
- [...]
- uuencode prog.ascii <prog >prog.ascii
- patch -s <prog.patch
- mv prog prog.orig
- uudecode prog.ascii
-
- The theory is that if the changes were *small*, not much of the binary
- will be changed (assuming it is a program). Of course, things like timestamps
- may get in the way a bit here, but usually to too badly (from experience).
-
- - Marc
-
- --
- ===========================================================================
- Marc Evans - evans@zk3.dec.com | Synergytics (603)635-8876
- WB1GRH - WB1GRH@W2XO.#WPA.PA.USA.NOAM | 21 Hinds Ln, Pelham, NH 03076
- ---------------------------------------------------------------------------
- Unix and X11 Software Consultant
- ===========================================================================
-