home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / kit / pch14 < prev    next >
Encoding:
Text File  |  1992-04-18  |  9.4 KB  |  348 lines

  1. Newsgroups: comp.sources.unix
  2. From: ram@eiffel.com (Raphael Manfredi)
  3. Subject: v26i011: kit - the ultimate mailing kit, Patch14
  4. Sender: unix-sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: ram@eiffel.com (Raphael Manfredi)
  8. Posting-Number: Volume 26, Issue 11
  9. Archive-Name: kit/pch14
  10.  
  11.  
  12. [The latest patch for kit version 2.0 is #14.]
  13.  
  14. System: kit version 2.0
  15. Patch #: 14
  16. Priority: MEDIUM
  17. Subject: addresses in README updated
  18. Subject: fixed some loose declarations
  19. Subject: fixed a typo in makeshar.SH
  20. Subject: determination of user name made more portable
  21. Subject: a missing quote led to a syntactically incorrect archive
  22. Date: Tue Mar 24 13:46:34 PST 1992
  23. From: Raphael Manfredi <ram@eiffel.com>
  24.  
  25. Description:
  26.     This patch has a low priority if you use 'cshar' for archive
  27.     packing. Otherwise, there is a severe bug in rshar.SH which
  28.     prevented it from actually working.
  29.  
  30.     Addresses in README updated (credits section).
  31.  
  32.     Fixed some loose declarations in badtar.c.
  33.  
  34.     Fixed a typo in makeshar.SH. In case an incorrect option
  35.     was found, the error report was not accurrate.
  36.  
  37.     Determination of user name made more portable. If logname is
  38.     not available (e.g. on BSD systems), whoami is used instead.
  39.  
  40.     A missing quote in rshar.SH led to a syntactically incorrect
  41.     archive. The generated test for file length was not properly
  42.     terminated by a 'fi'. This bug was reported by Gurvan Lullien
  43.     <lullien@inf.enst.fr>.
  44.  
  45. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your kit source
  46.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  47.     If you don't have the patch program, apply the following by hand,
  48.     or get patch (version 2.0, latest patchlevel).
  49.  
  50.     After patching:
  51.         Configure -d
  52.         make
  53.         make install
  54.  
  55.     If patch indicates that patchlevel is the wrong version, you may need
  56.     to apply one or more previous patches, or the patch may already
  57.     have been applied.  See the patchlevel.h file to find out what has or
  58.     has not been applied.  In any event, don't continue with the patch.
  59.  
  60.     If you are missing previous patches they can be obtained from me:
  61.  
  62.         Raphael Manfredi <ram@eiffel.com>
  63.  
  64.     If you send a mail message of the following form it will greatly speed
  65.     processing:
  66.  
  67.         Subject: Command
  68.         @SH mailpatch PATH kit 2.0 LIST
  69.                ^ note the c
  70.  
  71.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  72.     or in bang notation from some well-known host, and LIST is the number
  73.     of one or more patches you need, separated by spaces, commas, and/or
  74.     hyphens.  Saying 35- says everything from 35 to the end.
  75.  
  76.     To get some more detailed instructions, send me the following mail:
  77.  
  78.         Subject: Command
  79.         @SH mailhelp PATH
  80.  
  81.  
  82. Index: patchlevel.h
  83. Prereq: 13
  84. 2c2
  85. < #define PATCHLEVEL 13
  86. ---
  87. > #define PATCHLEVEL 14
  88.  
  89. Index: badtar/badtar.c
  90. Prereq: 2.0.1.1
  91. *** badtar/badtar.c.old    Tue Mar 24 13:46:23 1992
  92. --- badtar/badtar.c    Tue Mar 24 13:46:23 1992
  93. ***************
  94. *** 1,9 ****
  95.   /*
  96.    * I got that from net.sources and extended it -- RAM
  97.    *
  98. !  * $Id: badtar.c,v 2.0.1.1 92/01/11 19:12:45 ram Exp $
  99.    *
  100.    * $Log:    badtar.c,v $
  101.    * Revision 2.0.1.1  92/01/11  19:12:45  ram
  102.    * patch11: created
  103.    * 
  104. --- 1,12 ----
  105.   /*
  106.    * I got that from net.sources and extended it -- RAM
  107.    *
  108. !  * $Id: badtar.c,v 2.0.1.2 92/03/24 13:37:13 ram Exp $
  109.    *
  110.    * $Log:    badtar.c,v $
  111. +  * Revision 2.0.1.2  92/03/24  13:37:13  ram
  112. +  * patch14: fixed some loose declarations
  113. +  * 
  114.    * Revision 2.0.1.1  92/01/11  19:12:45  ram
  115.    * patch11: created
  116.    * 
  117. ***************
  118. *** 50,56 ****
  119.   char pad[TBLOCK];
  120.   
  121.   /* Print usage */
  122. ! usage()
  123.   {
  124.       fprintf(stderr,
  125.   "Usage: badtar [-hiorsvV] [-l logfile] [-f tape drive] [-u uid] [-g gid]\n");
  126. --- 53,59 ----
  127.   char pad[TBLOCK];
  128.   
  129.   /* Print usage */
  130. ! void usage()
  131.   {
  132.       fprintf(stderr,
  133.   "Usage: badtar [-hiorsvV] [-l logfile] [-f tape drive] [-u uid] [-g gid]\n");
  134. ***************
  135. *** 69,75 ****
  136.   }
  137.   
  138.   /* Print version number */
  139. ! version()
  140.   {
  141.       fprintf(stderr, "badtar %.1f PL%d\n", VERSION, PATCHLEVEL);
  142.       fprintf(stderr, "(version modified by Raphael Manfredi, as part of kit)\n");
  143. --- 72,78 ----
  144.   }
  145.   
  146.   /* Print version number */
  147. ! void version()
  148.   {
  149.       fprintf(stderr, "badtar %.1f PL%d\n", VERSION, PATCHLEVEL);
  150.       fprintf(stderr, "(version modified by Raphael Manfredi, as part of kit)\n");
  151. ***************
  152. *** 76,82 ****
  153.   }
  154.   
  155.   /* check the check sum for the header block */
  156. ! check_sum(c)
  157.   union hblock *c;
  158.   {
  159.       int i,j;
  160. --- 79,85 ----
  161.   }
  162.   
  163.   /* check the check sum for the header block */
  164. ! int check_sum(c)
  165.   union hblock *c;
  166.   {
  167.       int i,j;
  168. ***************
  169. *** 155,161 ****
  170.   main(argc, argv)
  171.   char **argv;
  172.   {
  173. !     int i, size, chksum, fblocks, eot_block;
  174.       int user = -1;                /* UID to be forced */
  175.       int group = -1;                /* GID to be forced */
  176.       union hblock *hp;            /* To decipher headers */
  177. --- 158,166 ----
  178.   main(argc, argv)
  179.   char **argv;
  180.   {
  181. !     int i, size, chksum;
  182. !     int fblocks = 0;            /* Tape blocks used by file */
  183. !     int eot_block = 0;            /* Number of EOT blocks found */
  184.       int user = -1;                /* UID to be forced */
  185.       int group = -1;                /* GID to be forced */
  186.       union hblock *hp;            /* To decipher headers */
  187.  
  188. Index: shar/rshar.SH
  189. Prereq: 2.0.1.2
  190. *** shar/rshar.SH.old    Tue Mar 24 13:46:29 1992
  191. --- shar/rshar.SH    Tue Mar 24 13:46:30 1992
  192. ***************
  193. *** 17,25 ****
  194.   $startsh
  195.   # (c) Raphael Manfredi, December 25th 1991
  196.   
  197. ! # $Id: rshar.SH,v 2.0.1.2 92/01/13 14:26:20 ram Exp $
  198.   #
  199.   # $Log:    rshar.SH,v $
  200.   # Revision 2.0.1.2  92/01/13  14:26:20  ram
  201.   # patch13: fixed option parsing code
  202.   # patch13: the archive extraction now returns meaningful exit code
  203. --- 17,29 ----
  204.   $startsh
  205.   # (c) Raphael Manfredi, December 25th 1991
  206.   
  207. ! # $Id: rshar.SH,v 2.0.1.3 92/03/24 13:46:04 ram Exp $
  208.   #
  209.   # $Log:    rshar.SH,v $
  210. + # Revision 2.0.1.3  92/03/24  13:46:04  ram
  211. + # patch14: determination of user name made more portable
  212. + # patch14: a missing quote led to a syntactically incorrect archive
  213. + # 
  214.   # Revision 2.0.1.2  92/01/13  14:26:20  ram
  215.   # patch13: fixed option parsing code
  216.   # patch13: the archive extraction now returns meaningful exit code
  217. ***************
  218. *** 66,77 ****
  219.       esac
  220.   done
  221.   
  222.   echo '#! /bin/sh
  223.   # This is a shell archive.  Remove anything before this line, then feed it
  224.   # into a shell via "sh file" or similar.  To overwrite existing files,
  225.   # type "sh file -c"
  226.   #
  227. ! # Wrapped by <'`logname`@`(uname -n || hostname) 2>/dev/null`'> on '`date`
  228.   echo '#
  229.   # This archive contains:'
  230.   echo $@ | tr ' ' '\012' | sed -e 's/^/#    /'
  231. --- 70,85 ----
  232.       esac
  233.   done
  234.   
  235. + # Who and where am I? -- white space between '(' is needed in case ksh is used
  236. + user=`( (logname) || whoami) 2>/dev/null`
  237. + host=`( (uname -n) || hostname) 2>/dev/null`
  238.   echo '#! /bin/sh
  239.   # This is a shell archive.  Remove anything before this line, then feed it
  240.   # into a shell via "sh file" or similar.  To overwrite existing files,
  241.   # type "sh file -c"
  242.   #
  243. ! # Wrapped by <'$user@$host'> on '`date`
  244.   echo '#
  245.   # This archive contains:'
  246.   echo $@ | tr ' ' '\012' | sed -e 's/^/#    /'
  247. ***************
  248. *** 106,112 ****
  249.       # verify length
  250.       echo "    if test $size -ne \`wc -c < '$i'\`; then"
  251.       echo "        echo \"shar: '$i' unpacked with wrong size!\""
  252. !     echo "        exitcode=1
  253.       echo "    fi"
  254.       echo "    # end of '$i'"
  255.       echo "fi"
  256. --- 114,120 ----
  257.       # verify length
  258.       echo "    if test $size -ne \`wc -c < '$i'\`; then"
  259.       echo "        echo \"shar: '$i' unpacked with wrong size!\""
  260. !     echo "        exitcode=1"
  261.       echo "    fi"
  262.       echo "    # end of '$i'"
  263.       echo "fi"
  264.  
  265. Index: README
  266. *** README.old    Tue Mar 24 13:46:17 1992
  267. --- README    Tue Mar 24 13:46:18 1992
  268. ***************
  269. *** 83,95 ****
  270.   I would like to thank:
  271.       Gary Casterline <casterln@are.berkeley.edu>
  272.       Michael Fischer <fischer-michael@cs.yale.edu>
  273. !     Monty Solomon <monty@bu.edu>
  274.   for their bug reports and comments.
  275.   
  276.   The criticism of Tim Kuehn <timk@wynnds.xenitec.on.ca> was also much
  277.   appreciated.
  278.   
  279. ! I am especially grateful to Jaap Vermeulen <jaap@sequent.com> for his
  280. ! critical bug reports and suggestions.
  281.   
  282.       Raphael Manfredi <ram@eiffel.com>
  283. --- 83,97 ----
  284.   I would like to thank:
  285.       Gary Casterline <casterln@are.berkeley.edu>
  286.       Michael Fischer <fischer-michael@cs.yale.edu>
  287. !     Gurvan Lullien <lullien@inf.enst.fr>
  288. !     Monty Solomon <roscom!monty@think.com>
  289.   for their bug reports and comments.
  290.   
  291.   The criticism of Tim Kuehn <timk@wynnds.xenitec.on.ca> was also much
  292.   appreciated.
  293.   
  294. ! I am especially grateful to Jaap Vermeulen <jaap@sequent.com> and to
  295. ! David Wright <dmw@prism1.com> for their critical bug reports and
  296. ! suggestions.
  297.   
  298.       Raphael Manfredi <ram@eiffel.com>
  299.  
  300. Index: shar/makeshar.SH
  301. Prereq: 2.0.1.2
  302. *** shar/makeshar.SH.old    Tue Mar 24 13:46:26 1992
  303. --- shar/makeshar.SH    Tue Mar 24 13:46:27 1992
  304. ***************
  305. *** 17,25 ****
  306.   $startsh
  307.   # (c) Raphael Manfredi, December 25th 1991
  308.   
  309. ! # $Id: makeshar.SH,v 2.0.1.2 92/01/13 14:22:25 ram Exp $
  310.   #
  311.   # $Log:    makeshar.SH,v $
  312.   # Revision 2.0.1.2  92/01/13  14:22:25  ram
  313.   # patch13: fixed option parsing code
  314.   # patch13: protected arguments given to rshar
  315. --- 17,28 ----
  316.   $startsh
  317.   # (c) Raphael Manfredi, December 25th 1991
  318.   
  319. ! # $Id: makeshar.SH,v 2.0.1.3 92/03/24 13:37:34 ram Exp $
  320.   #
  321.   # $Log:    makeshar.SH,v $
  322. + # Revision 2.0.1.3  92/03/24  13:37:34  ram
  323. + # patch14: fixed a typo
  324. + # 
  325.   # Revision 2.0.1.2  92/01/13  14:22:25  ram
  326.   # patch13: fixed option parsing code
  327.   # patch13: protected arguments given to rshar
  328. ***************
  329. *** 50,56 ****
  330.           partname="$1"
  331.           shift
  332.           ;;
  333. !     -*) echo "unknown option $i"
  334.           exit 1
  335.           ;;
  336.       --) shift
  337. --- 53,59 ----
  338.           partname="$1"
  339.           shift
  340.           ;;
  341. !     -*) echo "unknown option $1"
  342.           exit 1
  343.           ;;
  344.       --) shift
  345.  
  346. *** End of Patch 14 ***
  347.