home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / misc / 4242 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.9 KB  |  45 lines

  1. Newsgroups: comp.unix.misc
  2. 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
  3. From: evans@zk3.dec.com (Marc Evans)
  4. Subject: Re: Programs to create and apply binary patches?
  5. Message-ID: <1992Nov18.123823.26037@decvax.dec.com>
  6. Sender: usenet@decvax.dec.com (Usenet News System)
  7. Nntp-Posting-Host: akrisis.zk3.dec.com
  8. Reply-To: evans@zk3.dec.com
  9. Organization: Synergytics
  10. References:  <1992Nov17.194826.26531@spillman.uucp>
  11. Date: Wed, 18 Nov 1992 12:38:23 GMT
  12. Lines: 31
  13.  
  14. >Any great ideas on how to create a "patch" file of differences between
  15. >two versions of a very large *binary* file (executable) so the patch
  16. >file could be distributed (via modem) and applied to the many copies
  17. >of the old version of the file?
  18.  
  19. A technique that I have used is to convert the binary file(s) to ascii, use
  20. "diff -c" and then patch as normal. Here is an example:
  21.  
  22.     uuencode prog.ascii <prog >prog.ascii
  23.     uuencode newprog.ascii <newprog >newprog.ascii
  24.     diff -c prog.ascii newprog.ascii >prog.patch
  25.     Mail -s "prog.patch" user@domain <prog.patch
  26.     [...]
  27.     uuencode prog.ascii <prog >prog.ascii
  28.     patch -s <prog.patch
  29.     mv prog prog.orig
  30.     uudecode prog.ascii
  31.  
  32. The theory is that if the changes were *small*, not much of the binary
  33. will be changed (assuming it is a program). Of course, things like timestamps
  34. may get in the way a bit here, but usually to too badly (from experience).
  35.  
  36. - Marc
  37.  
  38. -- 
  39. ===========================================================================
  40. Marc Evans - evans@zk3.dec.com              | Synergytics     (603)635-8876
  41. WB1GRH     - WB1GRH@W2XO.#WPA.PA.USA.NOAM   | 21 Hinds Ln, Pelham, NH 03076
  42. ---------------------------------------------------------------------------
  43.                       Unix and X11 Software Consultant 
  44. ===========================================================================
  45.