malloy@ittral.UUCP (William P. Malloy) (07/29/85)
I have attempted several times to run the checkgroups script that Gene Spafford posts to net.news.group every month, and always with the same results. It tells me that ALL the newsgroups are invalid. Well I finally had sometime to look at it and discovered that the checkgroups shell script expects a list of the currently valid net wide groups to come from standard input. Looking at the code for inews in the source file control.c, inside c_checkgroups(), I find the lines below assume there is a copy of the prototype article in the temporary file ARTICLE = (/usr/spool/news/.arXXXXXX). However if you are running Larry Walls rn news reading program, and have installed the patches for the Xref: patch, you'll find nothing is written into ARTICLE until AFTER the call on control() occurs inside inews.c. The simplest method around it I found is to use INFILE = (/usr/spool/news/.inXXXXXX) which is a temporary file that holds the body of the article. I'm sure there's a much cleaner fix, but I could care less. The real question is how come no one else ever noticed this before? I suspect no one else runs the checkgroups messages, or just have never installed the Xref: patches (which is too bad because it works rather well). Or it's already been fixed, and I just don't know about it (highly likely). ---- OLD code in c_checkgroups() in control.c sprintf(bfr, "sed '1,/^$/d' %s | %s/checkgroups %s", ARTICLE, LIB, (TELLME && *TELLME) ? TELLME : NEWSUSR); rc = system(bfr); log("system(%s) status %d", bfr, rc); ---- NEW code in c_checkgroups() in control.c sprintf(bfr, "cat %s | %s/checkgroups %s", INFILE, LIB, (TELLME && *TELLME) ? TELLME : NEWSUSR); rc = system(bfr); log("system(%s) status %d", bfr, rc); -- Address: William P. Malloy, ITT Telecom, B & CC Engineering Group, Raleigh NC {ihnp4!mcnc, burl, ncsu, decvax!ittvax}!ittral!malloy
spaf@gatech.CSNET (Gene Spafford) (08/02/85)
I run the "checkgroups" message on both 2.10.2 and 2.10.3 news with the "Xref" code in place and have noticed no problems with it. It runs on Vaxen, Pyramids and a Sun (locally). I would guess that you have either installed the patches incorrectly or missed some protections somewhere. I do hope that you and I aren't the only ones using the "checkgroups" postings.... -- Gene "4 months and counting" Spafford The Clouds Project, School of ICS, Georgia Tech, Atlanta GA 30332 CSNet: Spaf @ GATech ARPA: Spaf%GATech.CSNet @ CSNet-Relay.ARPA uucp: ...!{akgua,allegra,hplabs,ihnp4,linus,seismo,ulysses}!gatech!spaf
lwall@sdcrdcf.UUCP (Larry Wall) (08/02/85)
In article <188@ittral.UUCP> malloy@ittral.UUCP (William P. Malloy) writes: >I have attempted several times to run the checkgroups script... >...It tells me that ALL the newsgroups are invalid.... >..if you are running Larry Walls rn news reading program, and have >installed the patches for the Xref: patch, you'll find nothing is written >into ARTICLE until AFTER the call on control() occurs inside inews.c. > >The real question is how come no one else ever noticed this before? I >suspect no one else runs the checkgroups messages, or just have never >installed the Xref: patches (which is too bad because it works rather >well). Or it's already been fixed, and I just don't know about it (highly >likely). As it happens, your last surmise is correct. It was noted and fixed back when rn version 4.1 was current. Must be about a year ago. A patch was sent out at the time. The Xref patch that came with rn version 4.3 waits until after the article is written before calling control(). Larry Wall {allegra,burdvax,cbosgd,hplabs,ihnp4,sdcsvax}!sdcrdcf!lwall