home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / tcx-1.1 / part01 / README < prev    next >
Encoding:
Text File  |  1993-04-04  |  5.2 KB  |  133 lines

  1.     TCX - Transparently Compressed Executables (For Unix)
  2.  
  3.                 by
  4.  
  5.        Stewart Forster, University Of Melbourne, 1993
  6.  
  7. TCX is a system designed for the transparent decompression, execution
  8. and recompression of executables under Unix.  It allows configuration
  9. options such as the type of compression system used (compress(1),
  10. gzip(1), your own local system etc), timeouts between recompressions,
  11. and emergency directories in case a decompression fails from shortage
  12. of disk space.  The system is designed with a reasonable amount of
  13. robustness in mind, such as in the event of system crashes, or races
  14. on trying to uncompress, compress or execute something.
  15.  
  16.     Currently TCX is only proven to run on Irix 4.*, Ultrix 4.2
  17. or higher, and SunOs 4.1.1 or higher.  It may run on other releases
  18. of these OS's but has not been tested.  It should also be relatively
  19. easy to port to other OS's as much of the code is fairly straight
  20. forward.
  21.  
  22.     The system is used here at the Department of Computer Science
  23. University Of Melbourne, and in other departments on campus.  This is
  24. the first official release of TCX to the world, so please feel free
  25. to comment or help in bug fixes and machine reports by sending email
  26. to slf@cs.mu.OZ.AU
  27.  
  28. ---------------------------------------------------------------------
  29.  
  30.             INSTALLATION
  31.  
  32. TCX is a small package with just the following files. If you don't
  33. have these three file, get a complete distribution.
  34.  
  35.         config.h
  36.         tcx.c
  37.         untcx.c
  38.  
  39. First read the "FURTHER INFO" section below before configuring TCX
  40. for your system, since it may influence some of your decisions.
  41.  
  42. To configure TCX, edit the config.h file.  There are enough directions
  43. therein to help you configure for your system.  TCX relies on the
  44. compression system you use to barf when the filesystem gets full
  45. and return a fail exit code.  If the compression system you use
  46. doesn't do this, you run the risk of losing files. The GNU gzip
  47. package is known to do the correct safety checks and exit accordingly.
  48.  
  49. Once done editing the config file, edit the Makefile to set the C
  50. compiler and libraries for your system, and compile.
  51. Don't worry if your optimizer complains of no exit points in the
  52. procedures called "check_tcxd_mode", "untcx_and_exec_local", and
  53. "untcx_and_exec_nfs" when compiling untcx.c, these are normal.
  54.  
  55. The tcx, and untcx executables must be placed at the pathnames you
  56. specified for them in config.h, if they are not there, the system
  57. will NOT work. eg.
  58.  
  59.     cp tcx /usr/local/bin/tcx
  60.     cp untcx /usr/local/bin/untcx
  61.  
  62. Untcx must also be installed setuid, so issue the following command.
  63.  
  64.     chown root /usr/local/bin/untcx
  65.     chmod 4711 /usr/local/bin/untcx     (or path you chose)
  66.  
  67. Do not install the "tcx" executable setuid to anyone.
  68.  
  69. and copy the manual pages to your regular man directory and read them.
  70.  
  71.     The installation is now complete.
  72.  
  73. ----------------------------------------------------------------------
  74.  
  75.         TESTING YOUR INSTALLATION
  76.  
  77. You can now try running "tcx" on an innocuous executable to transform
  78. it, and then try running it.  Wait for the timeout interval you
  79. specified (after disuse, which means not even reading the file) and it
  80. should recompress.  If it doesn't recompress after about twice the
  81. interval specified, check the following.
  82.  
  83. 1) Access times on the file. MAKE SURE it wasn't touched before suspecting
  84.    something is wrong.
  85. 2) That the daemon mode for untcx started correctly.  The pid should be
  86.    stored in ENFSDIR/.lock.  Assuming ENFSDIR is /tmp/exec as in the
  87.    distributed config file, issue
  88.  
  89.     ps `cat /tmp/exec/.lock`   and check that the daemon started.
  90.  
  91.    If it didn't, there is a minor problem with permissions, or maybe
  92.    you specified a read-only file system for ENFSDIR.
  93. 3) Check if you installed tcx where PATHTCX in the config file said
  94.    where it was.
  95. 4) Check that the uncompressor is where PATHUNPACK in the the config
  96.    file says it is.
  97.  
  98. If all else comes to nought, look into the source code, or mail your
  99. system configuration and config file to slf@cs.mu.OZ.AU, and I'll
  100. try and see what can be done.
  101.  
  102. ----------------------------------------------------------------------
  103.  
  104.     FUTHER INFO / POTENTIAL BUGS
  105.  
  106. Users may experience a slight delay when a TCX executable is started up
  107. due the decompression phase.  If this becomes a problem for large
  108. executables, you should probably discourage use of TCX on these huge
  109. binaries.  The "gzip" system decompresses at around 500-700K/sec on the
  110. systems I tested it on, which are all around the 25 SPECmark rating.
  111.  
  112. Don't use TCX on NFS mounted shell scripts which rely on `dirname $0`
  113. because TCX cannot fool the shell into giving it a spoof $0, like it
  114. can with binaries.  This may be the only case (other than setuid
  115. programs) where TCX will break something.
  116.  
  117. ----------------------------------------------------------------------
  118.  
  119.         THANKS
  120.  
  121. Special thanks go to Robert Elz, who provided invaluable input,
  122. suggestions and clarifications on the whole idea.
  123.  
  124. Thanks also to Jeff Shultz who provided some potential "sticky" cases
  125. which gave me some more work to do (plus made tcx more robust).
  126.  
  127. Many thanks go the the overwhelming input provided by many people
  128. around the world, all interested in seeing TCX working correctly on
  129. their system.  Your input is what makes good software better.
  130.  
  131.                 Stewart.
  132.  
  133.