🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Tim Smith Mon, 06 Mar 1995 05:49
Another suck
#3426
Author: Tim Smith
Date: Mon, 06 Mar 1995 05:49
242 lines
8769 bytes
Charlie Root <goldt@math.tu-berlin.de> wrote:
>Yep, it's true. I couldn't resist to include some more
>patches, but still the job of maintaining suck is free
>for YOU.
>Grab suck 2.1 soon at sunsite.unc.edu in pub/Linux/system/Mail/news
>and tsx-11.mit.edu in pub/linux/sources/sbin.

Meanwhile, my suck is now at 2 also.  You can get it at

	ftp://ftp.u.washington.edu/public/tzs/suck2.tar

Here is an approximation of the README file from my current suck:

-1. THERE IS A LOT SUCKING GOING ON

There are now at least three versions of suck floating around.  There is
the original, which I wrote and made available last year.

Someone took that, rewrote big chunks of it, and that apparently has shown
up in some Linux distributions.

Meanwhile, someone else based their new suck-like package on my suck, and
I've seen that go by on news.software.nntp.

0. INTRODUCTION

This package contains a set of programs for sucking news from an NNTP
server.  The target user is a person running Unix at home who wants to
get a small newsfeed over a SLIP or PPP connection.  It is assumed that
you have INN or some other local news server running, so that suck will
have something to do with the news that it fetches.

Suck 2 contains the following improvements over Suck 1:

	1. Source code is better organized, and more portable.

	2. It is less monolithic.  Instead of a single program to get the
	list of new articles and then get the articles, it is now two
	programs.  One gets the list of new articles, and the other takes
	a list of articles and fetches them.

	3. The news fetcher takes a time limit, and stops fetching when
	the time limit is reached.  If your connection is one of those
	"on 2 hours/off 2 hours" types, this can keep you from getting
	hung up on.

Sometime soon, I plan to release suck 3.  The main change in suck 3
will be the use of XOVER rather than XHDR to get the list of new
news articles, and the addition of a killfile mechanism, so you can
avoid the waste of fetching articles that you don't want to read.

The following several sections explain each program.  Then there will be
several sections explaining how to compile and install each program.

1. PROGRAM "findnew".

This program finds new news on your server.  Usage is

	findnew name_of_server

The list of newsgroups you are interested in is kept in the file "suck.mark".
The format of suck.mark is simple.  It consists of lines of the form

	name_of_newsgroup NNNN

where NNNN is the highest article number for the group.

The output of a findnew run is two files:

	"suck.nmark"
		A copy of suck.mark, with the highest article numbers
		updated.

	"suck.new"
		A list of messages that need to be fetched from
		the server.


2. PROGRAM "fetchnews"

This program actually grabs the articles.  Usage is

	fetchnews timelimit name_of_server

It takes as input the file "suck.need", which is a list of articles to
fetch.

While fetchnews is fetching news, it prints one line per article fetched.
These lines look something like this:

	90 <qualityD4wC17.K3q@netcom.com>

The number is how many seconds remain before the timelimit is reached.
The rest is the article ID of the last message fetched.

It outputs two files:

	"suck.nneed"
		A list of articles from suck.need that it didn't get to.

	"suck.batch"
		A bunch of articles.

3. PROGRAM "lpost"

This program reads "suck.batch" and feeds each article to the local
server.

4. PROGRAM "mlock" AND SCRIPT "munlock"

Simple locking programs that might be useful if you run this stuff out of
cron.  If you want to use the modem by hand for something, run "mlock", and
suck will be prevented from stepping on you.  Run "munlock" when you are
done, and suck can run.

5. PROGRAMS "timestamp" AND "timelimit"

The "timestamp" program simply prints a timestamp.

The program "timelimit" takes a time limit and a start time, and computes
how many seconds remain until the limit is reached.  Usage is

	timelimit time_limit start_time

For example, if you are want to limit your connect time to 90 minutes (5400
seconds), you would do something like this in your news suck script:

	START=`timestamp`
	...connect to your server...
	...use findnew to find new articles...
	LIMIT=`timelimit 5400 $START`
	...use fetchnews to get the news, giving it $LIMIT for the time limit...

6. PROGRAMS "scall" AND "shangup"

The "scall" program calls up a slip provider, logs in, and starts SLIP.
The "shangup" program hangs up the phone.

It will probably take a bit of work to use these on anything other than
A/UX, since they know details of how to start a SLIP connected.

7. SCRIPT "sfetch"

This puts it all together.  Usage is

	sfetch

There are a few comments in sfetch that explain what it is doing.

8. COMPILING AND INSTALLING

Step 0:
	Make a directory somewhere to keep the suck runtime stuff.
	We'll call this ~/suck, but you can put it anywhere.

Step 1:
	In the suck2.src directory, type "make".

	This will build findnew, fetchnews, timestamp, and timelimit.
	Move or copy these four files to ~/suck.

Step 2:
	Edit sfetch and change the SERVER and MAXON definitions to what is
	appropriate for your system.

	Note that sfetch tries to "ping" the server to verify the connection.
	The arguments to ping vary from system to system, so you might
	need to change that line.

	Copy sfetch to ~/suck.

Step 3:
	In the lpost.src directory, edit Makefile and change the
	definition of RNEWS to point to where you keep the rnews
	program.

	Type "make" to build lpost, and then copy lpost to ~/suck.

Step 4:
	In lock.src, type "make" to make mlock.

	Copy mlock and munlock to ~/suck.

Step 5:
	In connect.src, edit scall.c.  Look at all the places where
	system() is called, and change these to issue the appropriate
	commands for your system.  Also, take a careful look at the
	StartSLIP() function, for that is where the line from the
	provider that contains your and its IP addresses is parsed.
	You'll almost certainly have to hack this to match your
	providers' format, unless you are using the same SLIP
	provider I am (NorthWestNexus).

	You'll also need to fix shangup.c--look for system().

	Note that you do not need scall and shangup to use suck.
	You can easily edit sfetch and change it to assume that
	the connection has already been set up.

	To compile scall and shangup, set environment variables
	PHONE, ACCOUNT, and PASSWORD to the phone number, account
	name, and password that are needed to log into your SLIP
	provider, and then type "make".

	This will build scall and shangup.  Then move them to ~/suck.
	Note that scall might have to run as root on your system in
	order to start SLIP, so you may need to chown and chmod it
	to make it setuid root.

Step 6:
	In ~/suck, make a suck.mark file that contains the groups
	you want to receive.  Specify zero for the max article number
	for each group.  For example, if you want to get comp.os.linux.misc
	and comp.os.linux.announce, you would put these lines in your
	suck.mark:

		comp.os.linux.misc 0
		comp.os.linux.announce 0

	I've included a simple script, "addgroup", that you can use to
	do this for you.  Usage is

		addgroup name ...

	For each group, it will add it to suck.mark if it is not already
	there, and it will also notify INN.  If you want to use addgroup,
	you'll probably have to change the ctlinnd, unless you keep it in
	the same place I do (/usr/local/news/bin/ctlinnd).

9. RUNNING SUCK

	Go to the directory where you installed the runtime files, and
	type

		sfetch

	When it finishes, take a look at suck.log for any errors or
	warnings.

	Note that "sfetch" saves backup copies of certain files.  These
	have names of the form save.*.  You can delete these periodically.
Re: Another suck
#3429
Author: Sven Goldt
Date: Mon, 06 Mar 1995 19:53
30 lines
2177 bytes
Tim Smith (tzs@u.washington.edu) wrote:

: There are now at least three versions of suck floating around.  There is
: the original, which I wrote and made available last year.
Hi Tim, so why didn't you put your name in the original suck ?
And when did you start to use linux ?

: 1. Source code is better organized, and more portable.

That reminds me that i don't know any platform where suck 2.1.1
doesn't run ;).

: 	3. The news fetcher takes a time limit, and stops fetching when
: 	the time limit is reached.  If your connection is one of those
: 	"on 2 hours/off 2 hours" types, this can keep you from getting
: 	hung up on.
So why don't you use the restart feature from suck 2.1.1 ?
It's PD !
Anyways, i would like to have one suck program and not 3 versions
of the same program. 
If you have more time than me please contact me so that we can
melt our versions and you take over (again ?) maintainance.

Sven

--
*****************************************************************************
*    # THE MOST IMPORTANT FINANCIAL QUESTION IS:  Where is the money ? #    *
*****************************************************************************
Re: Another suck
#3434
Author: Tim Smith
Date: Tue, 07 Mar 1995 23:09
61 lines
3904 bytes
Sven Goldt <goldt@math.tu-berlin.de> wrote:
>Tim Smith (tzs@u.washington.edu) wrote:
>: There are now at least three versions of suck floating around.  There is
>: the original, which I wrote and made available last year.
>Hi Tim, so why didn't you put your name in the original suck ?

It didn't occur to me that anyone other than those who directly saw
my first posting announcing its availability would be interested in
it, so I just dashed out a quick README file, put my stuff on an FTP
site, and posted a notice, and then forgot about it!

My view was that slurp was a good implementation of a bad idea (using
NEWNEWS), and suck was a bad implemenation of a good idea (using XHDR).
I'd never written any code to talk to a server before (all my network
experience has been at the low level, working on things like device
drivers and stand-alone routers), so assumed that I made all kind of
mistakes.  Thus, at most, I expected others to say "Hey!  Pulling a
newsfeed with XHDR works and doesn't make the server thrash!  I think
I'll write a good implementation to replace this suck piece of junk".

>And when did you start to use linux ?

I've had Linux since last summer.  However, I didn't do suck on Linux
because my 486 also runs DOS/Windows, OS/2, and NT.  My Mac runs A/UX
100% of the time, so that's where I do my sucking.

>: 	3. The news fetcher takes a time limit, and stops fetching when
>: 	the time limit is reached.  If your connection is one of those
>: 	"on 2 hours/off 2 hours" types, this can keep you from getting
>: 	hung up on.
>So why don't you use the restart feature from suck 2.1.1 ?
>It's PD !

When I updated my suck to version 2, I didn't even know that there were
other versions out there.  Suck 1 worked very well for me until about
a month ago, when I let my news sucking get way behind, and so got more
than a 2 hour backlog of news, and so needed some way to limit the
length of sessions.  So I spent a couple of hours putting that in, and
making it more modular.

>Anyways, i would like to have one suck program and not 3 versions
>of the same program. 
>If you have more time than me please contact me so that we can
>melt our versions and you take over (again ?) maintainance.

You are welcome to be the offical sucker if you want.  My view of my
version of suck is that if it works on my machine, with my SLIP provider,
I'm happy, and if anyone else wants it, they can have it.  As far as I'm
concerned, my version is almost at a dead end.  The only change I anticipate
is switching from "XHDR Message-ID" to "XOVER" to get the list of new
articles and then adding in a killfile processing step between the
fetching of the article list and the fetching of the articles.  After that,
I'm done with it.

You might want to look at my package and see if any of my other utilities
would be useful to you.  In particular, I've got a simple program to dial
my SLIP provider, log in, and start SLIP on my end.  This program should
port relatively easy to any Unix-like system.

--Tim Smith
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads