[net.news.b] rn 4.3 patch #30

lwall@sdcrdcf.UUCP (Larry Wall) (09/06/86)

System: rn version 4.3
Patch #: 30
Priority: HIGH
Subject: changes for compatibility with newsgroup renaming
From: rick@seismo.CSS.GOV (Rick Adams) and others

Description:
	rn checks for the presence of the directory for net.announce.
	It will not run otherwise. net.announce is no longer a valid
	group, so if you removed net.announce, rn stopped working.

	Pnews has various dependencies on net.*.  So does newsetup.

Fix:	Remove the test for net.announce from rn.  Handle the new top-level
	newsgroups (comp.*, news.*, sci.*, rec.*, misc.*, soc.* and talk.*)
	like net.* and mod.*.

	From rn, say "| patch -d DIR", where DIR is your rn source directory.
	Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
	the patch program, apply the following by hand, or get patch.

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	After applying the patches, do a make and a make install.

Index: patchlevel
Prereq: 29
1c1
< Patch #: 29
---
> Patch #: 30

Index: Pnews.SH
Prereq: 4.3.1.3
*** Pnews.SH.old	Fri Sep  5 15:41:50 1986
--- Pnews.SH	Fri Sep  5 15:41:55 1986
***************
*** 4,10
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Header: Pnews.SH,v 4.3.1.3 85/08/01 14:24:06 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.3.1.3  85/08/01  14:24:06  lwall

--- 4,10 -----
  echo "Extracting Pnews (with variable substitutions)"
  $spitshell >Pnews <<!GROK!THIS!
  $startsh
! # $Header: Pnews.SH,v 4.3.1.4 86/09/05 15:21:10 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.3.1.4  86/09/05  15:21:10  lwall
***************
*** 7,12
  # $Header: Pnews.SH,v 4.3.1.3 85/08/01 14:24:06 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
  # Revision 4.3.1.3  85/08/01  14:24:06  lwall
  # Added AUTHORCOPY.  Temp file is no longer in /tmp.  'e editor' added.
  # 

--- 7,15 -----
  # $Header: Pnews.SH,v 4.3.1.4 86/09/05 15:21:10 lwall Exp $
  #
  # $Log:	Pnews.SH,v $
+ # Revision 4.3.1.4  86/09/05  15:21:10  lwall
+ # Changes for new top-level newsgroup names.
+ # 
  # Revision 4.3.1.3  85/08/01  14:24:06  lwall
  # Added AUTHORCOPY.  Temp file is no longer in /tmp.  'e editor' added.
  # 
***************
*** 99,105
  help.
  
  If you've never posted an article to the net before, it is HIGHLY recommended
! that you read the netiquette document found in net.announce.newusers so
  that you'll know to avoid the commonest blunders.  To do that, interrupt
  Pnews, and get to the top-level prompt of rn.  Say "g net.announce.newusers"
  and you are on your way.

--- 102,108 -----
  help.
  
  If you've never posted an article to the net before, it is HIGHLY recommended
! that you read the netiquette document found in mod.announce.newusers so
  that you'll know to avoid the commonest blunders.  To do that, interrupt
  Pnews, and get to the top-level prompt of rn.  Say "g mod.announce.newusers"
  and you are on your way.
***************
*** 101,107
  If you've never posted an article to the net before, it is HIGHLY recommended
  that you read the netiquette document found in net.announce.newusers so
  that you'll know to avoid the commonest blunders.  To do that, interrupt
! Pnews, and get to the top-level prompt of rn.  Say "g net.announce.newusers"
  and you are on your way.
  
  EOM

--- 104,110 -----
  If you've never posted an article to the net before, it is HIGHLY recommended
  that you read the netiquette document found in mod.announce.newusers so
  that you'll know to avoid the commonest blunders.  To do that, interrupt
! Pnews, and get to the top-level prompt of rn.  Say "g mod.announce.newusers"
  and you are on your way.
  
  EOM
***************
*** 156,162
      shift
      case $# in
      0|1)
! 	set "x net.whatever"
  	;;
      esac
      ;;

--- 159,165 -----
      shift
      case $# in
      0|1)
! 	set "x misc.whatever"
  	;;
      esac
      ;;
***************
*** 182,189
  
  # tell them what we think they are doing... !DIST!
  case $1 in
! net.*)
!     $echo 'This program posts news to many hundreds of machines throughout the world.'
      ;;
  $cont.*)
      $echo 'This program posts news to many machines throughout the continent.'

--- 185,197 -----
  
  # tell them what we think they are doing... !DIST!
  case $1 in
! net.*|world.*|comp.*|news.*|sci.*|rec.*|misc.*|soc.*|talk.*|mod.*)
!     $cat <<'EOM'
! This program posts news to thousands of machines throughout the entire
! civilized world.  You message will cost the net hundreds if not thousands of
! dollars to send everywhere.  Please be sure you know what you are doing.
! 
! EOM
      ;;
  $cont.*)
      $echo 'This program posts news to many machines throughout the continent.'
***************
*** 434,440
  	case "${AUTHORCOPY-none}" in
  	none)
  	    ;;
! 	*)  if $cat $tmpart >> $AUTHORCOPY; then
  		$echo "Article appended to $AUTHORCOPY"
  		$echo "" >> $AUTHORCOPY
  		$echo "" >> $AUTHORCOPY

--- 442,449 -----
  	case "${AUTHORCOPY-none}" in
  	none)
  	    ;;
! 	*)  if $echo From $USER `date` >> $AUTHORCOPY; then
! 		$cat $tmpart >> $AUTHORCOPY
  		$echo "Article appended to $AUTHORCOPY"
  		$echo "" >> $AUTHORCOPY
  		$echo "" >> $AUTHORCOPY
***************
*** 484,491
      ;;
  esac
  case $ng in
! net.*|fa.*|mod.*)
!     defdist=net
      dist=h
      ;;
  *.*)

--- 493,500 -----
      ;;
  esac
  case $ng in
! net.*|mod.*|comp.*|news.*|sci.*|rec.*|misc.*|soc.*|talk.*)
!     defdist=world
      dist=h
      ;;
  *.*)
***************
*** 503,508
  	$echo " "
  	$echo "Your local distribution prefixes are:"
  	$cat $lib/distributions
      else
  	$egrep -v '[	 ]none$' <<EOM
  

--- 512,518 -----
  	$echo " "
  	$echo "Your local distribution prefixes are:"
  	$cat $lib/distributions
+ 	$echo " "
      else
  	$egrep -v '[	 ]none$' <<EOM
  
***************
*** 513,519
      $stpr:  		$state
      Country:		$cntry
      Continent:		$cont
!     Everywhere:		net,mod,fa
  
  EOM
      fi

--- 523,529 -----
      $stpr:  		$state
      Country:		$cntry
      Continent:		$cont
!     Everywhere:		world
  
  EOM
      fi
***************
*** 528,534
  
  The Distribution line may be used to limit the distribution of an article
  to some subset of the systems that would receive the article based only on
! the Newsgroups line.  For example, if you want to sell your car in net.auto,
  and you live in New Jersey, you might want to put "nj" on the Distribution
  line to avoid advertising in California, which has enough problems of its own.
  The actual area designators to use depend on where you are, of course.

--- 538,544 -----
  
  The Distribution line may be used to limit the distribution of an article
  to some subset of the systems that would receive the article based only on
! the Newsgroups line.  For example, if you want to sell your car in talk.auto,
  and you live in New Jersey, you might want to put "nj" on the Distribution
  line to avoid advertising in California, which has enough problems of its own.
  The actual area designators to use depend on where you are, of course.
***************
*** 534,540
  The actual area designators to use depend on where you are, of course.
  EOH
  	;;
!     ''|$loc*|$org*|$city*|$state*|$cntry*|$cont*|fa*|mod*)
  	;;
      net*|world*)
  	dist=''

--- 544,550 -----
  The actual area designators to use depend on where you are, of course.
  EOH
  	;;
!     ''|$loc*|$org*|$city*|$state*|$cntry*|$cont*|$defdist)
  	;;
      net*|world*|comp*|news*|sci*|rec*|misc*|soc*|talk*)
  	dist=''
***************
*** 536,542
  	;;
      ''|$loc*|$org*|$city*|$state*|$cntry*|$cont*|fa*|mod*)
  	;;
!     net*|world*)
  	dist=''
  	;;
      *)  

--- 546,552 -----
  	;;
      ''|$loc*|$org*|$city*|$state*|$cntry*|$cont*|$defdist)
  	;;
!     net*|world*|comp*|news*|sci*|rec*|misc*|soc*|talk*)
  	dist=''
  	;;
      *)  
***************
*** 545,551
  	  $test -s $tmpart; then
  	    : null
  	else
! 	    $echo "Unrecognized distribution prefix--type h for help."
  	    dist=h
  	fi
  	;;

--- 555,562 -----
  	  $test -s $tmpart; then
  	    : null
  	else
! 	    $echo "Unrecognized distribution prefix--type h for help, CR to use anyway."
! 	    defdist=$dist
  	    dist=h
  	fi
  	;;

Index: init.c
Prereq: 4.3.1.3
*** init.c.old	Fri Sep  5 14:25:01 1986
--- init.c	Fri Sep  5 14:25:07 1986
***************
*** 1,4
! /* $Header: init.c,v 4.3.1.3 85/07/23 18:08:36 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.3.1.3  85/07/23  18:08:36  lwall

--- 1,4 -----
! /* $Header: init.c,v 4.3.1.4 86/09/05 14:24:02 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.3.1.4  86/09/05  14:24:02  lwall
***************
*** 1,6
  /* $Header: init.c,v 4.3.1.3 85/07/23 18:08:36 lwall Exp $
   *
   * $Log:	init.c,v $
   * Revision 4.3.1.3  85/07/23  18:08:36  lwall
   * Fixed up NOLINEBUF option to work.
   * 

--- 1,9 -----
  /* $Header: init.c,v 4.3.1.4 86/09/05 14:24:02 lwall Exp $
   *
   * $Log:	init.c,v $
+  * Revision 4.3.1.4  86/09/05  14:24:02  lwall
+  * Removed net.announce dependency.
+  * 
   * Revision 4.3.1.3  85/07/23  18:08:36  lwall
   * Fixed up NOLINEBUF option to work.
   * 
***************
*** 111,121
  
      free(tcbuf);			/* recover 1024 bytes */
  
-     /* make sure we are the right version */
- 
-     if (!checkflag)
- 	version_check();
- 
      /* make sure we are the sole possessors of .newsrc */
  
      if (!checkflag)

--- 114,119 -----
  
      free(tcbuf);			/* recover 1024 bytes */
  
      /* make sure we are the sole possessors of .newsrc */
  
      if (!checkflag)
***************
*** 308,330
  	    putchar('\n') FLUSH;
  	}
  	fclose(tmpfp);
-     }
- }
- 
- void
- version_check()
- {
-     set_ngname("net.announce");
-     if (access(ngdir,0)) {
- #ifdef VERBOSE
- 	IF(verbose)
- 	    fputs("Can't find net.announce.  Wrong news version?\n",stdout)
- 	      FLUSH;
- 	ELSE
- #endif
- #ifdef TERSE
- 	    fputs("Wrong version?\n",stdout) FLUSH;
- #endif
- 	finalize(1);
      }
  }

--- 306,310 -----
  	    putchar('\n') FLUSH;
  	}
  	fclose(tmpfp);
      }
  }

Index: newsetup.SH
Prereq: 4.3
*** newsetup.SH.old	Fri Sep  5 15:41:33 1986
--- newsetup.SH	Fri Sep  5 15:41:35 1986
***************
*** 4,10
  echo "Extracting newsetup (with variable substitutions)"
  $spitshell >newsetup <<!GROK!THIS!
  $startsh
! # $Header: newsetup.SH,v 4.3 85/05/01 11:43:05 lwall Exp $
  # 
  # $Log:	newsetup.SH,v $
  # Revision 4.3  85/05/01  11:43:05  lwall

--- 4,10 -----
  echo "Extracting newsetup (with variable substitutions)"
  $spitshell >newsetup <<!GROK!THIS!
  $startsh
! # $Header: newsetup.SH,v 4.3.1.2 86/09/05 15:41:04 lwall Exp $
  # 
  # $Log:	newsetup.SH,v $
  # Revision 4.3.1.2  86/09/05  15:41:04  lwall
***************
*** 7,12
  # $Header: newsetup.SH,v 4.3 85/05/01 11:43:05 lwall Exp $
  # 
  # $Log:	newsetup.SH,v $
  # Revision 4.3  85/05/01  11:43:05  lwall
  # Baseline for release with 4.3bsd.
  # 

--- 7,18 -----
  # $Header: newsetup.SH,v 4.3.1.2 86/09/05 15:41:04 lwall Exp $
  # 
  # $Log:	newsetup.SH,v $
+ # Revision 4.3.1.2  86/09/05  15:41:04  lwall
+ # Changes for newsgroup renaming.
+ # 
+ # Revision 4.3.1.1  85/05/10  11:35:43  lwall
+ # Branch for patches.
+ # 
  # Revision 4.3  85/05/01  11:43:05  lwall
  # Baseline for release with 4.3bsd.
  # 
***************
*** 94,99
  	-e "  w /tmp/n.to\$\$"		\\
  	-e '  d'			\\
  	-e '}'				\\
  	-e "/\./{"			\\
  	-e "  w /tmp/n.misc\$\$"	\\
  	-e '  d'			\\

--- 100,129 -----
  	-e "  w /tmp/n.to\$\$"		\\
  	-e '  d'			\\
  	-e '}'				\\
+ 	-e "/^comp\./{"			\\
+ 	-e "  w /tmp/n.comp\$\$"	\\
+ 	-e '  d'			\\
+ 	-e '}'				\\
+ 	-e "/^news\./{"			\\
+ 	-e "  w /tmp/n.news\$\$"	\\
+ 	-e '  d'			\\
+ 	-e '}'				\\
+ 	-e "/^rec\./{"			\\
+ 	-e "  w /tmp/n.rec\$\$"		\\
+ 	-e '  d'			\\
+ 	-e '}'				\\
+ 	-e "/^sci\./{"			\\
+ 	-e "  w /tmp/n.sci\$\$"		\\
+ 	-e '  d'			\\
+ 	-e '}'				\\
+ 	-e "/^soc\./{"			\\
+ 	-e "  w /tmp/n.soc\$\$"		\\
+ 	-e '  d'			\\
+ 	-e '}'				\\
+ 	-e "/^talk\./{"			\\
+ 	-e "  w /tmp/n.talk\$\$"	\\
+ 	-e '  d'			\\
+ 	-e '}'				\\
  	-e "/\./{"			\\
  	-e "  w /tmp/n.misc\$\$"	\\
  	-e '  d'			\\
***************
*** 115,120
      /tmp/n.\$cntry\$\$ \\
      /tmp/n.\$cont\$\$ \\
      /tmp/n.mod\$\$ \\
      /tmp/n.net\$\$ \\
      /tmp/n.fa\$\$ \\
      /tmp/n.misc\$\$ \\

--- 145,157 -----
      /tmp/n.\$cntry\$\$ \\
      /tmp/n.\$cont\$\$ \\
      /tmp/n.mod\$\$ \\
+     /tmp/n.news\$\$ \\
+     /tmp/n.comp\$\$ \\
+     /tmp/n.sci\$\$ \\
+     /tmp/n.rec\$\$ \\
+     /tmp/n.soc\$\$ \\
+     /tmp/n.misc\$\$ \\
+     /tmp/n.talk\$\$ \\
      /tmp/n.net\$\$ \\
      /tmp/n.fa\$\$ \\
      /tmp/n.test\$\$ \\
***************
*** 117,123
      /tmp/n.mod\$\$ \\
      /tmp/n.net\$\$ \\
      /tmp/n.fa\$\$ \\
-     /tmp/n.misc\$\$ \\
      /tmp/n.test\$\$ \\
  | $uniq >\$dotdir/.newsrc
  

--- 154,159 -----
      /tmp/n.talk\$\$ \\
      /tmp/n.net\$\$ \\
      /tmp/n.fa\$\$ \\
      /tmp/n.test\$\$ \\
  | $uniq >\$dotdir/.newsrc
  
***************
*** 131,136
  	/tmp/n.\$cntry\$\$ \\
  	/tmp/n.\$cont\$\$ \\
  	/tmp/n.mod\$\$ \\
  	/tmp/n.net\$\$ \\
  	/tmp/n.fa\$\$ \\
  	/tmp/n.misc\$\$ \\

--- 167,178 -----
  	/tmp/n.\$cntry\$\$ \\
  	/tmp/n.\$cont\$\$ \\
  	/tmp/n.mod\$\$ \\
+ 	/tmp/n.news\$\$ \\
+ 	/tmp/n.comp\$\$ \\
+ 	/tmp/n.sci\$\$ \\
+ 	/tmp/n.soc\$\$ \\
+ 	/tmp/n.rec\$\$ \\
+ 	/tmp/n.talk\$\$ \\
  	/tmp/n.net\$\$ \\
  	/tmp/n.fa\$\$ \\
  	/tmp/n.misc\$\$ \\
***************
*** 140,146
  Done.
  
  If you have never used the news system before, you may find the articles
! in net.announce.newuser to be helpful.  There is also a manual entry for rn.
  
  To get rid of newsgroups you aren't interested in, use the 'u' command.
  Type h for help at any time while running rn.

--- 182,188 -----
  Done.
  
  If you have never used the news system before, you may find the articles
! in mod.announce.newuser to be helpful.  There is also a manual entry for rn.
  
  To get rid of newsgroups you aren't interested in, use the 'u' command.
  Type h for help at any time while running rn.