From doconnor@gsoft.com.au  Sun Feb 22 17:55:18 1998
Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA23390
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 Feb 1998 17:55:13 -0800 (PST)
          (envelope-from doconnor@gsoft.com.au)
Received: (from doconnor@localhost) by cain.gsoft.com.au (8.8.8/8.6.9) id MAA05393; Mon, 23 Feb 1998 12:25:07 +1030 (CST)
Message-Id: <199802230155.MAA05393@cain.gsoft.com.au>
Date: Mon, 23 Feb 1998 12:25:07 +1030 (CST)
From: "Daniel O'Connor" <doconnor@gsoft.com.au>
Reply-To: doconnor@gsoft.com.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: Swish-e port
X-Send-Pr-Version: 3.2

>Number:         5821
>Category:       ports
>Synopsis:       New port: Swish-E, a Web site indexer
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    billf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 22 18:00:04 PST 1998
>Closed-Date:    Fri Jan 1 12:10:26 PST 1999
>Last-Modified:  Fri Jan  1 12:11:26 PST 1999
>Originator:     Daniel O'Connor
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
>Environment:


>Description:

Port of Swish-e a web site indexer. Still needs extra stuff like a
Perl wrapper for it to be useful on a web site, but I judged that to
be too specific, so you just get the program, read the web page for
docs. (It doesn't come with any - <sigh>)
A tarball is uuencoded at the end of this file, unpack into /usr/ports
and compile away :)


>How-To-Repeat:


>Fix:
	
begin 644 swish-e-port.tar.gz
M'XL(``/5\#0``^U9;7/:1A#V5^M7;,?^D'A`2"`AVU-W2C%VF!C;@]0ZTR^>
M0UK@QI*.GDY1:"?_O7LR$$+B<3/%M-/J,48OM[K=V[U]M'<41='("IY-Z]C8
M>R&`8WFN"WL`MN=ZBZ.ECTM8`&W'<VRWV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38B)90KJG
M3!F8,O(&/347*4(Q%:7;<C45DO].3M0&EFO@LN.$#"V-I5%Q<D&1+K@V,J&O
MZ%&#I8#+`+Q?K*Y)<VEOC?KGX10*IAW()SPM6;B07"E,830G#[[7GL@GVC>D
MT$A$Q,><^M+:)=$MR^BBX&H*4S)TAC+AF59B@G9+F$M)OEI*KC23I\@V6D`_
M*=;)E?`U=^CQEX(_48#)D^3;E5X:RSF&F!#U&TVG!O;)B6>"CV645[VE0I'U
MRQ>!3%BY"T&?D/RB)T_"]+P0*__8IF56;XN_C\_XGRF=8%O?`_B6]7_3:9;\
M;[O5^G\7^%K\RV.=L6WI>*[^=[VU_7\2!-MM6]7^[TYP='0$RWW__0$1J]ZI
M;;:H*#NUW%.*$O'UL5&OUU=2IGX-;8JV2?I1].ASZ&LXKMD.E%<`!]WN&83A
M\JR19[(1AIG>MFSDX6C9`M3T7L2-1(SFY=<]:TS27*\DG'OZ$IEKVN5#$WKD
M.WA\0G<6BY#%JQ8`^G0OKCJ7_AG4;YKZAAY-:1*=U%_8I*=L^*?COL1Z_I<E
MV0OL`'\#_]NVX^G]7]=K5?R_"WP9_R3:MM^?XW_;VHR_4^[_5_S_\AB<N_!J
M\R>SQQ^J7A-]69XW<MJM*`Q/'-M#;%LMUXZL-H;'U(+C?PV/5:A0H4*%"A7^
+.OX$E/0RCP`H```W
`
end


>Release-Note:
>Audit-Trail:

From: Ian Vaudrey <i.vaudrey@bigfoot.com>
To: "'doconnor@gsoft.com.au'" <doconnor@gsoft.com.au>
Cc: "FreeBSD-gnats-submit@FreeBSD.ORG" <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: ports/5821: Swish-e port
Date: Tue, 24 Feb 1998 08:50:43 -0000

 I think that this might be one of those ports that we should
 make our own tarball for. This should include the manual page
 from the Swish-E web site and possibly a copy of the GPL. I'd
 also like to see it include at least one of the rather nice
 animated gifs located at the web site, but I admit this is
 icing on the cake.
 
 The comment and descr files could do with some work, comment
 is supposed to be a single sentence describing the port while
 descr refers to autoswish, which you haven't ported (wisely,
 I think - it may constitute a security hole).
 
 There are other cgi-type ports tied to apache, so I think a
 port of one of the search scripts that use Swish-E (e.g.
 ftp://qz.to/pub/search.cgi) would not be too specific and
 would make the Swish-E port more obviously useful. This
 would be a separate port, though.
 
 Finally, the current version of Swish-E has a bug that can
 make it crash in certain circumstances: here is a description
 of the problem and a suggested fix that you might like to
 incorporate in the port.
 
 **************************************************************
 
 ----------
 From: 	Marcus Haebler <mh@muenster.net>
 Sent: 	14 January 1998 17:55
 To: 	Multiple recipients of list
 Subject: 	[SWISH-E:118] Dots in directory names can make swish-e crash
 
 Hi everyone,
 
 I believe, I just found a bug in swish-e. To reproduce it do this:
 
 	mkdir 13sys.tem6
 	touch 13sys.tem6/changes
 	touch 13sys.tem6/release-notes
 
 	swish-e -i 13sys.tem6
 
 This results in a segmentation fault. I confirmed this kind of behaviour
 on Linux and FreeBSD. Even on other systems you should be able confirm
 this since swish-e looks pretty much like pure C to me.
 
 I used gcc version 2.7.2.1 on Linux and FreeBSD. No -O2 but -g to get some
 debugable code.
 
 I believe that there must be something wrong in the way swish-e handles
 directory names. The problem is the dot. Replace the dot with an '_' and
 it works fine. Amazing is that "13system.6"  works!  Any other position
 of the dot in the name makes it crash. 
 
 This bug also exists in the old non-enhanced swish version.
 
 Can someone confirm this behaviour? Since I am not familiar with the source:
 could someone either give me a hint, where to look for it or come up with a
 fix?
 
 Thanks in advance,
 
 Marcus Haebler
 
 ----------
 From: 	Jim Winstead <jimw@dev.adventure.com>
 Sent: 	15 January 1998 04:29
 To: 	Multiple recipients of list
 Subject: 	[SWISH-E:121] Re: Dots in directory names can make swish-e crash
 
 
 --FL5UXtIhxfXey3p5
 Content-Type: text/plain; charset=us-ascii
 
 Attached is a patch to fix the problem, and also avoid the problem with
 suffix-length overfilling that buffer entirely.
 
 This has only been lightly tested, so use at your own peril.
 
 Jim
 
 --FL5UXtIhxfXey3p5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=diff
 
 Index: check.c
 ===================================================================
 RCS file: /repository/swish-e/check.c,v
 retrieving revision 1.1.1.1
 retrieving revision 1.2
 diff -c -r1.1.1.1 -r1.2
 *** check.c	1998/01/15 03:12:49	1.1.1.1
 --- check.c	1998/01/15 04:15:05	1.2
 ***************
 *** 184,206 ****
   int ishtml(filename)
        char *filename;
   {
 ! 	char *c, suffix[MAXSUFFIXLEN];
   
   	c = (char *) strrchr(filename, '.');
   
   	if (c == NULL)
   		return 0;
 ! 	strcpy(suffix, c + 1);
 ! 	if (suffix[0] == '\0')
   		return 0;
   
 ! 	if (!strncmp(suffix, "htm", 3))
   		return 1;
 ! 	else if (!strncmp(suffix, "HTM", 3))
   		return 1;
 ! 	else if (!strncmp(suffix, "shtml", 5))
   		return 1;
 ! 	else if (!strncmp(suffix, "SHTML", 5))
   		return 1;
   	return 0;
   }
 --- 184,211 ----
   int ishtml(filename)
        char *filename;
   {
 ! 	char *c, *d;
   
 + 	d = (char *) strrchr(filename, '/');
   	c = (char *) strrchr(filename, '.');
   
 + 	/* make sure the . is part of the filename */
 + 	if (d != NULL && c < d) {
 + 		return 0;
 + 	}
 + 
   	if (c == NULL)
   		return 0;
 ! 	if (c++ == '\0')
   		return 0;
   
 ! 	if (!strncmp(c, "htm", 3))
   		return 1;
 ! 	else if (!strncmp(c, "HTM", 3))
   		return 1;
 ! 	else if (!strncmp(c, "shtml", 5))
   		return 1;
 ! 	else if (!strncmp(c, "SHTML", 5))
   		return 1;
   	return 0;
   }
 
 --FL5UXtIhxfXey3p5--
 
 **************************************************************
 
 This is all just my 2 cents of course!
 
  - Ian
 

From: "Daniel O'Connor" <doconnor@gsoft.com.au>
To: Ian Vaudrey <i.vaudrey@bigfoot.com>
Cc: "'doconnor@gsoft.com.au'" <doconnor@gsoft.com.au>,
        "FreeBSD-gnats-submit@FreeBSD.ORG" <FreeBSD-gnats-submit@FreeBSD.ORG>
Subject: Re: ports/5821: Swish-e port 
Date: Wed, 25 Feb 1998 10:03:01 +1030

 > I think that this might be one of those ports that we should
 > make our own tarball for. This should include the manual page
 > from the Swish-E web site and possibly a copy of the GPL. I'd
 > also like to see it include at least one of the rather nice
 > animated gifs located at the web site, but I admit this is
 > icing on the cake.
 Hmm.. I don't know.. Perhaps you could write a html to man converter, and then 
 get the document web page via fetch and convert it =)
 Seriously though I think that its a good idea to add the extra stuff you 
 mentioned, esp the license.. (although it didn't come with the source tarball 
 I downloaded, which IMHO, violates the GNU license doesn't it?)
 
 > The comment and descr files could do with some work, comment
 > is supposed to be a single sentence describing the port while
 > descr refers to autoswish, which you haven't ported (wisely,
 > I think - it may constitute a security hole).
 Hey, the comment is one line.. Its just long :)
 I just ripped the desc from the web page, and forgot to remove the Autoswish 
 stuff.. Sorry :-/
 
 > There are other cgi-type ports tied to apache, so I think a
 > port of one of the search scripts that use Swish-E (e.g.
 > ftp://qz.to/pub/search.cgi) would not be too specific and
 > would make the Swish-E port more obviously useful. This
 > would be a separate port, though.
 Yes, as it stands the swish-e port is pretty much useless without those 
 scripts, which is why I said so in the comment - although I think we should 
 hassle the people who distribute it to make there tarball more useful :-/
 
 > Finally, the current version of Swish-E has a bug that can
 > make it crash in certain circumstances: here is a description
 > of the problem and a suggested fix that you might like to
 > incorporate in the port.
 Well, I'd prefer to send it to the authors so they can fix it for everyone.
 But adding the extra patch is pretty easy.
 
 ---------------------------------------------------------------------
 |Daniel O'Connor software and network engineer for Genesis Software |
 |http://www.gsoft.com.au                                            |
 |The nice thing about standards is that there are so many of them to|
 |choose from. -- Andrew Tanenbaum                                   |
 ---------------------------------------------------------------------
 
 
Responsible-Changed-From-To: freebsd-ports->billf 
Responsible-Changed-By: billf 
Responsible-Changed-When: Sun Nov 22 20:13:19 PST 1998 
Responsible-Changed-Why:  
This port needs a serious injection of portlint, but I'll rewrite it and see it through. 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Fri Jan 1 12:10:26 PST 1999 
State-Changed-Why:  
Imported into ports/www/swish-e on Tue Dec 22 22:59:16 1998 UTC by billf 
>Unformatted:
