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

lwall@sdcrdcf.UUCP (Larry Wall) (07/25/86)

System: rn version 4.3
Patch #: 29
Priority: HIGH, if you're running 2.10.3, LOW otherwise
Subject: Xrefs don't work in 2.10.3
From: wan@gatech.UUCP (Peter N. Wan)

Description:
        This patch has already been posted to the net, but I thought I'd
        go ahead and make it official.

        The problem is that rn is ignoring Xref lines because it thinks
        the Xref lines were generated on a different system, due to the
        absence of the Relay-Version header line in news 2.10.3, which
        rn checks against the Xref line to see if it matches.  Got that?

Fix:    Uses the leading component of the Path: line instead to derive the
        system name on which rnews was run.

        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 installing this patch, you'll need to rerun Configure or edit
        config.h (and compile) before Xrefs will work under 2.10.3.

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

Index: Configure
Prereq: 4.3.1.5
*** Configure.old       Thu Jul 24 14:43:46 1986
--- Configure   Thu Jul 24 14:44:05 1986
***************
*** 3,9
  # If these # comments don't work, trim them.  Don't worry about the other
  # shell scripts, Configure will trim # comments from them for you.
  #
! # $Header: Configure,v 4.3.1.5 85/05/23 11:23:22 lwall Exp $
  #
  # $Log:       Configure,v $
  # Revision 4.3.1.5  85/05/23  11:23:22  lwall

--- 3,9 -----
  # If these # comments don't work, trim them.  Don't worry about the other
  # shell scripts, Configure will trim # comments from them for you.
  #
! # $Header: Configure,v 4.3.1.6 86/07/24 14:41:18 lwall Exp $
  #
  # $Log:       Configure,v $
  # Revision 4.3.1.6  86/07/24  14:41:18  lwall
***************
*** 6,11
  # $Header: Configure,v 4.3.1.5 85/05/23 11:23:22 lwall Exp $
  #
  # $Log:       Configure,v $
  # Revision 4.3.1.5  85/05/23  11:23:22  lwall
  # filexp flubs sed command.
  #

--- 6,14 -----
  # $Header: Configure,v 4.3.1.6 86/07/24 14:41:18 lwall Exp $
  #
  # $Log:       Configure,v $
+ # Revision 4.3.1.6  86/07/24  14:41:18  lwall
+ # Handles missing Relay-Version: from news 2.10.3 headers.
+ #
  # Revision 4.3.1.5  85/05/23  11:23:22  lwall
  # filexp flubs sed command.
  #
***************
*** 113,118
  douname=''
  phostname=''
  hostcmd=''
  CONFIG=''
     
  echo "Beginning of configuration questions for rn kit."

--- 116,122 -----
  douname=''
  phostname=''
  hostcmd=''
+ norelay=''
  CONFIG=''
     
  echo "Beginning of configuration questions for rn kit."
***************
*** 1349,1355
      fi
  done
     
! : check for 2.10.2
  echo " "
  if $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
      echo "Looks like you are running at least 2.10.2 news."

--- 1353,1359 -----
      fi
  done
     
! : check for 2.10.2 and above
  echo " "
  if $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
      case "$norelay" in
***************
*** 1352,1357
  : check for 2.10.2
  echo " "
  if $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
      echo "Looks like you are running at least 2.10.2 news."
      mininact=define
  else

--- 1356,1373 -----
  : check for 2.10.2 and above
  echo " "
  if $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
+     case "$norelay" in
+     undef) dflt="n";;
+     *)     dflt="y";;
+     esac
+     $echo $n "Are you running 2.10.3 or above? [${dflt}] $c"
+     . myread
+     case "$ans" in
+     '') ans=$dflt;;
+     esac
+     case "$ans" in
+     n*)
+       norelay='undef'
      echo "Looks like you are running at least 2.10.2 news."
        ;;
      *)  norelay='define' ;;
***************
*** 1353,1358
  echo " "
  if $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
      echo "Looks like you are running at least 2.10.2 news."
      mininact=define
  else
      echo "It doesn't look like you are running 2.10.2 news yet.  Are you planning"

--- 1369,1377 -----
      n*)
        norelay='undef'
      echo "Looks like you are running at least 2.10.2 news."
+       ;;
+     *)  norelay='define' ;;
+     esac
      mininact=define
  else
      echo "It doesn't look like you are running 2.10.2 news yet.  Are you planning"
***************
*** 1362,1367
      n*) mininact=undef ;;
      *)  mininact=define ;;
      esac
  fi
     
     

--- 1381,1387 -----
      n*) mininact=undef ;;
      *)  mininact=define ;;
      esac
+     norelay='undef'
  fi
     
     
***************
*** 1818,1823
  douname='$douname'
  phostname='$phostname'
  hostcmd='$hostcmd'
  CONFIG=true
  EOT
     

--- 1838,1844 -----
  douname='$douname'
  phostname='$phostname'
  hostcmd='$hostcmd'
+ norelay='$norelay'
  CONFIG=true
  EOT
     
***************
*** 1904,1909
  #$gethostname GETHOSTNAME     /* do we have a gethostname function? */
  #$douname     DOUNAME         /* do we have a uname function? */
  #$phostname   PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  EOT
     
  CONFIG=true

--- 1925,1931 -----
  #$gethostname GETHOSTNAME     /* do we have a gethostname function? */
  #$douname     DOUNAME         /* do we have a uname function? */
  #$phostname   PHOSTNAME "$hostcmd"    /* how to get host name with popen */
+ #$norelay     NORELAY         /* 2.10.3 doesn't have Relay-Version line */
  EOT
     
  CONFIG=true

Index: bits.c
Prereq: 4.3
*** bits.c.old  Thu Jul 24 14:43:08 1986
--- bits.c      Thu Jul 24 14:43:12 1986
***************
*** 1,4
! /* $Header: bits.c,v 4.3 85/05/01 11:36:15 lwall Exp $
   *
   * $Log:      bits.c,v $
   * Revision 4.3  85/05/01  11:36:15  lwall

--- 1,4 -----
! /* $Header: bits.c,v 4.3.1.2 86/07/24 14:40:23 lwall Exp $
   *
   * $Log:      bits.c,v $
   * Revision 4.3.1.2  86/07/24  14:40:23  lwall
***************
*** 1,6
  /* $Header: bits.c,v 4.3 85/05/01 11:36:15 lwall Exp $
   *
   * $Log:      bits.c,v $
   * Revision 4.3  85/05/01  11:36:15  lwall
   * Baseline for release with 4.3bsd.
   *

--- 1,12 -----
  /* $Header: bits.c,v 4.3.1.2 86/07/24 14:40:23 lwall Exp $
   *
   * $Log:      bits.c,v $
+  * Revision 4.3.1.2  86/07/24  14:40:23  lwall
+  * Gets host name from path instead of relay-version for news 2.10.3.
+  *
+  * Revision 4.3.1.1  85/05/10  11:31:41  lwall
+  * Branch for patches.
+  *
   * Revision 4.3  85/05/01  11:36:15  lwall
   * Baseline for release with 4.3bsd.
   *
***************
*** 391,396
     
            if (inews_site != Nullch)
                free(inews_site);
            rver_buf = fetchlines(artnum,RVER_LINE);
            if ((t = instr(rver_buf,"; site ")) == Nullch)
                inews_site = savestr(nullstr);

--- 397,403 -----
     
            if (inews_site != Nullch)
                free(inews_site);
+ #ifndef NORELAY
            rver_buf = fetchlines(artnum,RVER_LINE);
            if ((t = instr(rver_buf,"; site ")) == Nullch)
  #else NORELAY
***************
*** 393,398
                free(inews_site);
            rver_buf = fetchlines(artnum,RVER_LINE);
            if ((t = instr(rver_buf,"; site ")) == Nullch)
                inews_site = savestr(nullstr);
            else {
                char new_site[128];

--- 400,417 -----
  #ifndef NORELAY
            rver_buf = fetchlines(artnum,RVER_LINE);
            if ((t = instr(rver_buf,"; site ")) == Nullch)
+ #else NORELAY
+
+           /* In version 2.10.3 of news or afterwards, the Relay-Version
+            * and Posting-Version header lines have been removed.  For
+            * the code below to work as intended, I have modified it to
+            * extract the first component of the Path header line.  This
+            * should give the same effect as did the old code with respect
+            * to the use of the Relay-Version site name.
+            */
+           rver_buf = fetchlines(artnum,PATH_LINE);
+           if ((t = instr(rver_buf,"!")) == Nullch)
+ #endif NORELAY
                inews_site = savestr(nullstr);
            else {
                char new_site[128];
***************
*** 397,402
            else {
                char new_site[128];
     
                cpytill(new_site,t + 7,'.');
                inews_site = savestr(new_site);
            }

--- 416,422 -----
            else {
                char new_site[128];
     
+ #ifndef NORELAY
                cpytill(new_site,t + 7,'.');
  #else NORELAY
                cpytill(new_site,rver_buf,'!');
***************
*** 398,403
                char new_site[128];
     
                cpytill(new_site,t + 7,'.');
                inews_site = savestr(new_site);
            }
            if (strNE(tmpbuf,inews_site)) {

--- 418,426 -----
     
  #ifndef NORELAY
                cpytill(new_site,t + 7,'.');
+ #else NORELAY
+               cpytill(new_site,rver_buf,'!');
+ #endif NORELAY
                inews_site = savestr(new_site);
            }
            if (strNE(tmpbuf,inews_site)) {

stephen@comp.lancs.ac.uk (Stephen J. Muir) (07/29/86)

This patch fails because all the tabs have been converted to spaces.  The
offending site is one of the following:

	topaz
	decvax
	bellcore
	ulysses
	cbosgd
	ukma
	psuvm.bitnet
	psuvax1
	burdvax
-- 
EMAIL:	stephen@comp.lancs.ac.uk	| Post: University of Lancaster,
UUCP:	...!mcvax!ukc!dcl-cs!stephen	|	Department of Computing,
Phone:	+44 524 65201 Ext. 4120		|	Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution	|	LA1 4YR

jbuck@epimass.UUCP (Joe Buck) (08/02/86)

In article <316@comp.lancs.ac.uk> stephen@comp.lancs.ac.uk (Stephen J. Muir) writes:
>This patch fails because all the tabs have been converted to spaces. 

The patch program has a -l (for "loose" ?) flag that considers all
sequences of white space to be the same.  Try "patch -l" to apply
this patch.
-- 
- Joe Buck 	{ihnp4!pesnta,oliveb,nsc!csi}!epimass!jbuck
  Entropic Processing, Inc., Cupertino, California

brown@nicmad.UUCP (08/03/86)

In article <349@epimass.UUCP> jbuck@epimass.UUCP (Joe Buck) writes:
>In article <316@comp.lancs.ac.uk> stephen@comp.lancs.ac.uk (Stephen J. Muir) writes:
>>This patch fails because all the tabs have been converted to spaces. 
>
>The patch program has a -l (for "loose" ?) flag that considers all
>sequences of white space to be the same.  Try "patch -l" to apply
>this patch.

Thanks for the info.  The -l option worked just great.  As they say,
when all else fails: RTFM.
-- 

		  ihnp4------\
		harvard-\     \
Mr. Video	   seismo!uwvax!nicmad!brown
		  topaz-/     /
		 decvax------/

stephen@comp.lancs.ac.uk (Stephen J. Muir) (08/04/86)

In article <349@epimass.UUCP> jbuck@epimass.UUCP (Joe Buck) writes:
>In article <316@comp.lancs.ac.uk> stephen@comp.lancs.ac.uk (Stephen J. Muir) writes:
>>This patch fails because all the tabs have been converted to spaces. 

>The patch program has a -l (for "loose" ?) flag that considers all
>sequences of white space to be the same.  Try "patch -l" to apply
>this patch.

That's all fine and dandy, but it avoids the real issue that NO SITE SHOULD BE
CONVERTING TABS TO SPACES.  Furthermore, appliying this patch as you suggest
may cause subsequent patches to fail as the new lines will not match the lines
in future patches.

P.S.  Site "topaz" has since been found not guilty.  Could I ask the news
administrators of the remaining sites to check and take remedial action if
necessary.
-- 
EMAIL:	stephen@comp.lancs.ac.uk	| Post: University of Lancaster,
UUCP:	...!mcvax!ukc!dcl-cs!stephen	|	Department of Computing,
Phone:	+44 524 65201 Ext. 4120		|	Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution	|	LA1 4YR

david@ukma.UUCP (David Herron, NPR Lover) (08/05/86)

In article <316@comp.lancs.ac.uk> stephen@comp.lancs.ac.uk (Stephen J. Muir) writes:
>This patch fails because all the tabs have been converted to spaces.  The
>offending site is one of the following:
>
> ...
>        cbosgd
>        ukma
>        psuvm.bitnet
>        psuvax1
>        burdvax

Sigh.  The fault is somewhere along the path of psuvax1->psuvm.bitnet->ukma,
depending on your religious tendancies.

What happens is that our news is fed via BITNET from psuvm.bitnet (they're
an IBM 308x and don't even run anything like Unix there, news there is a
bunch of REXX programs and all that IBMish garbage).  Anyway they don't know
what tabs or form-feeds are and both get translated into tabs or blank
lines as appropriate.

From here we feed some articles (those posted "within" 9 sites "away"
from ukma) to cbosgd.  The theory is to get locally posted articles
fed back through the net in two directions.  But this also catches
some articles which are posted "near" to psuvm.bitnet.  Some of these
articles will make it through cbosgd.

I don't really like the situation as-is but this is the cheapest way
to handle the dual needs of cheap news and getting our own articles
out quickly.  The only way to improve it is to have our main feed
be from a Unix machine through BITNET (instead of an IBM mainframe(!)
as it is now).

Anybody care to give us a feed??????


-- 
David Herron,  cbosgd!ukma!david, david@UKMA.BITNET, david@uky.csnet

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

In article <316@comp.lancs.ac.uk> stephen@comp.lancs.ac.uk (Stephen J. Muir) writes:
>This patch fails because all the tabs have been converted to spaces.  The
>offending site is one of the following:
>
>	topaz
>	decvax
>	bellcore
>	ulysses
>	cbosgd
>	ukma
>	psuvm.bitnet
>	psuvax1
>	burdvax

From doing a bit of analysis on the articles at my site, I'd venture to
guess that the problem is either at ukma, or in the link between ukma and
psuvm.bitnet.  All the sites above successfully relayed an article containing
tabs to my system except ukma, which I don't have enough data to pin it on,
but I found several articles that might have had tabs that didn't.  Note
that both psuvm.bitnet and ukma are on bitnet, meaning there is likely an
ascii to ebcdic translation in there somewhere.  I suspect this translation
is translating the tabs to spaces since tab is problematical in ebcdic.

Larry Wall
{allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall

herbie@polaris.UUCP (08/09/86)

In article <2933@sdcrdcf.UUCP> lwall@sdcrdcf.UUCP (Larry Wall) writes:
>From doing a bit of analysis on the articles at my site, I'd venture to
>guess that the problem is either at ukma, or in the link between ukma and
>psuvm.bitnet.  All the sites above successfully relayed an article containing
>tabs to my system except ukma, which I don't have enough data to pin it on,
>but I found several articles that might have had tabs that didn't.  Note
>that both psuvm.bitnet and ukma are on bitnet, meaning there is likely an
>ascii to ebcdic translation in there somewhere.  I suspect this translation
>is translating the tabs to spaces since tab is problematical in ebcdic.

psuvax1 uses UREP to emulate the RSCS protocols necessary to talk to
the rest of BITNET and i assume ukma does too.  one of the things done
by UREP that sometimes gets in the way is that all mail messages have
their tabs expanded to blanks.  i presume that psuvax1 forwards news to
ukma using the BITNET mail protocol and therefore undergoes the tab
expansion since a standard news article is supposed to be compatible
with the RFC 822 mail standard.  there are ways around this but it
assumes that both parties at psuvax1 and ukma get together and decide
to modify how they send news to each other slightly.

Herb Chong, IBM Research...

I'm still user-friendly -- I don't byte, I nybble....

VNET,BITNET,NETNORTH,EARN: HERBIE AT YKTVMH
UUCP:  {allegra|cbosgd|cmcl2|decvax|ihnp4|seismo}!philabs!polaris!herbie
CSNET: herbie%ibm.com@csnet-relay
ARPA:  herbie@ibm.com, herbie%yktvmh.bitnet@wiscvm.wisc.edu
========================================================================
DISCLAIMER:  what you just read was produced by pouring lukewarm
tea for 42 seconds onto 9 people chained to 6 Ouiji boards.