kec@csc.canberra.edu.au (Katarina Christenson) (10/03/90)
I got a copy of trn from urth.acsu.buffalo.edu. It came with a set of patches in a file called trn.patch1. Now, the problem is,that I cannot figure out how to apply these patches. I have tried the patch program in the form patch < trn.patch1 but all I get is Hmm... I can't seem to find a patch in there anywhere. The patch file looks like this Index: patchlevel Prereq: v1.0 @@ -1,1 +1,1 @@ -Trn v1.0 +Trn v1.0.1 Index: Configure @@ -4,7 +4,10 @@ =# shell scripts, Configure will trim # comments from them for you. =# -# $Header: Configure,v 4.3.3.1 90/07/24 21:56:31 davison Trn $ +# $Header: Configure,v 4.3.3.2 90/08/20 16:09:59 davison Trn $ . .etc Could somebody tell me how this patch file was generated and, more to the point, how to apply it. It does not seem to be one of the standard diff output formats. Any help greatly appreciated. Katarina kec@csc.canberra.edu.au - Katarina Christenson, University of Canberra CSC
davison@dri.com (Wayne Davison) (10/05/90)
Katarina Christenson (kec@csc.canberra.edu.au) wrote: > I got a copy of trn from urth.acsu.buffalo.edu. It came with a set of > patches in a file called trn.patch1. [...] The patch file looks like this > Index: patchlevel > Prereq: v1.0 > @@ -1,1 +1,1 @@ > -Trn v1.0 > +Trn v1.0.1 The problem is that the folks at "urth" have made an incomplete version of patch1 available for download. The official patch was a shar file of both "unipatch.c" and "patch1". It was preceded by some important text for the folks who were already running the initial release of trn. I will include the missing text and the patch translator (unipatch.c) to get you started, but someone needs to tell "urth" that the patch file needs to be replaced. I'll send mail to the postmaster there to try to get in touch with them. \ /| / /|\/ /| /(_) (_)/ |/ /\|/ / |/ \ (W A Y N e) ----8<------8<------8<------8<-----cut here----->8------>8------>8------>8---- This is official patch #1 for trn v1.0. It is a shar archive of the files unipatch.c and patch1. To extract it from trn type "e DIR" where DIR is the directory of your trn source, or extract it will a de-shar'ing tool. To apply the patch, compile the program unipatch.c with the command "cc -o unipatch unipatch.c" and patch the source with the command "unipatch <patch1 | patch". ** After patching, check Configure to ensure that WHITE and CTRLA (near the top) have a Tab-Space and a Ctrl-A in them, respectively. ** This patch will generate trn v1.0.1, which has the following changes: o Two structures in the thread database have been padded to provide a more portable database format. The first time you run the new mthreads, it will detect the old database version number (in the db.init file), write a new db.init file, and re-generate all the thread files. This will undoubtedly take more time than a regular update. If you are really adventurous (or KNOW that your machine is the kind that pads a 10-byte structure to be 12 bytes), you could remove the db.init file before running the new mthreads, and thus trick mthreads into skipping the database rebuild. If you guess wrong, you'll need to manually remove all the thread files before running a "mthreads -f" to fix it. o Mthreads' user interface has been significantly enhanced. The command-line hierarchy has been modified to specify one or more groups to enable or disable thread processing for, which should eliminate the need for manual editing of the active2 file. For example, running the command: mthreads comp,talk,!control would turn on processing for the comp and talk hierarchies, and turn off thread processing for control. Mthreads automatically adds and removes thread files as needed. New command-line options include: -k (kill running mthreads process), -n (no thread process- ing, just turn groups on and off), -a automatically thread new groups, and -D debug mode. See the new mthreads manpage for more details. o Configure and mbox.saver.SH have been enhanced to deal with the MMDF mailbox format (message separator is ^A^A^A^A). Pnews and Rnmail have been changed to use the mbox.saver instead of assuming unix-format messages. o Configure does a better job of determining signal()'s return and tries harder to figure out if tzset() is available. o Added a new Configuration option to read the site name from a file. This will aid sites that wish to use host hiding to route all their mail through one host address. o Fixed a bug in the article opening routine when running trrn and attempting to open article #0 (an empty node). o Changed mthreads to output '#' instead of '+' to avoid disconnecting Hayes-compatible modems. o Fixed a problem in the handling of xrefs that point to groups that haven't yet been processed by mthreads. o Fixed the backpager to backup over ^L's in articles. o Reverted the default command for non-threaded groups to 'y' instead of '='. o Added a warning message to trn when it can't find the db.init file. o Added a check for interrupt in the new-newsgroup handling code that will allow you to break out of the prompts. o Tweaked the byte-order determining code to work around dumb optimizers. o Changed my address to our newly-registered domain. Thanks for all the bug-reports/fixes/praise/etc! I appreciate the input. Enjoy! -- \ /| / /|\/ /| /(_) Wayne Davison (_)/ |/ /\|/ / |/ \ davison@dri.com <<-- new domain name! (W A Y N e) ...!uunet!drivax!davison #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # unipatch.c # This archive created: Sun Aug 19 20:28:33 1990 # By: Wayne Davison (Digital Research, Monterey CA) export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'unipatch.c'" '(1358 characters)' if test -f 'unipatch.c' then echo shar: "will not over-write existing file 'unipatch.c'" else cat << \SHAR_EOF > 'unipatch.c' /* A filter to turn a unidiff into a degenerate context diff (no '!'s) for patch. Author: davison@dri.com (uunet!drivax!davison). */ #include <stdio.h> #define ERR(a) {fputs(a,stderr);exit(1);} struct Ln { struct Ln *lk; char t; char s[1]; } r,*h,*ln; char *malloc(); main() { char bf[2048],*cp,ch; long os,ol,ns,nl,ne,lncnt=0; for(;;){ for(;;){ if(!fgets(bf,sizeof bf,stdin)) exit(0); lncnt++; if(!strncmp(bf,"@@ -",4)) break; fputs(bf,stdout); } if(sscanf(bf+4,"%ld,%ld +%ld,%ld %c",&os,&ol,&ns,&nl,&ch)!=5||ch!='@') goto bad; r.lk=0, h= &r, ne=ns+nl-1; printf("***************\n*** %ld,%ld ****\n",os,os+ol-(os>0)); while(ol||nl){ if(!fgets(bf,sizeof bf,stdin)){ if(nl>2) ERR("Unexpected end of file.\n"); strcpy(bf," \n"); } lncnt++; if(*bf=='\t'||*bf=='\n') ch=' ', cp=bf; else ch= *bf, cp=bf+1; switch(ch){ case'-':if(!ol--) goto bad; printf("- %s",cp); break; case'=':ch=' '; case' ':if(!ol--) goto bad; printf(" %s",cp); case'+':if(!nl--) goto bad; ln = (struct Ln*)malloc(sizeof(*ln)+strlen(cp)); if(!ln) ERR("Out of memory!\n"); ln->lk=0, ln->t=ch, strcpy(ln->s,cp); h->lk=ln, h=ln; break; default: bad: fprintf(stderr,"Malformed unidiff at line %ld: ",lncnt); ERR(bf); } } printf("--- %ld,%ld ----\n",ns,ne); for(ln=r.lk;ln;ln=h){ printf("%c %s",ln->t,ln->s); h=ln->lk; free(ln); } } } SHAR_EOF fi exit 0 # End of shell archive ----8<------8<------8<------8<-----the end------>8------>8------>8------>8----
pjg@acsu.buffalo.edu (Paul Graham) (10/05/90)
kec@csc.canberra.edu.au (Katarina Christenson) writes: |I got a copy of trn from urth.acsu.buffalo.edu. It came with a set of |patches in a file called trn.patch1. Now, the problem is,that I cannot |figure out how to apply these patches. I have tried the patch program |in the form feh. terribly sorry about that. the current file is the output of the first step and is ready for input to patch. it's not the original though for those who want the pristine version. -- pjg@acsu.buffalo.edu / rutgers!ub!pjg / pjg@ubvms