home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume39 / dist-3.0 / patch03 < prev    next >
Encoding:
Text File  |  1993-08-25  |  44.7 KB  |  1,668 lines

  1. Newsgroups: comp.sources.misc
  2. From: Raphael Manfredi <ram@acri.fr>
  3. Subject: v39i049:  dist-3.0 - Configure script generator and related tools, Patch03
  4. Message-ID: <1993Aug25.235012.23562@sparky.sterling.com>
  5. X-Md4-Signature: 8b61182fc1d55f0beb309ba59afd1380
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Advanced Computer Research Institute, Lyon, France
  8. Date: Wed, 25 Aug 1993 23:50:12 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: Raphael Manfredi <ram@acri.fr>
  12. Posting-number: Volume 39, Issue 49
  13. Archive-name: dist-3.0/patch03
  14. Environment: UNIX, Perl, RCS
  15. Patch-To: dist-3.0: Volume 39, Issue 5-32
  16.  
  17. [The latest patch for dist version 3.0 is #4.]
  18.  
  19. System: dist version 3.0
  20. Patch #: 3
  21. Priority: MEDIUM
  22. Subject: was not correctly writing the To: header field
  23. Subject: config.sh searching was not aborting properly
  24. Subject: added patnotify and patsnap
  25. Subject: forgot two people in main credit section
  26. Subject: new credit section for patches
  27. Subject: added entries for patnotify and patsnap
  28. Subject: privlib dir was ~name expanded in the wrong place
  29. Subject: added TOP as a local shell temporary variable
  30. Subject: typo fixes
  31. Subject: now removes older patch temporary files within bugs
  32. Subject: patcol has a new -S option
  33. Subject: the users file built by mailagent is now listed under FILES
  34. Subject: random cleanup
  35. Subject: new -S option for snapshot check-outs
  36. Subject: removed useless orgname variable
  37. Subject: now asks for patch mailing/posting after all patches edited
  38. Subject: patch release notification is done via new patnotify
  39. Subject: random cleanup, removed old RCS logs
  40. Subject: created five new files
  41. Subject: added ~name expansion for orgname
  42. Subject: new -u option
  43. Subject: added Precedence and X-Mailer headers in mail message
  44. Subject: added some comments about the users file format
  45. Date: Tue Aug 24 14:25:56 MET DST 1993
  46. From: Raphael Manfredi <ram@acri.fr>
  47.  
  48. Description:
  49.     Random cleanup in the patching tools:
  50.         - patsend was not correctly writing the To: header field
  51.         - patcol has a new -S option for snapshot check-outs
  52.         - removed useless orgname variable in patftp
  53.         - patch release notification is done via new patnotify
  54.         - now asks for patch mailing/posting after all patches edited
  55.         - added ~name expansion for orgname
  56.         - patsend has a brand new -u option
  57.         - added Precedence and X-Mailer headers in mail message
  58.         - pat now removes older patch temporary files within bugs
  59.  
  60.     Added patnotify and patsnap in the patching tools. Patnotify
  61.     is the pending of patsend for patch notification and is now
  62.     directly used by patmake. Patsnap creates RCS snapshots which
  63.     can then recreate the distribution when fed to patcol -S.
  64.  
  65.     Forgot two people in main credit section, sorry. There is also
  66.     a new section in the Credits file for people contributing to
  67.     the release from now on.
  68.  
  69.     Privlib dir was ~name expanded in the wrong place in jmake,
  70.     hence resulting in a /bin/cpp failure when portability was
  71.     asked in Configure.
  72.  
  73.     Added TOP as a local shell temporary variable in mcon/U/Config_h.U
  74.  
  75.     The users file built by mailagent is now listed under the FILES
  76.     section of the pat tools manual page.
  77.  
  78.     Added some comments about the users file format in the pl/users.pl
  79.     file itself.
  80.  
  81.     There are 5 new files created by this patch, one of which
  82.     (mcon/U/afs.U) was missing from the original distribution
  83.     although referenced by some other units...
  84.  
  85.  
  86. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your dist source
  87.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  88.     If you don't have the patch program, apply the following by hand,
  89.     or get patch (version 2.0, latest patchlevel).
  90.  
  91.     After patching:
  92.         *** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #4 FIRST ***
  93.  
  94.     If patch indicates that patchlevel is the wrong version, you may need
  95.     to apply one or more previous patches, or the patch may already
  96.     have been applied.  See the patchlevel.h file to find out what has or
  97.     has not been applied.  In any event, don't continue with the patch.
  98.  
  99.     If you are missing previous patches they can be obtained from me:
  100.  
  101.         Raphael Manfredi <ram@acri.fr>
  102.  
  103.     If you send a mail message of the following form it will greatly speed
  104.     processing:
  105.  
  106.         Subject: Command
  107.         @SH mailpatch PATH dist 3.0 LIST
  108.                ^ note the c
  109.  
  110.     where PATH is a return path FROM ME TO YOU either in Internet notation,
  111.     or in bang notation from some well-known host, and LIST is the number
  112.     of one or more patches you need, separated by spaces, commas, and/or
  113.     hyphens.  Saying 35- says everything from 35 to the end.
  114.  
  115.     To get some more detailed instructions, send me the following mail:
  116.  
  117.         Subject: Command
  118.         @SH mailhelp PATH
  119.  
  120.  
  121. Index: patchlevel.h
  122. Prereq: 2
  123. 4c4
  124. < #define PATCHLEVEL 2
  125. ---
  126. > #define PATCHLEVEL 3
  127.  
  128. Index: pat/patmake.SH
  129. Prereq: 3.0.1.1
  130. *** pat/patmake.SH.old    Tue Aug 24 14:25:43 1993
  131. --- pat/patmake.SH    Tue Aug 24 14:25:44 1993
  132. ***************
  133. *** 20,26 ****
  134.       eval "exec perl -S \$0 \$*"
  135.           if \$running_under_some_shell;
  136.   
  137. ! # $Id: patmake.SH,v 3.0.1.1 1993/08/19 06:42:38 ram Exp $
  138.   #
  139.   #  Copyright (c) 1991-1993, Raphael Manfredi
  140.   #  
  141. --- 20,26 ----
  142.       eval "exec perl -S \$0 \$*"
  143.           if \$running_under_some_shell;
  144.   
  145. ! # $Id: patmake.SH,v 3.0.1.2 1993/08/24 12:18:59 ram Exp $
  146.   #
  147.   #  Copyright (c) 1991-1993, Raphael Manfredi
  148.   #  
  149. ***************
  150. *** 34,39 ****
  151. --- 34,44 ----
  152.   # Contribution by: Graham Stoney <greyham@research.canon.oz.au>
  153.   #
  154.   # $Log: patmake.SH,v $
  155. + # Revision 3.0.1.2  1993/08/24  12:18:59  ram
  156. + # patch3: now asks for patch mailing/posting after all patches edited
  157. + # patch3: patch release notification is done via new patnotify
  158. + # patch3: random cleanup, removed old RCS logs
  159. + #
  160.   # Revision 3.0.1.1  1993/08/19  06:42:38  ram
  161.   # patch1: leading config.sh searching was not aborting properly
  162.   #
  163. ***************
  164. *** 40,59 ****
  165.   # Revision 3.0  1993/08/18  12:10:45  ram
  166.   # Baseline for dist 3.0 netwide release.
  167.   #
  168. - #
  169. - # Revision 2.8.1.3  91/10/11  09:58:51  ram
  170. - # patch5: allows dot in makefile rules
  171. - # 
  172. - # Revision 2.8.1.2  91/07/14  14:00:42  ram
  173. - # patch1: urgent fix due to a disk crash (file was not synced, grrr...)
  174. - # 
  175. - # Revision 2.8.1.1  91/07/14  13:31:01  ram
  176. - # patch1: added usage message which also briefly describes options
  177. - # patch1: now uses the perl library getopts.pl for option parsing
  178. - # 
  179. - # Revision 2.8  91/07/08  13:26:52  ram
  180. - # 3.0 alpha baseline.
  181. - # 
  182.   
  183.   \$defeditor='$defeditor';
  184.   \$version = '$VERSION';
  185. --- 45,50 ----
  186. ***************
  187. *** 75,81 ****
  188.   &readpackage;
  189.   &readusers;
  190.   
  191. - $RCSEXT = ',v' unless $RCSEXT;
  192.   $FILEOVERHEAD = 40;        # Name of files, Index, Prereq
  193.   $MAXPATSIZE = 50000;    # Maximum allowed size for a patch
  194.   $PATOVERHEAD = 2500;    # Litterature
  195. --- 66,71 ----
  196. ***************
  197. *** 304,310 ****
  198.   > #define PATCHLEVEL $bnum
  199.   ";
  200.       }
  201. !     $last = $bnum;        # Update last patch
  202.   
  203.       @ARGV = split(' ', $list[$i]);
  204.       while (<>) { print PATCH; }
  205. --- 294,301 ----
  206.   > #define PATCHLEVEL $bnum
  207.   ";
  208.       }
  209. !     $last = $bnum;            # Update last patch
  210. !     push(@patset, $bnum);    # Record set of generated patch(es)
  211.   
  212.       @ARGV = split(' ', $list[$i]);
  213.       while (<>) { print PATCH; }
  214. ***************
  215. *** 336,367 ****
  216.           close PL;
  217.           `mv -f patchlevel.h+ patchlevel.h`;
  218.           die "Malformed patchlevel.h file.\n" if $bnum eq '';
  219. -         if ($newsgroups) {
  220. -             print "\nDo you wish to post patch #$bnum to $newsgroups? [y] ";
  221. -             $ans = <stdin>;
  222. -             system 'patpost', $bnum unless $ans =~ /^n/i;
  223. -         }
  224. -         if ($recipients) {
  225. -             print "\n";
  226. -             if (0 == ($recipients =~ tr/ //)) {
  227. -                 print "Do you wish to send patch #$bnum to $recipients? [y] ";
  228. -             } else {
  229. -                 print "The following people are on the recipient list:\n\n";
  230. -                 foreach $addr (split(' ', $recipients)) {
  231. -                     print "\t$addr\n";
  232. -                 }
  233. -                 print "\nDo you wish to send patch #$bnum to them? [y] ";
  234. -             }
  235. -             $ans = <stdin>;
  236. -             system 'patsend', $bnum, $recipients unless $ans =~ /^n/i;
  237. -         }
  238. -         if ($ftpdir) {
  239. -             print "\nDo you wish to copy patch #$bnum to $ftpdir? [y] ";
  240. -             $ans = <stdin>;
  241. -             system 'patftp', $bnum unless $ans =~ /^n/i;
  242. -         }
  243. -     utime time, time, 'patchlevel.h';
  244.       } else {
  245.           unlink "patch$bnum";
  246.           die "Aborted.\n";
  247. --- 327,332 ----
  248. ***************
  249. *** 380,386 ****
  250.       $bnum++;    # For next patch in loop
  251.   }
  252.   
  253. ! # notify people about it.
  254.   if ($notify) {
  255.       print "\n";
  256.       if (0 == ($notify =~ tr/ //)) {
  257. --- 345,393 ----
  258.       $bnum++;    # For next patch in loop
  259.   }
  260.   
  261. ! utime time, time, 'patchlevel.h';    # Reset timestamp on patchlevel
  262. ! if (@patset == 1) {
  263. !     $bnum = pop(@patset);
  264. !     $patch = "patch #$bnum";
  265. ! } else {
  266. !     $bmin = shift(@patset);
  267. !     $bmax = pop(@patset);
  268. !     $bnum = "$bmin-$bmax";
  269. !     $patch = "patches #$bmin thru #$bmax";
  270. ! }
  271. ! # Post generated patches
  272. ! if ($newsgroups) {
  273. !     print "\nDo you wish to post $patch to $newsgroups? [y] ";
  274. !     $ans = <stdin>;
  275. !     system 'patpost', $bnum unless $ans =~ /^n/i;
  276. ! }
  277. ! # Mail generated patches
  278. ! if ($recipients) {
  279. !     print "\n";
  280. !     if (0 == ($recipients =~ tr/ //)) {
  281. !         print "Do you wish to send $patch to $recipients? [y] ";
  282. !     } else {
  283. !         print "The following people are on the recipient list:\n\n";
  284. !         foreach $addr (split(' ', $recipients)) {
  285. !             print "\t$addr\n";
  286. !         }
  287. !         print "\nDo you wish to send $patch to them? [y] ";
  288. !     }
  289. !     $ans = <stdin>;
  290. !     system 'patsend', $bnum, $recipients unless $ans =~ /^n/i;
  291. ! }
  292. ! # Copy patches to FTP directory
  293. ! if ($ftpdir) {
  294. !     print "\nDo you wish to copy $patch to $ftpdir? [y] ";
  295. !     $ans = <stdin>;
  296. !     system 'patftp', $bnum unless $ans =~ /^n/i;
  297. ! }
  298. ! # Notify people about it.
  299.   if ($notify) {
  300.       print "\n";
  301.       if (0 == ($notify =~ tr/ //)) {
  302. ***************
  303. *** 393,435 ****
  304.           print "\nDo you wish to notify them? [y] ";
  305.       }
  306.       $ans = <STDIN>;
  307. !     if ($ans !~ /^n/i) {
  308. !         if ($numpat == 1) {
  309. !             $descr = "Patch $patbase";
  310. !             $has = "has"; $this = "this patch";
  311. !             $patlist = $patbase;
  312. !         } else {
  313. !             $descr = "Patches $patbase thru " . ($patbase+$numpat-1);
  314. !             $has = "have"; $this = "these patches";
  315. !             $patlist = $patbase . "-" . ($patbase+$numpat-1);
  316. !         }
  317. !         $opt = ($mailer =~ /sendmail/) ? '-odq' : '';
  318. !         open(MAILER, "|$mailer $opt $notify $cf'user");
  319. !         print MAILER
  320. ! "To: $notify
  321. ! Subject: $descr for $package version $baserev $has been released.
  322. ! X-Mailer: dist [version $version PL$patchlevel]
  323. ! This is just a quick note to let you know that $descr for $package
  324. ! version $baserev $has just been released. If you are actively using $package,
  325. ! I strongly suggest you upgrade by applying $this.
  326. ! You can fetch $this automatically by sending me the following mail:
  327. !     Subject: Command
  328. !     @SH mailpatch - $package $baserev $patlist
  329. !            ^ note the c
  330. ! If you are not interested in receiving information about future patches,
  331. ! please send me the following mail:
  332. !     Subject: Command
  333. !     @SH package - $package $baserev
  334. ! -- patmake speaking for $maintname.
  335. ! ";
  336. !         close MAILER;
  337. !     }
  338.   }
  339.   
  340.   sub usage {
  341. --- 400,406 ----
  342.           print "\nDo you wish to notify them? [y] ";
  343.       }
  344.       $ans = <STDIN>;
  345. !     system 'patnotify', $notify unless $ans =~ /^n/i;
  346.   }
  347.   
  348.   sub usage {
  349.  
  350. Index: pat/pat.man
  351. Prereq: 3.0
  352. *** pat/pat.man.old    Tue Aug 24 14:25:39 1993
  353. --- pat/pat.man    Tue Aug 24 14:25:40 1993
  354. ***************
  355. *** 1,5 ****
  356.   .rn '' }`
  357. ! ''' $Id: pat.man,v 3.0 1993/08/18 12:10:37 ram Exp $
  358.   '''
  359.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  360.   '''  
  361. --- 1,5 ----
  362.   .rn '' }`
  363. ! ''' $Id: pat.man,v 3.0.1.1 1993/08/24 12:15:42 ram Exp $
  364.   '''
  365.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  366.   '''  
  367. ***************
  368. *** 10,15 ****
  369. --- 10,20 ----
  370.   '''  of the source tree for dist 3.0.
  371.   '''
  372.   ''' $Log: pat.man,v $
  373. + ''' Revision 3.0.1.1  1993/08/24  12:15:42  ram
  374. + ''' patch3: added patnotify and patsnap
  375. + ''' patch3: patcol has a new -S option
  376. + ''' patch3: the users file built by mailagent is now listed under FILES
  377. + '''
  378.   ''' Revision 3.0  1993/08/18  12:10:37  ram
  379.   ''' Baseline for dist 3.0 netwide release.
  380.   '''
  381. ***************
  382. *** 85,91 ****
  383.   .br
  384.   .B patsend
  385.   [
  386. ! .B \-hV
  387.   ] [
  388.   .I patchlist
  389.   ] [
  390. --- 90,96 ----
  391.   .br
  392.   .B patsend
  393.   [
  394. ! .B \-huV
  395.   ] [
  396.   .I patchlist
  397.   ] [
  398. ***************
  399. *** 92,97 ****
  400. --- 97,109 ----
  401.   .I recipients
  402.   ]
  403.   .br
  404. + .B patnotify
  405. + [
  406. + .B \-huV
  407. + ] [
  408. + .I recipients
  409. + ]
  410. + .br
  411.   .B patpost
  412.   [
  413.   .B \-hrV
  414. ***************
  415. *** 116,121 ****
  416. --- 128,143 ----
  417.   .I filelist
  418.   ]
  419.   .br
  420. + .B patsnap
  421. + [
  422. + .B \-ahV
  423. + ] [
  424. + .B \-o
  425. + .I snapshot
  426. + ] [
  427. + .I filelist
  428. + ]
  429. + .br
  430.   .B patcol
  431.   [
  432.   .B \-achnmsCV
  433. ***************
  434. *** 123,128 ****
  435. --- 145,156 ----
  436.   .B \-d
  437.   .I directory
  438.   ] [
  439. + .B \-f
  440. + .I mani
  441. + ] [
  442. + .B \-S
  443. + .I snap
  444. + ] [
  445.   .I filelist
  446.   ]
  447.   .br
  448. ***************
  449. *** 263,279 ****
  450.   .PP
  451.   Patsend, patpost and patftp are used to distribute your patches to the world.
  452.   .I Patsend
  453. ! mails a set of patches to a set of recipients.
  454.   .I Patpost
  455.   posts a set of patches to a set of newsgroups.
  456.   .I Patftp
  457.   merely copies the patch into your public ftp directory.
  458.   .PP
  459.   .I Patname
  460.   can be used to tag a set of files with a symbolic name (specified with
  461.   \fB\-v\fR). This will set the name for the most recent revision of each
  462.   file.
  463.   .PP
  464.   .I Patcol
  465.   will check out a locked version of a file, eventually in an alternate
  466.   directory (specified with \fB\-d\fR, thus mirroring the distribution tree).
  467. --- 291,321 ----
  468.   .PP
  469.   Patsend, patpost and patftp are used to distribute your patches to the world.
  470.   .I Patsend
  471. ! mails a set of patches to a set of recipients. The \fB\-u\fR switch adds all
  472. ! the currently registered users who have asked for patches to be mailed to
  473. ! them, as well as the recipients specified while running \fIpackinit\fR.
  474.   .I Patpost
  475.   posts a set of patches to a set of newsgroups.
  476.   .I Patftp
  477.   merely copies the patch into your public ftp directory.
  478.   .PP
  479. + .I Patnotify simply notifies users that a new patch has been released so that
  480. + they can retrieve it by themselves from an archive site or via e-mail if they
  481. + are interested. The \fB\-u\fR switch can be used to include all the currently
  482. + registered users who have asked for such a notification.
  483. + .PP
  484.   .I Patname
  485.   can be used to tag a set of files with a symbolic name (specified with
  486.   \fB\-v\fR). This will set the name for the most recent revision of each
  487.   file.
  488.   .PP
  489. + .I Patsnap
  490. + will get a snapshot of your release by creating a SNAPSHOT file (name can be
  491. + changed via \fB\-o\fR) listing the file names and the latest RCS revision
  492. + number for that file. Such snapshots can be used to identify the release
  493. + at some random patchlevel and then later be able to retrieve it by feeding
  494. + the snapshot file to \fIpatcol\fR.
  495. + .PP
  496.   .I Patcol
  497.   will check out a locked version of a file, eventually in an alternate
  498.   directory (specified with \fB\-d\fR, thus mirroring the distribution tree).
  499. ***************
  500. *** 285,290 ****
  501. --- 327,340 ----
  502.   into a directory by using the \fB\-c\fR switch in conjunction with \fB\-d\fR
  503.   (or that former switch is simply ignored).
  504.   .PP
  505. + .I Patcol
  506. + can also take its file list from a SNAPSHOT file via the \fB\-S\fR switch, in
  507. + which case it will check out the files using the RCS version specified by the
  508. + snapshot file, such as one created by \fIpatsnap\fR. You may instead specify
  509. + \fB-a\fR, \fB\-m\fR or \fB\-n\fR to respectively use all the files in
  510. + MANIFEST.new, all the modified files (the one which have been \fIpatcil\fRed),
  511. + or all the files newer than \fIpatchlevel.h\fR.
  512. + .PP
  513.   .I Patclean
  514.   will remove the working files after having checked in all the
  515.   changes. You may  restores your working files by using patcol.
  516. ***************
  517. *** 337,342 ****
  518. --- 387,397 ----
  519.   .TP
  520.   bugs/.mods[0-9]+
  521.   Files modified in that patch (checked in with \fIpatcil\fR)
  522. + .TP
  523. + users
  524. + File filled in by \fImailagent\fR's "@SH package" command, normally
  525. + issued by Configure, recording some of the users who kindly registered
  526. + themselves.
  527.   .PD
  528.   .SH ENVIRONMENT
  529.   .PD 0
  530.  
  531. Index: pat/patsend.SH
  532. Prereq: 3.0.1.1
  533. *** pat/patsend.SH.old    Tue Aug 24 14:25:47 1993
  534. --- pat/patsend.SH    Tue Aug 24 14:25:47 1993
  535. ***************
  536. *** 20,26 ****
  537.       eval "exec perl -S \$0 \$*"
  538.           if \$running_under_some_shell;
  539.   
  540. ! # $Id: patsend.SH,v 3.0.1.1 1993/08/19 06:42:42 ram Exp $
  541.   #
  542.   #  Copyright (c) 1991-1993, Raphael Manfredi
  543.   #  
  544. --- 20,26 ----
  545.       eval "exec perl -S \$0 \$*"
  546.           if \$running_under_some_shell;
  547.   
  548. ! # $Id: patsend.SH,v 3.0.1.3 1993/08/24 12:21:59 ram Exp $
  549.   #
  550.   #  Copyright (c) 1991-1993, Raphael Manfredi
  551.   #  
  552. ***************
  553. *** 33,38 ****
  554. --- 33,46 ----
  555.   # Original Author: Larry Wall <lwall@netlabs.com>
  556.   #
  557.   # $Log: patsend.SH,v $
  558. + # Revision 3.0.1.3  1993/08/24  12:21:59  ram
  559. + # patch3: new -u option
  560. + # patch3: added Precedence and X-Mailer headers in mail message
  561. + # patch3: added ~name expansion for orgname
  562. + #
  563. + # Revision 3.0.1.2  1993/08/19  07:10:19  ram
  564. + # patch3: was not correctly writing the To: header field
  565. + #
  566.   # Revision 3.0.1.1  1993/08/19  06:42:42  ram
  567.   # patch1: leading config.sh searching was not aborting properly
  568.   #
  569. ***************
  570. *** 48,54 ****
  571.   cat >>patsend <<'!NO!SUBS!'
  572.   
  573.   require 'getopts.pl';
  574. ! &usage unless &Getopts("hV");
  575.   
  576.   if ($opt_V) {
  577.       print STDERR "patsend $version PL$patchlevel\n";
  578. --- 56,62 ----
  579.   cat >>patsend <<'!NO!SUBS!'
  580.   
  581.   require 'getopts.pl';
  582. ! &usage unless &Getopts("huV");
  583.   
  584.   if ($opt_V) {
  585.       print STDERR "patsend $version PL$patchlevel\n";
  586. ***************
  587. *** 57,67 ****
  588.       &usage;
  589.   }
  590.   
  591. - $RCSEXT = ',v' unless $RCSEXT;
  592.   chdir '..' if -d '../bugs';
  593.   
  594.   &readpackage;
  595.   
  596.   chop($orgname = `cat $orgname`) if $orgname =~ m|^/|;
  597.   
  598.   while ($_ = shift) {
  599. --- 65,76 ----
  600.       &usage;
  601.   }
  602.   
  603.   chdir '..' if -d '../bugs';
  604.   
  605.   &readpackage;
  606. + &readusers if $opt_u;
  607.   
  608. + $orgname = &tilda_expand($orgname);
  609.   chop($orgname = `cat $orgname`) if $orgname =~ m|^/|;
  610.   
  611.   while ($_ = shift) {
  612. ***************
  613. *** 73,78 ****
  614. --- 82,89 ----
  615.       }
  616.   }
  617.   $dest = join(' ',@dest);
  618. + $dest .= " $recipients" if $opt_u;
  619. + $to = join(', ', split(' ', $dest));
  620.   &usage unless $dest;
  621.   
  622.   @ARGV = @argv;
  623. ***************
  624. *** 85,97 ****
  625.   die "Malformed patchlevel.h file.\n" if $maxnum eq '';
  626.   
  627.   if ($#ARGV < 0) {
  628. !     $argv = $maxnum;
  629. !     @ARGV = $argv;
  630.   } else {
  631.       $argv = &rangeargs(@ARGV);
  632. -     @ARGV = split(' ',$argv);
  633.   }
  634.   
  635.   $argv =~ s/ $//;
  636.   
  637.   if ($#ARGV < 0) {
  638. --- 96,109 ----
  639.   die "Malformed patchlevel.h file.\n" if $maxnum eq '';
  640.   
  641.   if ($#ARGV < 0) {
  642. !     @patseq = &patseq($maxnum);
  643. !     $lastpat = pop(@patseq);
  644. !     $argv = &rangeargs("$lastpat-$maxnum");
  645.   } else {
  646.       $argv = &rangeargs(@ARGV);
  647.   }
  648.   
  649. + @ARGV = split(' ',$argv);
  650.   $argv =~ s/ $//;
  651.   
  652.   if ($#ARGV < 0) {
  653. ***************
  654. *** 103,112 ****
  655.       print "Sending $package $baserev patch $argv to $dest...\n";
  656.   }
  657.   
  658.   fork && exit;
  659.   
  660. - chdir 'bugs' || die "patsend: can't cd to bugs\n";
  661.   $opt = '-odq' if $mailer =~ /sendmail/;
  662.   
  663.   until ($#ARGV < 0) {
  664. --- 115,124 ----
  665.       print "Sending $package $baserev patch $argv to $dest...\n";
  666.   }
  667.   
  668. + chdir 'bugs' || die "patsend: can't cd to bugs: $!\n";
  669.   fork && exit;
  670.   
  671.   $opt = '-odq' if $mailer =~ /sendmail/;
  672.   
  673.   until ($#ARGV < 0) {
  674. ***************
  675. *** 113,120 ****
  676.       $patnum = shift;
  677.       open(XHEAD,">.xhead$$") || die "patsend: can't create temp file: $!\n";
  678.       print XHEAD
  679. ! "To: $dest
  680.   Subject: $package $baserev patch #$patnum
  681.   Organization: $orgname
  682.   
  683.   
  684. --- 125,134 ----
  685.       $patnum = shift;
  686.       open(XHEAD,">.xhead$$") || die "patsend: can't create temp file: $!\n";
  687.       print XHEAD
  688. ! "To: $to
  689.   Subject: $package $baserev patch #$patnum
  690. + Precedence: bulk
  691. + X-Mailer: dist [version $version PL$patchlevel]
  692.   Organization: $orgname
  693.   
  694.   
  695. ***************
  696. *** 131,138 ****
  697.   unlink ".xhead$$";
  698.   
  699.   sub usage {
  700. !     print STDERR "Usage: patsend [-hV] [patchlist] [recipients]\n";
  701.       print STDERR "  -h : print this message and exit\n";
  702.       print STDERR "  -V : print version number and exit\n";
  703.       exit 1;
  704.   }
  705. --- 145,153 ----
  706.   unlink ".xhead$$";
  707.   
  708.   sub usage {
  709. !     print STDERR "Usage: patsend [-huV] [patchlist] [recipients]\n";
  710.       print STDERR "  -h : print this message and exit\n";
  711. +     print STDERR "  -u : add all to-be-mailed users\n";
  712.       print STDERR "  -V : print version number and exit\n";
  713.       exit 1;
  714.   }
  715. ***************
  716. *** 140,144 ****
  717. --- 155,162 ----
  718.   !NO!SUBS!
  719.   $grep -v '^;#' ../pl/package.pl >>patsend
  720.   $grep -v '^;#' ../pl/rangeargs.pl >>patsend
  721. + $grep -v '^;#' ../pl/users.pl >>patsend
  722. + $grep -v '^;#' ../pl/patseq.pl >>patsend
  723. + $grep -v '^;#' ../pl/tilde.pl >>patsend
  724.   chmod +x patsend
  725.   $eunicefix patsend
  726.  
  727. Index: pat/patnotify.SH
  728. *** pat/patnotify.SH.old    Tue Aug 24 14:25:45 1993
  729. --- pat/patnotify.SH    Tue Aug 24 14:25:45 1993
  730. ***************
  731. *** 0 ****
  732. --- 1,144 ----
  733. + case $CONFIG in
  734. + '')
  735. +     if test -f config.sh; then TOP=.;
  736. +     elif test -f ../config.sh; then TOP=..;
  737. +     elif test -f ../../config.sh; then TOP=../..;
  738. +     elif test -f ../../../config.sh; then TOP=../../..;
  739. +     elif test -f ../../../../config.sh; then TOP=../../../..;
  740. +     else
  741. +         echo "Can't find config.sh."; exit 1
  742. +     fi
  743. +     . $TOP/config.sh
  744. +     ;;
  745. + esac
  746. + case "$0" in
  747. + */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  748. + esac
  749. + echo "Extracting pat/patnotify (with variable substitutions)"
  750. + cat >patnotify <<!GROK!THIS!
  751. + $startperl
  752. +     eval "exec perl -S \$0 \$*"
  753. +         if \$running_under_some_shell;
  754. + # $Id: patnotify.SH,v 3.0.1.1 1993/08/24 12:19:11 ram Exp $
  755. + #
  756. + #  Copyright (c) 1991-1993, Raphael Manfredi
  757. + #  
  758. + #  You may redistribute only under the terms of the Artistic Licence,
  759. + #  as specified in the README file that comes with the distribution.
  760. + #  You may reuse parts of this distribution only within the terms of
  761. + #  that same Artistic Licence; a copy of which may be found at the root
  762. + #  of the source tree for dist 3.0.
  763. + #
  764. + # $Log: patnotify.SH,v $
  765. + # Revision 3.0.1.1  1993/08/24  12:19:11  ram
  766. + # patch3: created
  767. + #
  768. + \$defeditor='$defeditor';
  769. + \$version = '$VERSION';
  770. + \$patchlevel = '$PATCHLEVEL';
  771. + \$mailer = '$mailer';
  772. + !GROK!THIS!
  773. + cat >>patnotify <<'!NO!SUBS!'
  774. + require 'getopts.pl';
  775. + &usage unless &Getopts("huV");
  776. + if ($opt_V) {
  777. +     print STDERR "patnotify $version PL$patchlevel\n";
  778. +     exit 0;
  779. + } elsif ($opt_h) {
  780. +     &usage;
  781. + }
  782. + chdir '..' if -d '../bugs';
  783. + &readpackage;
  784. + &readusers if $opt_u;
  785. + $dest = join(' ', @ARGV);
  786. + $dest .= " $notify" if $opt_u;
  787. + &usage unless $dest;
  788. + if (-f 'patchlevel.h') {
  789. +     open(PL,"patchlevel.h") || die "Can't open patchlevel.h\n";
  790. +     while (<PL>) {
  791. +         if (/^#define\s+PATCHLEVEL\s+(\d+)/) {
  792. +             $last = $1;
  793. +         }
  794. +     }
  795. +     die "Malformed patchlevel.h file.\n" if $last eq '';
  796. + } else {
  797. +     die "No patchlevel.h.\n";
  798. + }
  799. + @patches = &patseq($last);    # Compute patches sequence
  800. + $lastpat = pop(@patches);
  801. + warn "patnotify: missing last .logs and .mods files\n" if $lastpat eq '';
  802. + $missing = $last - $lastpat + 1;
  803. + $these = $missing == 1 ? 'this' : 'these';
  804. + $patches = $missing == 1 ? 'patch' : 'patches';
  805. + $through = $missing == 1 ? $lastpat : "$lastpat thru " . ($lastpat+$missing-1);
  806. + $have = $missing == 1 ? 'has' : 'have';
  807. + $patlist = "$lastpat-";        # They'll get everything up to the end
  808. + ($Patches = $patches) =~ s/^p/P/;
  809. + $opt = ($mailer =~ /sendmail/) ? '-odq' : '';
  810. + $to = join(', ', split(' ', $dest));    # Sensible To: for sendmail
  811. + print "Sending notification of $missing new $patches to $dest...\n";
  812. + fork && exit;
  813. + chdir 'bugs' || die "patnotify: can't cd to bugs: $!\n";
  814. + open(MAILER, "|$mailer $opt $dest");
  815. + print MAILER
  816. + "To: $to
  817. + Subject: $Patches $through for $package version $baserev $have been released.
  818. + Precedence: bulk
  819. + X-Mailer: dist [version $version PL$patchlevel]
  820. + This is just a quick note to let you know that $package version $baserev
  821. + has been recently upgraded and that $patches $through $have been released.
  822. + If you are actively using $package, I strongly suggest you upgrade by
  823. + applying $these $patches.
  824. + You can fetch $these $patches automatically by sending me the following mail:
  825. +     Subject: Command
  826. +     @SH mailpatch - $package $baserev $patlist
  827. +            ^ note the c
  828. + If you are not interested in receiving information about future patches,
  829. + please send me the following mail:
  830. +     Subject: Command
  831. +     @SH package - $package $baserev
  832. + -- patnotify speaking for $maintname.
  833. + ";
  834. + close MAILER;
  835. + sub usage {
  836. +     print STDERR <<EOH;
  837. + Usage: patnotify [-huV] [recipients]
  838. +   -h : print this message and exit
  839. +   -u : add all to-be-notified users
  840. +   -V : print version number and exit
  841. + EOM
  842. +     exit 1;
  843. + }
  844. + !NO!SUBS!
  845. + $grep -v '^;#' ../pl/package.pl >>patnotify
  846. + $grep -v '^;#' ../pl/users.pl >>patnotify
  847. + $grep -v '^;#' ../pl/patseq.pl >>patnotify
  848. + chmod +x patnotify
  849. + $eunicefix patnotify
  850.  
  851. Index: pat/patcol.SH
  852. Prereq: 3.0.1.1
  853. *** pat/patcol.SH.old    Tue Aug 24 14:25:41 1993
  854. --- pat/patcol.SH    Tue Aug 24 14:25:42 1993
  855. ***************
  856. *** 20,26 ****
  857.       eval "exec perl -S \$0 \$*"
  858.           if \$running_under_some_shell;
  859.   
  860. ! # $Id: patcol.SH,v 3.0.1.1 1993/08/19 06:42:34 ram Exp $
  861.   #
  862.   #  Copyright (c) 1991-1993, Raphael Manfredi
  863.   #  
  864. --- 20,26 ----
  865.       eval "exec perl -S \$0 \$*"
  866.           if \$running_under_some_shell;
  867.   
  868. ! # $Id: patcol.SH,v 3.0.1.2 1993/08/24 12:16:30 ram Exp $
  869.   #
  870.   #  Copyright (c) 1991-1993, Raphael Manfredi
  871.   #  
  872. ***************
  873. *** 31,36 ****
  874. --- 31,39 ----
  875.   #  of the source tree for dist 3.0.
  876.   #
  877.   # $Log: patcol.SH,v $
  878. + # Revision 3.0.1.2  1993/08/24  12:16:30  ram
  879. + # patch3: new -S option for snapshot check-outs
  880. + #
  881.   # Revision 3.0.1.1  1993/08/19  06:42:34  ram
  882.   # patch1: leading config.sh searching was not aborting properly
  883.   #
  884. ***************
  885. *** 48,54 ****
  886.   
  887.   require 'getopts.pl';
  888.   &usage unless $#ARGV >= 0;
  889. ! &usage unless &Getopts("acd:f:hnmsCRV");
  890.   
  891.   if ($opt_V) {
  892.       print STDERR "$progname $version PL$patchlevel\n";
  893. --- 51,57 ----
  894.   
  895.   require 'getopts.pl';
  896.   &usage unless $#ARGV >= 0;
  897. ! &usage unless &Getopts("acd:f:hnmsCRS:V");
  898.   
  899.   if ($opt_V) {
  900.       print STDERR "$progname $version PL$patchlevel\n";
  901. ***************
  902. *** 109,114 ****
  903. --- 112,122 ----
  904.           push(@ARGV,$_);
  905.       }
  906.       close MODS;
  907. + } elsif ($opt_S) {
  908. +     &readsnapshot($opt_S);
  909. +     foreach $file (sort keys %Snap) {
  910. +         push(@ARGV, $file);
  911. +     }
  912.   }
  913.   
  914.   # Now loop over each file specified, doing a 'co -l'
  915. ***************
  916. *** 117,126 ****
  917.           ©_file($file, $opt_d);
  918.           next;
  919.       }
  920.       if (! -f $file || $opt_d) {
  921. -         # Continue only if file does not exist or option -d was used.
  922.           $files = &rcsargs($file);
  923.           @files = split(' ', $files);
  924.           $rlog = `rlog -rlastpat- $files 2>&1`;
  925.           ($revs) = ($rlog =~ /selected revisions: (\d+)/);
  926.           if (!$revs) {
  927. --- 125,138 ----
  928.           ©_file($file, $opt_d);
  929.           next;
  930.       }
  931. +     # Continue only if file does not exist or option -d was used.
  932.       if (! -f $file || $opt_d) {
  933.           $files = &rcsargs($file);
  934.           @files = split(' ', $files);
  935. +         if ($opt_S && ($rev = $Snap{$file}) ne '') {    # Use snapshot file
  936. +             &col($rev);
  937. +             next;
  938. +         }
  939.           $rlog = `rlog -rlastpat- $files 2>&1`;
  940.           ($revs) = ($rlog =~ /selected revisions: (\d+)/);
  941.           if (!$revs) {
  942. ***************
  943. *** 191,197 ****
  944.   
  945.   sub usage {
  946.       print STDERR <<'EOM';
  947. ! Usage: patcol [-achnmsCRV] [-d directory] [-f mani] [filelist]
  948.     -a : all the files in MANIFEST.new (see also -f)
  949.     -c : copy files if checked-out copy exists (only when -d)
  950.     -d : check out (or copy) in the specified directory
  951. --- 203,209 ----
  952.   
  953.   sub usage {
  954.       print STDERR <<'EOM';
  955. ! Usage: patcol [-achnmsCRV] [-d directory] [-f mani] [-S snap] [filelist]
  956.     -a : all the files in MANIFEST.new (see also -f)
  957.     -c : copy files if checked-out copy exists (only when -d)
  958.     -d : check out (or copy) in the specified directory
  959. ***************
  960. *** 202,207 ****
  961. --- 214,220 ----
  962.     -s : silent mode
  963.     -C : perform copyright expansion on checked out (or copied) file
  964.     -R : strip out RCS $Locker marker from checked-out file (only when -d)
  965. +   -S : use snapshot file to determine file list and RCS revisions
  966.     -V : print version number and exit
  967.   EOM
  968.       exit 1;
  969. ***************
  970. *** 213,217 ****
  971. --- 226,231 ----
  972.   $grep -v '^;#' ../pl/rcsargs.pl >>patcol
  973.   $grep -v '^;#' ../pl/copyright.pl >>patcol
  974.   $grep -v '^;#' ../pl/makedir.pl >>patcol
  975. + $grep -v '^;#' ../pl/snapshot.pl >>patcol
  976.   chmod +x patcol
  977.   $eunicefix patcol
  978.  
  979. Index: pat/patsnap.SH
  980. *** pat/patsnap.SH.old    Tue Aug 24 14:25:48 1993
  981. --- pat/patsnap.SH    Tue Aug 24 14:25:48 1993
  982. ***************
  983. *** 0 ****
  984. --- 1,119 ----
  985. + case $CONFIG in
  986. + '')
  987. +     if test -f config.sh; then TOP=.;
  988. +     elif test -f ../config.sh; then TOP=..;
  989. +     elif test -f ../../config.sh; then TOP=../..;
  990. +     elif test -f ../../../config.sh; then TOP=../../..;
  991. +     elif test -f ../../../../config.sh; then TOP=../../../..;
  992. +     else
  993. +         echo "Can't find config.sh."; exit 1
  994. +     fi
  995. +     . $TOP/config.sh
  996. +     ;;
  997. + esac
  998. + case "$0" in
  999. + */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  1000. + esac
  1001. + echo "Extracting pat/patsnap (with variable substitutions)"
  1002. + cat >patsnap <<!GROK!THIS!
  1003. + $startperl
  1004. +     eval "exec perl -S \$0 \$*"
  1005. +         if \$running_under_some_shell;
  1006. + # $Id: patsnap.SH,v 3.0.1.1 1993/08/24 12:22:08 ram Exp $
  1007. + #
  1008. + #  Copyright (c) 1991-1993, Raphael Manfredi
  1009. + #  
  1010. + #  You may redistribute only under the terms of the Artistic Licence,
  1011. + #  as specified in the README file that comes with the distribution.
  1012. + #  You may reuse parts of this distribution only within the terms of
  1013. + #  that same Artistic Licence; a copy of which may be found at the root
  1014. + #  of the source tree for dist 3.0.
  1015. + #
  1016. + # $Log: patsnap.SH,v $
  1017. + # Revision 3.0.1.1  1993/08/24  12:22:08  ram
  1018. + # patch3: created
  1019. + #
  1020. + \$version = '$VERSION';
  1021. + \$patchlevel = '$PATCHLEVEL';
  1022. + !GROK!THIS!
  1023. + cat >>patsnap <<'!NO!SUBS!'
  1024. + $progname = 'patsnap';        # My name
  1025. + require 'getopts.pl';
  1026. + &usage unless $#ARGV >= 0;
  1027. + &usage unless &Getopts("aho:V");
  1028. + $SNAPSHOT = 'SNAPSHOT';        # Default snapshot file name
  1029. + if ($opt_V) {
  1030. +     print STDERR "$progname $version PL$patchlevel\n";
  1031. +     exit 0;
  1032. + } elsif ($opt_h) {
  1033. +     &usage;
  1034. + }
  1035. + &readpackage;
  1036. + $RCSEXT = ',v' unless $RCSEXT;
  1037. + $TOPDIR = '';            # We are at the top-level directory
  1038. + $SNAPSHOT = $opt_o if $opt_o;
  1039. + if ($opt_a) {
  1040. +     open(MANI,"MANIFEST.new") || die "No MANIFEST.new found.\n";
  1041. +     @ARGV = ();
  1042. +     while (<MANI>) {
  1043. +         chop;
  1044. +         s|^\./||;
  1045. +         next if m|^patchlevel.h|;        # Special file
  1046. +         ($_) = split(' ');
  1047. +         next if -d;
  1048. +         push(@ARGV,$_);
  1049. +     }
  1050. +     close MANI;
  1051. + }
  1052. + open(SNAPSHOT, ">$SNAPSHOT") || die "$progname: can't create $SNAPSHOT: $!\n";
  1053. + foreach $file (@ARGV) {
  1054. +     $files = &rcsargs($file);
  1055. +     @files = split(' ',$files);
  1056. +     $revs=0;
  1057. +     $rlog = `rlog -r$baserev -r$revbranch $files 2>&1`;
  1058. +     ($revs) = ($rlog =~ /selected revisions: (\d+)/);
  1059. +     if (!$revs) {
  1060. +         print "$progname: $file has never been checked in--skipping\n";
  1061. +         next;
  1062. +     }
  1063. +     elsif ($revs == 1) {
  1064. +         print "Last revision for $file is $baserev.\n";
  1065. +         print SNAPSHOT "$file\t$baserev\n";
  1066. +     }
  1067. +     else {
  1068. +         ($lastrev) = ($rlog =~ /revision $revbranch\.(\d+)/);
  1069. +         print "Last revision for $file is $revbranch.$lastrev.\n";
  1070. +         print SNAPSHOT "$file\t$revbranch.$lastrev\n";
  1071. +     }
  1072. + }
  1073. + close SNAPSHOT;
  1074. + sub usage {
  1075. +     print STDERR <<EOM;
  1076. + Usage: $progname [-ahV] [-o snapshot] [filelist]
  1077. +   -a : all the files in MANIFEST.new
  1078. +   -h : print this message and exit
  1079. +   -o : specify snapshot file output (default $SNAPSHOT)
  1080. +   -V : print version number and exit
  1081. + EOM
  1082. +     exit 1;
  1083. + }
  1084. + !NO!SUBS!
  1085. + $grep -v '^;#' ../pl/package.pl >>patsnap
  1086. + $grep -v '^;#' ../pl/rcsargs.pl >>patsnap
  1087. + $grep -v '^;#' ../pl/comment.pl >>patsnap
  1088. + chmod +x patsnap
  1089. + $eunicefix patsnap
  1090.  
  1091. Index: pat/patpost.SH
  1092. Prereq: 3.0.1.1
  1093. *** pat/patpost.SH.old    Tue Aug 24 14:25:46 1993
  1094. --- pat/patpost.SH    Tue Aug 24 14:25:46 1993
  1095. ***************
  1096. *** 20,26 ****
  1097.       eval "exec perl -S \$0 \$*"
  1098.           if \$running_under_some_shell;
  1099.   
  1100. ! # $Id: patpost.SH,v 3.0.1.1 1993/08/19 06:42:41 ram Exp $
  1101.   #
  1102.   #  Copyright (c) 1991-1993, Raphael Manfredi
  1103.   #  
  1104. --- 20,26 ----
  1105.       eval "exec perl -S \$0 \$*"
  1106.           if \$running_under_some_shell;
  1107.   
  1108. ! # $Id: patpost.SH,v 3.0.1.2 1993/08/24 12:19:48 ram Exp $
  1109.   #
  1110.   #  Copyright (c) 1991-1993, Raphael Manfredi
  1111.   #  
  1112. ***************
  1113. *** 33,38 ****
  1114. --- 33,42 ----
  1115.   # Original Author: Larry Wall <lwall@netlabs.com>
  1116.   #
  1117.   # $Log: patpost.SH,v $
  1118. + # Revision 3.0.1.2  1993/08/24  12:19:48  ram
  1119. + # patch3: added ~name expansion for orgname
  1120. + # patch3: random cleanup
  1121. + #
  1122.   # Revision 3.0.1.1  1993/08/19  06:42:41  ram
  1123.   # patch1: leading config.sh searching was not aborting properly
  1124.   #
  1125. ***************
  1126. *** 64,73 ****
  1127.       $inews = '/usr/lib/news/inews' if -f '/usr/lib/news/inews';
  1128.   }
  1129.   
  1130. ! chdir '..' if -f '../.package';
  1131.   
  1132.   &readpackage;
  1133.   
  1134.   chop($orgname = `cat $orgname`) if $orgname =~ m|^/|;
  1135.   
  1136.   if ($opt_r) {
  1137. --- 68,78 ----
  1138.       $inews = '/usr/lib/news/inews' if -f '/usr/lib/news/inews';
  1139.   }
  1140.   
  1141. ! chdir '..' if -d '../bugs';
  1142.   
  1143.   &readpackage;
  1144.   
  1145. + $orgname = &tilda_expand($orgname);
  1146.   chop($orgname = `cat $orgname`) if $orgname =~ m|^/|;
  1147.   
  1148.   if ($opt_r) {
  1149. ***************
  1150. *** 94,107 ****
  1151.   die "Malformed patchlevel.h file.\n" if $maxnum eq '';
  1152.   
  1153.   if ($#ARGV < 0) {
  1154. !     $argv = $maxnum;
  1155. !     @ARGV = $argv;
  1156.   }
  1157.   else {
  1158.       $argv = &rangeargs(@ARGV);
  1159. -     @ARGV = split(' ',$argv);
  1160.   }
  1161.   
  1162.   $argv =~ s/ $//;
  1163.   
  1164.   if ($#ARGV < 0) {
  1165. --- 99,113 ----
  1166.   die "Malformed patchlevel.h file.\n" if $maxnum eq '';
  1167.   
  1168.   if ($#ARGV < 0) {
  1169. !     @patseq = &patseq($maxnum);
  1170. !     $lastpat = pop(@patseq);
  1171. !     $argv = &rangeargs("$lastpat-$maxnum");
  1172.   }
  1173.   else {
  1174.       $argv = &rangeargs(@ARGV);
  1175.   }
  1176.   
  1177. + @ARGV = split(' ',$argv);
  1178.   $argv =~ s/ $//;
  1179.   
  1180.   if ($#ARGV < 0) {
  1181. ***************
  1182. *** 113,119 ****
  1183.       print "Posting $package $baserev patch $argv to $newsgroups...\n";
  1184.   }
  1185.   
  1186. ! chdir 'bugs' || die "Can't cd to bugs\n";
  1187.   
  1188.   fork && exit;
  1189.   
  1190. --- 119,125 ----
  1191.       print "Posting $package $baserev patch $argv to $newsgroups...\n";
  1192.   }
  1193.   
  1194. ! chdir 'bugs' || die "patpost: can't cd to bugs: $!\n";
  1195.   
  1196.   fork && exit;
  1197.   
  1198. ***************
  1199. *** 150,156 ****
  1200.   }
  1201.   
  1202.   !NO!SUBS!
  1203. ! cat ../pl/package.pl >>patpost
  1204. ! cat ../pl/rangeargs.pl >>patpost
  1205.   chmod +x patpost
  1206.   $eunicefix patpost
  1207. --- 156,164 ----
  1208.   }
  1209.   
  1210.   !NO!SUBS!
  1211. ! $grep -v '^;#' ../pl/package.pl >>patpost
  1212. ! $grep -v '^;#' ../pl/rangeargs.pl >>patpost
  1213. ! $grep -v '^;#' ../pl/patseq.pl >>patpost
  1214. ! $grep -v '^;#' ../pl/tilde.pl >>patpost
  1215.   chmod +x patpost
  1216.   $eunicefix patpost
  1217.  
  1218. Index: pl/users.pl
  1219. Prereq: 3.0
  1220. *** pl/users.pl.old    Tue Aug 24 14:25:50 1993
  1221. --- pl/users.pl    Tue Aug 24 14:25:51 1993
  1222. ***************
  1223. *** 1,4 ****
  1224. ! ;# $Id: users.pl,v 3.0 1993/08/18 12:11:02 ram Exp $
  1225.   ;#
  1226.   ;#  Copyright (c) 1991-1993, Raphael Manfredi
  1227.   ;#  
  1228. --- 1,4 ----
  1229. ! ;# $Id: users.pl,v 3.0.1.1 1993/08/24 12:23:19 ram Exp $
  1230.   ;#
  1231.   ;#  Copyright (c) 1991-1993, Raphael Manfredi
  1232.   ;#  
  1233. ***************
  1234. *** 11,33 ****
  1235.   ;# Original Author: Graham Stoney <greyham@research.canon.oz.au>
  1236.   ;#
  1237.   ;# $Log: users.pl,v $
  1238.   ;# Revision 3.0  1993/08/18  12:11:02  ram
  1239.   ;# Baseline for dist 3.0 netwide release.
  1240.   ;#
  1241.   ;#
  1242.   sub readusers {
  1243. !     if (open(USERS,'users')) {
  1244. !         while (<USERS>) {
  1245. !             next if /^#/;
  1246. !             chop if /\n$/;            # Emacs may leave final line without \n
  1247. !             ($status,$name) = split;
  1248. !             if ($status eq 'M') {
  1249. !                 $recipients = $recipients ? "$recipients $name" : $name;
  1250. !             } elsif ($status eq 'N') {
  1251. !                 $notify = $notify ? "$notify $name" : $name;
  1252. !             }
  1253.           }
  1254. -         close USERS;
  1255.       }
  1256.   }
  1257.   
  1258. --- 11,43 ----
  1259.   ;# Original Author: Graham Stoney <greyham@research.canon.oz.au>
  1260.   ;#
  1261.   ;# $Log: users.pl,v $
  1262. + ;# Revision 3.0.1.1  1993/08/24  12:23:19  ram
  1263. + ;# patch3: added some comments about the users file format
  1264. + ;# patch3: random cleanup
  1265. + ;#
  1266.   ;# Revision 3.0  1993/08/18  12:11:02  ram
  1267.   ;# Baseline for dist 3.0 netwide release.
  1268.   ;#
  1269. + ;# The users file, as built by mailagent upon reception of an '@SH package'
  1270. + ;# command contains a list of e-mail addresses, prefixed by a single letter.
  1271. + ;# Users tagged with 'U' or 'L' are plain users, those with 'M' wish to
  1272. + ;# receive issued patches by e-mail while 'N' users simply want to be notified
  1273. + ;# when a new patch is released;
  1274.   ;#
  1275.   sub readusers {
  1276. !     return unless open(USERS, 'users');
  1277. !     local($_);
  1278. !     local($status, $name);
  1279. !     while (<USERS>) {
  1280. !         next if /^#/;
  1281. !         chop if /\n$/;                # Emacs may leave final line without \n
  1282. !         ($status, $name) = split;
  1283. !         if ($status eq 'M') {
  1284. !             $recipients = $recipients ? "$recipients $name" : $name;
  1285. !         } elsif ($status eq 'N') {
  1286. !             $notify = $notify ? "$notify $name" : $name;
  1287.           }
  1288.       }
  1289. +     close USERS;
  1290.   }
  1291.   
  1292.  
  1293. Index: pat/Makefile.SH
  1294. *** pat/Makefile.SH.old    Tue Aug 24 14:25:37 1993
  1295. --- pat/Makefile.SH    Tue Aug 24 14:25:37 1993
  1296. ***************
  1297. *** 1,4 ****
  1298. ! : Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL0]
  1299.   : $X-Id: Jmake.tmpl,v 3.0 1993/08/18 12:04:16 ram Exp ram $
  1300.   
  1301.   case $CONFIG in
  1302. --- 1,4 ----
  1303. ! : Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL2]
  1304.   : $X-Id: Jmake.tmpl,v 3.0 1993/08/18 12:04:16 ram Exp ram $
  1305.   
  1306.   case $CONFIG in
  1307. ***************
  1308. *** 52,58 ****
  1309.   ########################################################################
  1310.   # Start of Jmakefile
  1311.   
  1312. ! # $X-Id: Jmakefile,v 3.0 1993/08/18 12:10:32 ram Exp ram $
  1313.   #
  1314.   #  Copyright (c) 1991-1993, Raphael Manfredi
  1315.   #  
  1316. --- 52,58 ----
  1317.   ########################################################################
  1318.   # Start of Jmakefile
  1319.   
  1320. ! # $X-Id: Jmakefile,v 3.0.1.1 1993/08/24 12:09:05 ram Exp ram $
  1321.   #
  1322.   #  Copyright (c) 1991-1993, Raphael Manfredi
  1323.   #  
  1324. ***************
  1325. *** 63,73 ****
  1326.   #  of the source tree for dist 3.0.
  1327.   #
  1328.   # $X-Log: Jmakefile,v $
  1329.   # Revision 3.0  1993/08/18  12:10:32  ram
  1330.   # Baseline for dist 3.0 netwide release.
  1331.   #
  1332.   
  1333. ! BASE = // cil base diff make clean col name ftp send index post
  1334.   
  1335.   PAT = \
  1336.       pat \
  1337. --- 63,76 ----
  1338.   #  of the source tree for dist 3.0.
  1339.   #
  1340.   # $X-Log: Jmakefile,v $
  1341. + # Revision 3.0.1.1  1993/08/24  12:09:05  ram
  1342. + # patch3: added patnotify and patsnap
  1343. + #
  1344.   # Revision 3.0  1993/08/18  12:10:32  ram
  1345.   # Baseline for dist 3.0 netwide release.
  1346.   #
  1347.   
  1348. ! BASE = // cil base diff make clean col name ftp send index post notify snap
  1349.   
  1350.   PAT = \
  1351.       pat \
  1352. ***************
  1353. *** 81,87 ****
  1354.       patftp \
  1355.       patsend \
  1356.       patindex \
  1357. !     patpost 
  1358.   
  1359.   all:: $(PAT)
  1360.   
  1361. --- 84,92 ----
  1362.       patftp \
  1363.       patsend \
  1364.       patindex \
  1365. !     patpost \
  1366. !     patnotify \
  1367. !     patsnap 
  1368.   
  1369.   all:: $(PAT)
  1370.   
  1371. ***************
  1372. *** 123,128 ****
  1373. --- 128,139 ----
  1374.   
  1375.   patpost: patpost.SH
  1376.       /bin/sh patpost.SH
  1377. + patnotify: patnotify.SH
  1378. +     /bin/sh patnotify.SH
  1379. + patsnap: patsnap.SH
  1380. +     /bin/sh patsnap.SH
  1381.   
  1382.   
  1383.   install:: $(PAT)
  1384.  
  1385. Index: dist.man
  1386. Prereq: 3.0
  1387. *** dist.man.old    Tue Aug 24 14:25:30 1993
  1388. --- dist.man    Tue Aug 24 14:25:30 1993
  1389. ***************
  1390. *** 1,4 ****
  1391. ! ''' $Id: dist.man,v 3.0 1993/08/18 12:04:07 ram Exp $
  1392.   '''
  1393.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  1394.   '''  
  1395. --- 1,4 ----
  1396. ! ''' $Id: dist.man,v 3.0.1.1 1993/08/24 12:12:00 ram Exp $
  1397.   '''
  1398.   '''  Copyright (c) 1991-1993, Raphael Manfredi
  1399.   '''  
  1400. ***************
  1401. *** 9,14 ****
  1402. --- 9,17 ----
  1403.   '''  of the source tree for dist 3.0.
  1404.   '''
  1405.   ''' $Log: dist.man,v $
  1406. + ''' Revision 3.0.1.1  1993/08/24  12:12:00  ram
  1407. + ''' patch3: added entries for patnotify and patsnap
  1408. + '''
  1409.   ''' Revision 3.0  1993/08/18  12:04:07  ram
  1410.   ''' Baseline for dist 3.0 netwide release.
  1411.   '''
  1412. ***************
  1413. *** 22,28 ****
  1414.   and it is also meant to be used with two external products, which are
  1415.   publicly available: \fImailagent\fR and \fIpatch\fR.
  1416.   .PP
  1417. ! The fist component is the \fIConfigure\fR script generator, which is a
  1418.   portability tool. It is automatically build up by \fImetaconfig\fR from your
  1419.   sources and a set of units. Ideally, the end-user receiving your source code
  1420.   will simply have to read your README file, run the \fIConfigure\fR script
  1421. --- 25,31 ----
  1422.   and it is also meant to be used with two external products, which are
  1423.   publicly available: \fImailagent\fR and \fIpatch\fR.
  1424.   .PP
  1425. ! The first component is the \fIConfigure\fR script generator, which is a
  1426.   portability tool. It is automatically build up by \fImetaconfig\fR from your
  1427.   sources and a set of units. Ideally, the end-user receiving your source code
  1428.   will simply have to read your README file, run the \fIConfigure\fR script
  1429. ***************
  1430. *** 127,137 ****
  1431. --- 130,146 ----
  1432.   patmake
  1433.   puts diffs together into a patch.
  1434.   .TP
  1435. + patnotify
  1436. + notifies users that new patches have been released.
  1437. + .TP
  1438.   patpost
  1439.   posts patch to some newsgroup.
  1440.   .TP
  1441.   patsend
  1442.   mails patch to some people.
  1443. + .TP
  1444. + patsnap
  1445. + builds a release snapshot with files and RCS revisions.
  1446.   .PD
  1447.   .SH FILES
  1448.   .PD 0
  1449.  
  1450. Index: MANIFEST
  1451. *** MANIFEST.old    Tue Aug 24 14:25:52 1993
  1452. --- MANIFEST    Tue Aug 24 14:25:52 1993
  1453. ***************
  1454. *** 97,102 ****
  1455. --- 97,103 ----
  1456.   mcon/U/Whoa.U              Warning function
  1457.   mcon/U/abortsig.U          Which signal is sent by abort()?
  1458.   mcon/U/active.U            Find the news active file
  1459. + mcon/U/afs.U               Look whether AFS is running or not
  1460.   mcon/U/alignbytes.U        Check for alignment constraints
  1461.   mcon/U/baserev.U           Base revision of package
  1462.   mcon/U/basicshell.U        Which basic shell is available
  1463. ***************
  1464. *** 433,440 ****
  1465. --- 434,443 ----
  1466.   pat/patindex.SH            Create an index of patches sent out
  1467.   pat/patmake.SH             Put together a patch file
  1468.   pat/patname.SH             Assign symbolic name to a revision
  1469. + pat/patnotify.SH           Notifies that new patches have been released
  1470.   pat/patpost.SH             Send patches via news
  1471.   pat/patsend.SH             Sends patches via mail
  1472. + pat/patsnap.SH             Builds RCS snapshot file
  1473.   patchlevel.h               The current patchlevel for dist
  1474.   pl/                        Directory for public perl libraries
  1475.   pl/comment.pl              Perl library to find comment in front of $Log
  1476. ***************
  1477. *** 445,451 ****
  1478. --- 448,456 ----
  1479.   pl/manifake.pl             Perl library to build a MANIFEST.new if none found
  1480.   pl/newer.pl                Perl library to Find files newer than patchlevel.h
  1481.   pl/package.pl              Perl library to read .package
  1482. + pl/patseq.pl               Perl library to compute issued patch sequence
  1483.   pl/rangeargs.pl            Perl library to expand number lists
  1484.   pl/rcsargs.pl              Perl library to expand rcs filename lists
  1485. + pl/snapshot.pl             Perl library to parse RCS snapshot file
  1486.   pl/tilde.pl                Perl library to perform ~name expansion
  1487.   pl/users.pl                Perl library to parse users file
  1488.  
  1489. Index: jmake/files/Jmake.tmpl
  1490. Prereq: 3.0
  1491. *** jmake/files/Jmake.tmpl.old    Tue Aug 24 14:25:31 1993
  1492. --- jmake/files/Jmake.tmpl    Tue Aug 24 14:25:31 1993
  1493. ***************
  1494. *** 1,7 ****
  1495.   /*
  1496.    * Generic jmake template
  1497.    *
  1498. !  * $Id: Jmake.tmpl,v 3.0 1993/08/18 12:04:16 ram Exp $
  1499.    *
  1500.    *  Copyright (c) 1991-1993, Raphael Manfredi
  1501.    *  
  1502. --- 1,7 ----
  1503.   /*
  1504.    * Generic jmake template
  1505.    *
  1506. !  * $Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp $
  1507.    *
  1508.    *  Copyright (c) 1991-1993, Raphael Manfredi
  1509.    *  
  1510. ***************
  1511. *** 12,17 ****
  1512. --- 12,20 ----
  1513.    *  of the source tree for dist 3.0.
  1514.    *
  1515.    * $Log: Jmake.tmpl,v $
  1516. +  * Revision 3.0.1.1  1993/08/20  07:36:36  ram
  1517. +  * patch3: config.sh searching was not aborting properly
  1518. +  *
  1519.    * Revision 3.0  1993/08/18  12:04:16  ram
  1520.    * Baseline for dist 3.0 netwide release.
  1521.    *
  1522. ***************
  1523. *** 18,24 ****
  1524.    */
  1525.   
  1526.   : Makefile.SH generated from Jmake.tmpl and Jmakefile <TAG>
  1527. ! : $Id: Jmake.tmpl,v 3.0 1993/08/18 12:04:16 ram Exp $
  1528.   
  1529.   /*************************************************************************
  1530.    *                                                                       *
  1531. --- 21,27 ----
  1532.    */
  1533.   
  1534.   : Makefile.SH generated from Jmake.tmpl and Jmakefile <TAG>
  1535. ! : $Id: Jmake.tmpl,v 3.0.1.1 1993/08/20 07:36:36 ram Exp $
  1536.   
  1537.   /*************************************************************************
  1538.    *                                                                       *
  1539. ***************
  1540. *** 34,40 ****
  1541.       elif test -f ../../../config.sh; then TOP=../../..;
  1542.       elif test -f ../../../../config.sh; then TOP=../../../..;
  1543.       else
  1544. !         (echo "Can't find config.sh."; exit 1)
  1545.       fi
  1546.       . $TOP/config.sh
  1547.       ;;
  1548. --- 37,43 ----
  1549.       elif test -f ../../../config.sh; then TOP=../../..;
  1550.       elif test -f ../../../../config.sh; then TOP=../../../..;
  1551.       else
  1552. !         echo "Can't find config.sh."; exit 1
  1553.       fi
  1554.       . $TOP/config.sh
  1555.       ;;
  1556.  
  1557. Index: pat/Jmakefile
  1558. Prereq: 3.0
  1559. *** pat/Jmakefile.old    Tue Aug 24 14:25:36 1993
  1560. --- pat/Jmakefile    Tue Aug 24 14:25:36 1993
  1561. ***************
  1562. *** 2,8 ****
  1563.    * Jmakefile for patching tools.
  1564.    */
  1565.   
  1566. ! ;# $Id: Jmakefile,v 3.0 1993/08/18 12:10:32 ram Exp $
  1567.   ;#
  1568.   ;#  Copyright (c) 1991-1993, Raphael Manfredi
  1569.   ;#  
  1570. --- 2,8 ----
  1571.    * Jmakefile for patching tools.
  1572.    */
  1573.   
  1574. ! ;# $Id: Jmakefile,v 3.0.1.1 1993/08/24 12:09:05 ram Exp $
  1575.   ;#
  1576.   ;#  Copyright (c) 1991-1993, Raphael Manfredi
  1577.   ;#  
  1578. ***************
  1579. *** 13,18 ****
  1580. --- 13,21 ----
  1581.   ;#  of the source tree for dist 3.0.
  1582.   ;#
  1583.   ;# $Log: Jmakefile,v $
  1584. + ;# Revision 3.0.1.1  1993/08/24  12:09:05  ram
  1585. + ;# patch3: added patnotify and patsnap
  1586. + ;#
  1587.   ;# Revision 3.0  1993/08/18  12:10:32  ram
  1588.   ;# Baseline for dist 3.0 netwide release.
  1589.   ;#
  1590. ***************
  1591. *** 21,27 ****
  1592.    * used to specify a null expansion pattern, but some of those new smart cpp
  1593.    * now think it's a up-to-end-of-line comment--why do they do that to us?
  1594.    */
  1595. ! BASE = /^^/ cil base diff make clean col name ftp send index post
  1596.   
  1597.   /* PAT is derived from BASE and is the list of all the files to produce */
  1598.   PAT = \
  1599. --- 24,30 ----
  1600.    * used to specify a null expansion pattern, but some of those new smart cpp
  1601.    * now think it's a up-to-end-of-line comment--why do they do that to us?
  1602.    */
  1603. ! BASE = /^^/ cil base diff make clean col name ftp send index post notify snap
  1604.   
  1605.   /* PAT is derived from BASE and is the list of all the files to produce */
  1606.   PAT = \
  1607.  
  1608. *** End of Patch 3 ***
  1609.  
  1610. exit 0 # Just in case...
  1611.