[PATCH] variables for newsfeeds

Sven Paulus sven at tin.org
Tue Jul 25 19:11:59 UTC 2000


I sent this patch some weeks ago to Russ, but it was too late to be included
to 2.3. Since the goal is that 2.4 won't have the newsfeeds file anymore, I
think I'll announce it here, maybe its useful for some of you. Maybe it's
something for 2.3.1 or 2.2.4 (I think continuing 2.2.x with some new
features might be worth a thought, since for those of use who want to keep
their traditional spools, INN-2.x (x>2) is no real solution ...).

One thing I've always missed when configuring peers in the newsfeeds file
was support for groups of newsgroups. This patch adds support for variables
to the newsfeeds file and use them in the feed definitions:

$EXCLUSIONS=@local.*, at internal.*/!internal,!local


As you can see, a variable is defined by using
The variable name can consist of [0-9a-zA-Z]. If the line contains spaces,
it is ignored. The contents are random, everything is possible, even line

If you want to use a variable, use $variablename whereever you want. It will
be replaced by the variable's contents. There are two special cases:
!$variablename and @$variablename. In these cases, every single element
(where the elements are delimited by ',') within the variable contents is
preceeded by '!' or '@'. So @$GERMANYGROUPS is expanded to @de.*, at fido.*,\
@z-netz.*, at maus.*.

As far as I tested the patch, it seems to fit to INN-2.2 (may be even
earlier) too recent INN-CURRENT snapshots. I found it very useful when
managing a larger number of feeds without having to use external tools like
gup or m4.

You can download it from:

Apply this the usual way: 
  cd ..../inn-2.xyz
  patch -p1 < diff-inn-2.x-newsfeeds-variables

If you have any problems or questions, feel free to contact me.


More information about the inn-workers mailing list