INN commit: trunk (50 files)

INN Commit Russ_Allbery at isc.org
Tue Sep 18 19:44:48 UTC 2007


    Date: Tuesday, September 18, 2007 @ 12:44:47
  Author: iulius
Revision: 7683

* Add a new "perl" top-level directory to host, to start with,
  the module INN::Config.
* Convert all Perl scripts to use that module.
* Add a new --libperldir configure option to specify the
  installation directory (by default @libdir@/perl).
* Fix some declarations of variables for "perl -w" not to complain.
* Remove "lint food" stuff.
* Specify that innshellvars.pl is deprecated.

Feel free to improve the first version of Config.pm and
its documentation.  And do not hesitate to blame me in
case I have broken something (I hope not!).

Added:
  trunk/perl/
  trunk/perl/INN/
  trunk/perl/INN/Config.pm.in
  trunk/perl/Makefile
Modified:
  trunk/MANIFEST
  trunk/Makefile
  trunk/Makefile.global.in
  trunk/backends/mod-active.in
  trunk/backends/news2mail.in
  trunk/backends/send-uucp.in
  trunk/configure.ac
  trunk/contrib/backlogstat.in
  trunk/contrib/cleannewsgroups.in
  trunk/contrib/findreadgroups.in
  trunk/contrib/makeexpctl.in
  trunk/contrib/makestorconf.in
  trunk/contrib/thdexpire.in
  trunk/control/controlchan.in
  trunk/control/gpgverify.in
  trunk/control/modules/checkgroups.pl
  trunk/control/modules/ihave.pl
  trunk/control/modules/newgroup.pl
  trunk/control/modules/rmgroup.pl
  trunk/control/modules/sendme.pl
  trunk/control/modules/sendsys.pl
  trunk/control/modules/senduuname.pl
  trunk/control/modules/version.pl
  trunk/control/perl-nocem.in
  trunk/control/pgpverify.in
  trunk/doc/pod/hacking.pod
  trunk/frontends/cnfsheadconf.in
  trunk/frontends/cnfsstat.in
  trunk/frontends/mailpost.in
  trunk/frontends/scanspool.in
  trunk/innfeed/procbatch.in
  trunk/m4/paths.m4
  trunk/samples/nnrpd_access.pl.in
  trunk/samples/nnrpd_access_wrapper.pl.in
  trunk/samples/nnrpd_auth.pl.in
  trunk/samples/nnrpd_auth_wrapper.pl.in
  trunk/scripts/inncheck.in
  trunk/scripts/innmail.in
  trunk/scripts/innreport.in
  trunk/scripts/innshellvars.in
  trunk/scripts/innshellvars.pl.in
  trunk/scripts/innupgrade.in
  trunk/scripts/simpleftp.in
  trunk/support/fixconfig.in
  trunk/support/fixscript.in
  trunk/support/mkmanifest

------------------------------------+
 MANIFEST                           |    4 
 Makefile                           |    6 
 Makefile.global.in                 |    1 
 backends/mod-active.in             |   32 ++--
 backends/news2mail.in              |   12 -
 backends/send-uucp.in              |   39 ++----
 configure.ac                       |    5 
 contrib/backlogstat.in             |    6 
 contrib/cleannewsgroups.in         |   12 -
 contrib/findreadgroups.in          |    6 
 contrib/makeexpctl.in              |    8 -
 contrib/makestorconf.in            |   10 -
 contrib/thdexpire.in               |   34 ++---
 control/controlchan.in             |   47 +++----
 control/gpgverify.in               |   18 +-
 control/modules/checkgroups.pl     |    8 -
 control/modules/ihave.pl           |   10 -
 control/modules/newgroup.pl        |   20 +--
 control/modules/rmgroup.pl         |   16 +-
 control/modules/sendme.pl          |    8 -
 control/modules/sendsys.pl         |   10 -
 control/modules/senduuname.pl      |    6 
 control/modules/version.pl         |    8 -
 control/perl-nocem.in              |   38 ++---
 control/pgpverify.in               |   48 ++++---
 doc/pod/hacking.pod                |    5 
 frontends/cnfsheadconf.in          |    8 -
 frontends/cnfsstat.in              |   20 +--
 frontends/mailpost.in              |   22 +--
 frontends/scanspool.in             |   10 -
 innfeed/procbatch.in               |   14 +-
 m4/paths.m4                        |    3 
 perl/INN/Config.pm.in              |  225 +++++++++++++++++++++++++++++++++++
 perl/Makefile                      |   31 ++++
 samples/nnrpd_access.pl.in         |    6 
 samples/nnrpd_access_wrapper.pl.in |    5 
 samples/nnrpd_auth.pl.in           |    8 -
 samples/nnrpd_auth_wrapper.pl.in   |    5 
 scripts/inncheck.in                |   76 ++++++-----
 scripts/innmail.in                 |   13 +-
 scripts/innreport.in               |    4 
 scripts/innshellvars.in            |    5 
 scripts/innshellvars.pl.in         |    6 
 scripts/innupgrade.in              |    4 
 scripts/simpleftp.in               |    2 
 support/fixconfig.in               |    2 
 support/fixscript.in               |    3 
 support/mkmanifest                 |    1 
 48 files changed, 585 insertions(+), 305 deletions(-)

Modified: MANIFEST
===================================================================
--- MANIFEST	2007-09-18 13:14:28 UTC (rev 7682)
+++ MANIFEST	2007-09-18 19:44:47 UTC (rev 7683)
@@ -599,6 +599,10 @@
 nnrpd/tls.c                           Transport layer security
 nnrpd/tls.h                           Transport layer security data types
 nnrpd/track.c                         Track client behavior
+perl                                  Perl libraries (Directory)
+perl/INN                              INN Perl modules (Directory)
+perl/INN/Config.pm.in                 INN::Config module
+perl/Makefile                         Makefile for perl libraries
 samples                               Prototype INN config files (Directory)
 samples/INN.py                        Stub Python functions
 samples/Makefile                      Makefile for samples

Modified: Makefile
===================================================================
--- Makefile	2007-09-18 13:14:28 UTC (rev 7682)
+++ Makefile	2007-09-18 19:44:47 UTC (rev 7683)
@@ -7,6 +7,7 @@
 INSTDIRS      = $(PATHNEWS) $(PATHBIN) $(PATHAUTH) $(PATHAUTHRESOLV) \
 		$(PATHAUTHPASSWD) $(PATHCONTROL) $(PATHFILTER) \
 		$(PATHRNEWS) $(PATHDB) $(PATHDOC) $(PATHETC) $(PATHLIB) \
+		$(PATHLIBPERL) $(PATHLIBPERL)/INN \
 		$(PATHMAN) $(MAN1) $(MAN3) $(MAN5) $(MAN8) $(PATHSPOOL) \
 		$(PATHTMP) $(PATHARCHIVE) $(PATHARTICLES) $(PATHINCOMING) \
 		$(PATHINBAD) $(PATHTAPE) $(PATHOVERVIEW) $(PATHOUTGOING) \
@@ -16,7 +17,7 @@
 ##  and make install runs in all ALLDIRS.  Nothing runs in test except the
 ##  test target itself and the clean targets.  Currently, include is built
 ##  before anything else but nothing else runs in it except clean targets.
-LIBDIRS     = include lib storage history
+LIBDIRS     = include lib storage history perl
 PROGDIRS    = innd nnrpd innfeed control expire frontends backends authprogs \
               scripts
 UPDATEDIRS  = $(LIBDIRS) $(PROGDIRS) doc
@@ -47,12 +48,13 @@
 	cd samples && $(MAKE) all
 	cd site    && $(MAKE) all
 
-all-libraries:	all-lib all-storage all-history
+all-libraries:	all-lib all-storage all-history all-perl
 
 all-include:			; cd include   && $(MAKE) all
 all-lib:	all-include	; cd lib       && $(MAKE) all
 all-storage:	all-lib		; cd storage   && $(MAKE) library
 all-history:	all-storage	; cd history   && $(MAKE) all
+all-perl:	all-history	; cd perl      && $(MAKE) all
 
 all-programs:	all-innd all-nnrpd all-innfeed all-control all-expire \
 		all-frontends all-backends all-authprogs all-scripts \

Modified: Makefile.global.in
===================================================================
--- Makefile.global.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ Makefile.global.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -229,6 +229,7 @@
 PATHMAN		= $(mandir)
 PATHINCLUDE	= $(includedir)
 PATHLIB		= $(libdir)
+PATHLIBPERL	= @LIBPERLDIR@
 PATHCONTROL	= @CONTROLDIR@
 PATHFILTER	= @FILTERDIR@
 PATHRUN		= @RUNDIR@

Modified: backends/mod-active.in
===================================================================
--- backends/mod-active.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ backends/mod-active.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # $Id$
 # batch-active-update
@@ -9,18 +9,17 @@
 # is output by docheckgroups and actsync, and efficiently handles them all at
 # once.  Input can come from command-line files or stdin, a la awk/sed.
 
-$oldact = $inn::active;         # active file location
-$oldact = $inn::active;         # active file location (same; shut up, perl -w)
-$newact = "$oldact.new$$";      # temporary name for new active file
-$actime = $inn::activetimes;    # active.times file
-$pausemsg = 'batch active update, ok'; # message to be used for pausing?
-$diff_flags = '';               # flags for diff(1); default chosen if null
-$changes = 0;                   # number of changes to do
+$oldact = $INN::Config::active;         # active file location
+$newact = "$oldact.new$$";              # temporary name for new active file
+$actime = $INN::Config::activetimes;    # active.times file
+$pausemsg = 'batch active update, ok';  # message to be used for pausing?
+$diff_flags = '';                       # flags for diff(1); default chosen if null
+$changes = 0;                           # number of changes to do
 
 $0 =~ s#^.*/##;
 
-die "$0: must run as $inn::newsuser user"
-  unless $> == (getpwnam($inn::newsuser))[2];
+die "$0: must run as $INN::Config::newsuser user"
+  unless $> == (getpwnam($INN::Config::newsuser))[2];
 
 $debug = -t STDOUT ? 1 : 0;
 
@@ -48,13 +47,13 @@
 while (<>) {
   if (/^\s*\S*ctlinnd newgroup (\S+) (\S)/) {
     $toadd{$1} = $2;
-    $changes += 1;
+    $changes++;
   } elsif (/^\s*\S*ctlinnd rmgroup (\S+)/) {
     $eval .= "  next if \$group eq '$1';\n";
-    $changes += 1;
+    $changes++;
   } elsif (/^\s*\S*ctlinnd changegroup (\S+) (\S)/) {
     $eval .= "  s/ \\S+\$/ $2/ if \$group eq '$1';\n";
-    $changes += 1;
+    $changes++;
   }
 }
 
@@ -80,7 +79,7 @@
 eval $eval;
 for (sort keys %toadd) {
   $add = "$_ 0000000000 0000000001 $toadd{$_}\n";
-  if (!print( NEWACT $add)) {
+  if (!print(NEWACT $add)) {
     &ctlinnd("go $pausemsg");
     die "$0: writing $newact failed ($!), aborting\n";
   }
@@ -121,12 +120,11 @@
 
 sub
 ctlinnd
-
 {
   local($command) = @_;
 
   print "ctlinnd $command\n" if $debug;
-  if (system("$inn::newsbin/ctlinnd -s $command")) {
+  if (system("$INN::Config::newsbin/ctlinnd -s $command")) {
     die "$0: \"$command\" failed, aborting\n";
   }
 }

Modified: backends/news2mail.in
===================================================================
--- backends/news2mail.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ backends/news2mail.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # news to mail channel backend
 #
@@ -37,9 +37,9 @@
 use Sys::Syslog;
 use strict;
 
-my $cfFile = $inn::pathetc . "/news2mail.cf" ;
-my $sendmail = $inn::mta ;
-my $sm = $inn::pathbin . "/sm" ;
+my $cfFile = $INN::Config::pathetc . "/news2mail.cf" ;
+my $sendmail = $INN::Config::mta ;
+my $sm = $INN::Config::pathbin . "/sm" ;
 my %maddr = ();
 
 #
@@ -97,7 +97,7 @@
 sub mailto {
 	my($t, $l, @a) = @_ ;
 
-	my $sendmail = $inn::mta ;
+	my $sendmail = $INN::Config::mta ;
 	$sendmail =~ s!\s*%s!! ;
 	my @command = (split (' ', $sendmail), '-ee', '-fnews', '-odq', @a);
 #	@command[0] = '/usr/local/bin/debug';

Modified: backends/send-uucp.in
===================================================================
--- backends/send-uucp.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ backends/send-uucp.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#!/usr/bin/perl -w
-# fixscript will replace this line with code to load innshellvars
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config::Config
 
 ##############################################################################
 # send-uucp.pl	create and send UUCP news batches from the outgoing files
@@ -22,9 +22,9 @@
 use Sys::Syslog;
 
 # for compatibility with earlier versions of INN
-$inn::pathetc ||= '/etc/news';
-$inn::syslog_facility ||= 'news';
-$inn::uux ||= 'uux';
+$INN::Config::pathetc ||= '/etc/news';
+$INN::Config::syslog_facility ||= 'news';
+$INN::Config::uux ||= 'uux';
 
 # some default values
 my $MAXSIZE = 500000;
@@ -40,10 +40,10 @@
 my $BATCHER_FLAGS = '';
 
 ##############################################################################
-my $config_file = $inn::pathetc . '/send-uucp.cf';
-my $lockfile = $inn::locks . '/LOCK.send-uucp';
+my $config_file = $INN::Config::pathetc . '/send-uucp.cf';
+my $lockfile = $INN::Config::locks . '/LOCK.send-uucp';
 
-openlog('send-uucp', 'pid', $inn::syslog_facility);
+openlog('send-uucp', 'pid', $INN::Config::syslog_facility);
 
 my @sitelist;
 if (@ARGV) {
@@ -64,7 +64,7 @@
     exit 0;
 }
 
-chdir $inn::batch or logdie("Can't access $inn::batch: $!", 'crit');
+chdir $INN::Config::batch or logdie("Can't access $INN::Config::batch: $!", 'crit');
 
 shlock($lockfile);
 
@@ -72,9 +72,6 @@
 unlink $lockfile;
 exit 0;
 
-# lint food
-$inn::compress.$inn::locks.$inn::syslog_facility.$inn::have_uustat = 0 if 0;
-
 ##############################################################################
 sub read_cf {
     my ($conf_file, $site_wanted) = @_;
@@ -123,7 +120,7 @@
 sub count_jobs {
     my ($site) = @_;
 
-    return 0 if not $inn::have_uustat;
+    return 0 if not $INN::Config::have_uustat;
     open(JOBS, "uustat -s $site 2> /dev/null |") or logdie("cannot fork: $!");
     my $count = grep(/ Executing rnews /, <JOBS>);
     close JOBS;                    # ignore errors, uustat may fail
@@ -155,10 +152,10 @@
         $maxjobs = '-N ' . ($MAXJOBS - $jobs);
     }
 
-    $compress ||= $inn::compress;
+    $compress ||= $INN::Config::compress;
     $size ||= $MAXSIZE;
 
-    # if exists a .work temp file left by a previous invocation, rename
+    # if a .work temp file left by a previous invocation exists, rename
     # it to .work.tmp, we'll append it to the current batch file once it
     # has been renamed and flushed.
     if (-f "$site.work") {
@@ -194,13 +191,13 @@
         unlink "$site.work" or logmsg("cannot delete $site.work: $!", 'err');
     } else {
         if ($compress eq 'none') {
-            system "batcher -b $size $maxjobs $BATCHER_FLAGS "
-                . "-p\"$inn::uux $UUX_FLAGS %s!rnews\" $host $site.work";
+            system "$INN::Config::newsbin/batcher -b $size $maxjobs $BATCHER_FLAGS "
+                . "-p\"$INN::Config::uux $UUX_FLAGS %s!rnews\" $host $site.work";
         } else {
-            system "batcher -b $size $maxjobs $BATCHER_FLAGS "
+            system "$INN::Config::newsbin/batcher -b $size $maxjobs $BATCHER_FLAGS "
                 . "-p\"{ echo '#! " . unbatcher($compress)
                 . "' ; exec $compress; } | "
-                . "$inn::uux $UUX_FLAGS %s!rnews\" $host $site.work";
+                . "$INN::Config::uux $UUX_FLAGS %s!rnews\" $host $site.work";
         }
         logmsg("batched articles for $site", 'debug');
     }
@@ -224,7 +221,7 @@
 sub ctlinnd {
     my ($cmd, @args) = @_;
 
-    my $st = system("$inn::newsbin/ctlinnd", '-s', $cmd, @args);
+    my $st = system("$INN::Config::newsbin/ctlinnd", '-s', $cmd, @args);
     logdie('Cannot run ctlinnd: ' . $!) if $st == -1;
     logdie('ctlinnd returned status ' . ($st & 255)) if $st > 0;
 }
@@ -234,7 +231,7 @@
 
     my $locktry = 0;
     while ($locktry < 60) {
-        if (system("$inn::newsbin/shlock", '-p', $$, '-f', $lockfile) == 0) {
+        if (system("$INN::Config::newsbin/shlock", '-p', $$, '-f', $lockfile) == 0) {
             return 1;
         }
         $locktry++;

Modified: configure.ac
===================================================================
--- configure.ac	2007-09-18 13:14:28 UTC (rev 7682)
+++ configure.ac	2007-09-18 19:44:47 UTC (rev 7683)
@@ -512,8 +512,9 @@
 dnl Configure our output files.  Try to keep this as limited as possible,
 dnl since it directly affects how long it takes configure to complete.
 AC_CONFIG_FILES([Makefile.global include/inn/paths.h])
-AC_CONFIG_FILES([scripts/inncheck scripts/innshellvars])
-AC_CONFIG_FILES([scripts/innshellvars.pl scripts/innshellvars.tcl])
+AC_CONFIG_FILES([scripts/inncheck])
+AC_CONFIG_FILES([scripts/innshellvars scripts/innshellvars.tcl])
+AC_CONFIG_FILES([perl/INN/Config.pm scripts/innshellvars.pl])
 AC_CONFIG_FILES([scripts/news.daily])
 AC_CONFIG_FILES([support/fixconfig], [chmod +x support/fixconfig])
 AC_CONFIG_FILES([support/fixscript], [chmod +x support/fixscript])

Modified: contrib/backlogstat.in
===================================================================
--- contrib/backlogstat.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ contrib/backlogstat.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,11 +1,11 @@
-#!/usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # backlogstat - display backlog to sites
 # based on bklog by bill davidsen <davidsen at tmr.com>
 
 # breaks if backlog-directory in innfeed.conf is not "innfeed"
-my $dir = "$inn::pathspool/innfeed";
+my $dir = "$INN::Config::pathspool/innfeed";
 my $Revision = '1.8';
 
 use strict;

Modified: contrib/cleannewsgroups.in
===================================================================
--- contrib/cleannewsgroups.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ contrib/cleannewsgroups.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # This script cleans the newsgroups file:
 #   * Groups no longer in the active file are removed.
@@ -13,14 +13,14 @@
 $remove='';
 # $remove='^alt\.';
 
-open ACT, $inn::active  or die "Can't open $inn::active: $!\n";
+open ACT, $INN::Config::active  or die "Can't open $INN::Config::active: $!\n";
 while(<ACT>) {
     ($group) = split;
     $act{$group} = 1 unless($remove ne "" && $group =~ /$remove/o);
 }
 close ACT;
 
-open NG, $inn::newsgroups  or die "Can't open $inn::newsgroups: $!\n";
+open NG, $INN::Config::newsgroups  or die "Can't open $INN::Config::newsgroups: $!\n";
 while(<NG>) {
     chomp;
     ($group, $desc) = split /\s+/,$_,2;
@@ -34,7 +34,7 @@
 }
 close NG;
 
-open NG, ">$inn::newsgroups.new"  or die "Can't open $inn::newsgroups.new for write: $!\n";
+open NG, ">$INN::Config::newsgroups.new"  or die "Can't open $INN::Config::newsgroups.new for write: $!\n";
 foreach $group (sort keys %act) {
     if(defined $hist{$group}) {
 	print NG "$group\t$hist{$group}\n" or die "Can't write: $!\n";
@@ -42,4 +42,4 @@
 }
 close NG or die "Can't close: $!\n";
 
-rename "$inn::newsgroups.new", $inn::newsgroups  or die "Can't rename $inn::newsgroups.new to $inn::newsgroups: $!\n";
+rename "$INN::Config::newsgroups.new", $INN::Config::newsgroups  or die "Can't rename $INN::Config::newsgroups.new to $INN::Config::newsgroups: $!\n";

Modified: contrib/findreadgroups.in
===================================================================
--- contrib/findreadgroups.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ contrib/findreadgroups.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,9 +1,9 @@
-#!/usr/local/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Keep track of which groups are currently being read.  Takes logfile input
 # on stdin.
-$readfile="$inn::newsetc/readgroups";
+$readfile="$INN::Config::newsetc/readgroups";
 
 $curtime = time;
 $oldtime = $curtime - 30 * 86400; # 30 days in the past

Modified: contrib/makeexpctl.in
===================================================================
--- contrib/makeexpctl.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ contrib/makeexpctl.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,11 +1,11 @@
-#!/usr/local/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Create expire.ctl script based on recently read articles.  Argument gives
 # scale factor to use to adjust expires.
 
-$readfile="$inn::pathdb/readgroups";
-$expirectl=$inn::expirectl;
+$readfile="$INN::Config::pathdb/readgroups";
+$expirectl=$INN::Config::expirectl;
 
 $curtime = time;
 $oldtime = $curtime - 30 * 86400; # 30 days in the past

Modified: contrib/makestorconf.in
===================================================================
--- contrib/makestorconf.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ contrib/makestorconf.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,18 +1,18 @@
-#!/usr/local/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Create storage.conf script based on recently read articles.
 
-$readfile="$inn::pathdb/readgroups";
+$readfile="$INN::Config::pathdb/readgroups";
 
-$outfile="$inn::pathdb/storage.conf";
+$outfile="$INN::Config::pathdb/storage.conf";
 outloop: 
 for ($level=9 ; $level >= 2; --$level) {
   # clear groups hash.
   foreach $i (keys %groups) {
     delete $groups{$i};
   }
-  if (open(RDF, "sort $readfile|")) {
+  if (open(RDF, "$INN::Config::sort $readfile|")) {
     while (<RDF>) {
       chop;
       next if (/^group/);	# bogus 

Modified: contrib/thdexpire.in
===================================================================
--- contrib/thdexpire.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ contrib/thdexpire.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
+
 $ID='$Id$$';
 
 use POSIX ":fcntl_h";
@@ -171,7 +172,7 @@
 
 =over 4
 
-=item F<E<lt>inn::pathdbE<gt>/thdexpstat.{dir,pag}>
+=item I<pathdb>/thdexpstat.{dir,pag}
 
 Holds state information like classes, expire times, oldest articles.
 When this file is missing, it will be rebuilt the next time the daemon
@@ -179,7 +180,7 @@
 find the oldest articles. With the B<-r> option, the contents of this
 file are printed.
 
-=item F<E<lt>inn::innddirE<gt>/thdexpire.pid>
+=item I<pathrun>/thdexpire.pid
 
 Contains the PID of the running daemon.
 
@@ -244,7 +245,7 @@
 
 #-----------------------------------------------------------------------------
 
-chdir $inn::spool || die "chdir $inn::spool: $!";
+chdir $INN::Config::spool || die "chdir $INN::Config::spool: $!";
 $opt_r=0;      # make a report
 $opt_t=30;     # check interval in minutes
 $opt_f=50000;  # required space in kilobytes
@@ -256,8 +257,7 @@
 $opt_M=0;      # install man page
 getopts("rt:f:i:m:x:Nv:M");
 
-$_=$inn::pathdb; $_=$inn::pathnews; # shut up warning
-$sfile="$inn::pathdb/thdexpstat";
+$sfile="$INN::Config::pathdb/thdexpstat";
 $ID=~/ ([^,]+,v [^ ]+)/; $ID=$1;
 
 if ($opt_M) {
@@ -265,7 +265,7 @@
     $0=~m:^(.*)/([^/]+)$:;
     chdir $1 || die "chdir $1";
     exec "pod2man --section=8 --center='Contributed News Software'" .
-      " --release='$ID' $2 >$inn::pathnews/man/man8/thdexpire.8";
+      " --release='$ID' $2 >$INN::Config::pathnews/man/man8/thdexpire.8";
 }
 
 if ($opt_r) {
@@ -275,7 +275,7 @@
     exit 0;
 }
 
-(system "shlock", "-p", $$, "-f", "$inn::innddir/thdexpire.pid")>>8==0
+(system "$INN::Config::newsbin/shlock", "-p", $$, "-f", "$INN::Config::innddir/thdexpire.pid")>>8==0
   || die "Already running";
 tie(%S, SDBM_File, $sfile, O_RDWR|O_CREAT, 0664) || die "open $sfile: $!";
 $SIG{'TERM'}=$SIG{'INT'}='finish';
@@ -284,7 +284,7 @@
 
 undef @c;
 $NOW=time; $ac=$cc=0;
-opendir(CD, ".") || &err("opendir $inn::spool: $!");
+opendir(CD, ".") || &err("opendir $INN::Config::spool: $!");
 while ($cd=readdir(CD), defined($cd)) {
     $cd=~/^time(caf)?-([0-9a-f][0-9a-f])$/i || next;
     $c{hex($2)}=1 unless hex($2)>200;
@@ -302,7 +302,7 @@
 printf "Checked %d articles, %d CAFs in %d seconds\n", $ac, $cc, time-$NOW
   if ($ac+$cc>0 && $opt_v>0);
 
-chdir $inn::spool || die "chdir $inn::spool: $!";
+chdir $INN::Config::spool || die "chdir $INN::Config::spool: $!";
 while (1) {
     $S{"lastrun"}=$NOW=time;
     printf "%s\n", &wtime($NOW) if ($opt_v>0);
@@ -353,14 +353,14 @@
 	    }
 	}
     }
-    if (open(D, "inndf $x |")) {
+    if (open(D, "$INN::Config::newsbin/inndf $x |")) {
 	while (<D>) {
 	    @S=split(/\s+/, $_);
 	    $needk{$dev{$S[0]}}=$opt_f-$S[1] unless ($S[0] eq "/");
 	}
 	close D;
     }
-    if (open(D, "inndf -i $x |")) {
+    if (open(D, "$INN::Config::newsbin/inndf -i $x |")) {
 	while (<D>) {
 	    @S=split(/\s+/, $_);
 	    $needi{$dev{$S[0]}}=$opt_i-$S[1] unless ($S[0] eq "/");
@@ -438,7 +438,7 @@
     if (!$S{"blocksize$;$C$;CAF"}) {
 	# Determine filesystem blocksize
 	# unfortunately no way in perl to statfs
-	my $x=sprintf("%s/timecaf-%02x/test%d", $inn::spool, $C, $$);
+	my $x=sprintf("%s/timecaf-%02x/test%d", $INN::Config::spool, $C, $$);
 	if (open(A, ">$x")) {
 	    print A "X" x 4096;
 	    close A;
@@ -456,7 +456,7 @@
     return if ($S{"oldest$;$C"});
     my $oldest=time;
     $S{"oldest$;$C"}=$oldest;
-    my $base=sprintf("%s/time-%02x", $inn::spool, $C);
+    my $base=sprintf("%s/time-%02x", $INN::Config::spool, $C);
     my $count=0;
     if (chdir $base) {
 	printf "Finding oldest in class %d (%s)\n", $C, $base if ($opt_v>0);
@@ -484,7 +484,7 @@
 	closedir D0;
 	$ac+=$count;
     }
-    $base=sprintf("%s/timecaf-%02x", $inn::spool, $C);
+    $base=sprintf("%s/timecaf-%02x", $INN::Config::spool, $C);
     if (chdir $base) {
 	printf "Finding oldest in class %d (%s)\n", $C, $base if ($opt_v>0);
 	opendir(D0, ".");
@@ -641,7 +641,7 @@
 sub finish
 {
     untie(%S);
-    unlink "$inn::innddir/thdexpire.pid";
+    unlink "$INN::Config::innddir/thdexpire.pid";
     exit 0;
 }
 #-----------------------------------------------------------------------------

Modified: control/controlchan.in
===================================================================
--- control/controlchan.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/controlchan.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
 #! /usr/bin/perl -w
-require "/usr/local/news/lib/innshellvars.pl";
+# fixscript will replace this line with code to load INN::Config
 
 ##  $Id$
 ##
@@ -51,21 +51,21 @@
 if ($use_syslog) {
     eval "sub Sys::Syslog::_PATH_LOG { '/dev/log' }" if $^O eq 'dec_osf';
     Sys::Syslog::setlogsock('unix') if $^O =~ /linux|dec_osf|freebsd|darwin/;
-    openlog('controlchan', 'pid', $inn::syslog_facility);
+    openlog('controlchan', 'pid', $INN::Config::syslog_facility);
 }
 logmsg('starting');
 
 # load modules from the control directory #################################
-opendir(CTL, $inn::controlprogs)
-    or logdie("Cannot open $inn::controlprogs: $!", 'crit');
+opendir(CTL, $INN::Config::controlprogs)
+    or logdie("Cannot open $INN::Config::controlprogs: $!", 'crit');
 foreach (readdir CTL) {
-    next if not /^([a-z\.]+\.pl)$/ or not -f "$inn::controlprogs/$_";
-    eval { require "$inn::controlprogs/$1" };
+    next if not /^([a-z\.]+\.pl)$/ or not -f "$INN::Config::controlprogs/$_";
+    eval { require "$INN::Config::controlprogs/$1" };
     if ($@) {
         $@ =~ s/\n/  /g;
         logdie($@, 'crit');
     }
-    logmsg("loaded $inn::controlprogs/$1", 'debug');
+    logmsg("loaded $INN::Config::controlprogs/$1", 'debug');
 }
 closedir CTL;
 
@@ -167,9 +167,6 @@
 closelog() if $use_syslog;
 exit 0;
 
-print $inn::most_logs.$inn::syslog_facility.$inn::mta.
-    $inn::newsmaster.$inn::locks; # lint food
-
 # misc functions ##########################################################
 sub parse_article {
     my ($artfh, $headers, $body, $hdr) = @_;
@@ -222,13 +219,13 @@
 
 # Read and cache control.ctl.
 sub readctlfile {
-    my $mtime = (stat($inn::ctlfile))[9];
+    my $mtime = (stat($INN::Config::ctlfile))[9];
     return $cachedctl if $lastctl == $mtime;    # mtime has not changed.
     $lastctl = $mtime;
 
     my @ctllist;
-    open(CTLFILE, $inn::ctlfile)
-        or logdie("Cannot open $inn::ctlfile: $!", 'crit');
+    open(CTLFILE, $INN::Config::ctlfile)
+        or logdie("Cannot open $INN::Config::ctlfile: $!", 'crit');
     while (<CTLFILE>) {
         chop;
         # Not a comment or blank? Convert wildmat to regex
@@ -290,7 +287,7 @@
 
     if ($action =~ /^verify-(.+)/) {
         my $keyowner = $1;
-        if ($inn::pgpverify and $inn::pgpverify =~ /^(?:true|on|yes)$/i) {
+        if ($INN::Config::pgpverify and $INN::Config::pgpverify =~ /^(?:true|on|yes)$/i) {
             my $pgpresult = defined &local_pgpverify ?
                 local_pgpverify($token, $headers, $body) : pgpverify($token);
             if ($keyowner eq $pgpresult) {
@@ -326,10 +323,10 @@
         $logfile = 'control';
     }
 
-    $logfile = "$inn::most_logs/$logfile.log" unless $logfile =~ /^\//;
+    $logfile = "$INN::Config::most_logs/$logfile.log" unless $logfile =~ /^\//;
     my $lockfile = $logfile;
     $lockfile =~ s#.*/##;
-    $lockfile = "$inn::locks/LOCK.$lockfile";
+    $lockfile = "$INN::Config::locks/LOCK.$lockfile";
     shlock($lockfile);
 
     open(LOGFILE, ">>$logfile") or logdie("Cannot open $logfile: $!");
@@ -372,7 +369,7 @@
         my $pid = open(ART, '-|');
         logdie('Cannot fork: ' . $!) if $pid < 0;
         if ($pid == 0) {
-            exec("$inn::newsbin/sm", '-q', $token) or
+            exec("$INN::Config::newsbin/sm", '-q', $token) or
                 logdie("Cannot exec sm: $!");
         }
         return *ART;
@@ -387,10 +384,10 @@
     my $token = shift;
 
     if ($token =~ /^\@.+\@$/) {
-        open(PGPCHECK, "$inn::newsbin/sm -q $token "
-            . "| $inn::newsbin/pgpverify |") or goto ERROR;
+        open(PGPCHECK, "$INN::Config::newsbin/sm -q $token "
+            . "| $INN::Config::newsbin/pgpverify |") or goto ERROR;
     } else {
-        open(PGPCHECK, "$inn::newsbin/pgpverify < $token |") or goto ERROR;
+        open(PGPCHECK, "$INN::Config::newsbin/pgpverify < $token |") or goto ERROR;
     }
     my $pgpresult = <PGPCHECK>;
     close PGPCHECK or goto ERROR;
@@ -405,7 +402,7 @@
 sub ctlinnd {
     my ($cmd, @args) = @_;
 
-    my $st = system("$inn::newsbin/ctlinnd", '-s', $cmd, @args);
+    my $st = system("$INN::Config::newsbin/ctlinnd", '-s', $cmd, @args);
     logdie('Cannot run ctlinnd: ' . $!) if $st == -1;
     logdie('ctlinnd returned status ' . ($st & 255)) if $st > 0;
 }
@@ -415,7 +412,7 @@
 
     my $locktry = 0;
     while ($locktry < 60) {
-        if (system("$inn::newsbin/shlock", '-p', $$, '-f', $lockfile) == 0) {
+        if (system("$INN::Config::newsbin/shlock", '-p', $$, '-f', $lockfile) == 0) {
             return 1;
         }
         $locktry++;
@@ -436,17 +433,17 @@
 # If $body is not defined, returns a file handle which must be closed.
 # Don't forget checking the return value of close().
 # $addresses may be a scalar or a reference to a list of addresses.
-# If not defined, $inn::newsmaster is the default.
+# If not defined, $INN::Config::newsmaster is the default.
 # parts of this code stolen from innmail.pl
 sub sendmail {
     my ($subject, $addresses, $body) = @_;
-    $addresses = [ $addresses || $inn::newsmaster ] if not ref $addresses;
+    $addresses = [ $addresses || $INN::Config::newsmaster ] if not ref $addresses;
     $subject ||= '(no subject)';
 
     # fix up all addresses
     my @addrs = map { s#[^-a-zA-Z0-9+_.@%]##g; $_ } @$addresses;
 
-    my $sm = $inn::mta;
+    my $sm = $INN::Config::mta;
     if ($sm =~ /%s/) {
         $sm = sprintf($sm, join(' ', @addrs));
     } else {

Modified: control/gpgverify.in
===================================================================
--- control/gpgverify.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/gpgverify.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#!/usr/bin/perl -w
-require '/etc/news/innshellvars.pl';
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # written April 1996, tale at isc.org (David C Lawrence)
 # mostly rewritten 2001-03-21 by Marco d'Itri <md at linux.it>
@@ -18,12 +18,12 @@
 # if you keep your keyring somewhere that is not the default used by gpg,
 # change the location below.
 my $keyring;
-if ($inn::newsetc && -d "$inn::newsetc/pgp") {
-  $keyring = $inn::newsetc . '/pgp/pubring.gpg';
+if ($INN::Config::newsetc && -d "$INN::Config::newsetc/pgp") {
+  $keyring = $INN::Config::newsetc . '/pgp/pubring.gpg';
 }
 
 # If you have INN and the script is able to successfully include your
-# innshellvars.pl file, the value of the next two variables will be
+# INN::Config module, the value of the next two variables will be
 # overridden.
 my $tmpdir = '/var/log/news/';
 my $syslog_facility = 'news';
@@ -42,8 +42,8 @@
 ##############################################################################
 ################ NO USER SERVICEABLE PARTS BELOW THIS COMMENT ################
 ##############################################################################
-my $tmp = ($inn::pathtmp ? $inn::pathtmp : $tmpdir) . "/pgp$$";
-$syslog_facility = $inn::syslog_facility if $inn::syslog_facility;
+my $tmp = ($INN::Config::pathtmp ? $INN::Config::pathtmp : $tmpdir) . "/pgp$$";
+$syslog_facility = $INN::Config::syslog_facility if $INN::Config::syslog_facility;
 
 my $nntp_format = 0;
 $0 =~ s#^.*/##;                # trim /path/to/prog to prog
@@ -52,8 +52,8 @@
 
 # Path to gpg binary
 my $gpg;
-if ($inn::gpgv) { 
-    $gpg = $inn::gpgv;
+if ($INN::Config::gpgv) { 
+    $gpg = $INN::Config::gpgv;
 } else {
     foreach (split(/:/, $ENV{PATH}), qw(/usr/local/bin /opt/gnu/bin)) {
 	if (-x "$_/gpgv") {

Modified: control/modules/checkgroups.pl
===================================================================
--- control/modules/checkgroups.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/checkgroups.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -30,9 +30,9 @@
 
 If you want to process it, feed the body
 of the message to docheckgroups while logged
-in as user ID "$inn::newsuser":
+in as user ID "$INN::Config::newsuser":
 
-$inn::pathbin/docheckgroups '$newsgrouppats' <<zRbJ
+$INN::Config::pathbin/docheckgroups '$newsgrouppats' <<zRbJ
 END
         print $mail map { s/^~/~~/; "$_\n" } @$body;
         print $mail "zRbJ\n";
@@ -55,7 +55,7 @@
 sub docheckgroups {
     my ($body, $newsgrouppats, $log, $sender) = @_;
 
-    my $tempfile = "$inn::tmpdir/checkgroups.$$";
+    my $tempfile = "$INN::Config::tmpdir/checkgroups.$$";
     open(TEMPART, ">$tempfile.art")
         or logdie("Cannot open $tempfile.art: $!");
     print TEMPART map { s/^~/~~/; "$_\n" } @$body;
@@ -65,7 +65,7 @@
     open(OLDOUT, '>&STDOUT') or die $!;
     open(STDIN, "$tempfile.art") or die $!;
     open(STDOUT, ">$tempfile") or die $!;
-    my $st = system("$inn::pathbin/docheckgroups", $newsgrouppats);
+    my $st = system("$INN::Config::pathbin/docheckgroups", $newsgrouppats);
     logdie('Cannot run docheckgroups: ' . $!) if $st == -1;
     logdie('docheckgroups returned status ' . ($st & 255)) if $st > 0;
     close(STDIN);

Modified: control/modules/ihave.pl
===================================================================
--- control/modules/ihave.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/ihave.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -32,8 +32,8 @@
             logmsg("ihave $sender");
         }
     } elsif ($action eq 'doit') {
-        my $tempfile = "$inn::tmpdir/ihave.$$";
-        open(GREPHIST, "|grephistory -i > $tempfile")
+        my $tempfile = "$INN::Config::tmpdir/ihave.$$";
+        open(GREPHIST, "| $INN::Config::newsbin/grephistory -i > $tempfile")
             or logdie('Cannot run grephistory: ' . $!);
 	foreach (@$body) {
             print GREPHIST "$_\n";
@@ -41,11 +41,11 @@
         close GREPHIST;
 
         if (-s $tempfile) {
-            my $inews = open("$inn::inews -h")
+            my $inews = open("$INN::Config::inews -h")
                 or logdie('Cannot run inews: ' . $!);
             print $inews "Newsgroups: to.$site\n"
-               . "Subject: cmsg sendme $inn::pathhost\n"
-               . "Control: sendme $inn::pathhost\n\n";
+               . "Subject: cmsg sendme $INN::Config::pathhost\n"
+               . "Control: sendme $INN::Config::pathhost\n\n";
             open(TEMPFILE, $tempfile) or logdie("Cannot open $tempfile: $!");
             print $inews $_ while <TEMPFILE>;  
             close $inews or die $!;

Modified: control/modules/newgroup.pl
===================================================================
--- control/modules/newgroup.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/newgroup.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -39,7 +39,7 @@
     }
 
     # Scan active to see what sort of change we are making.
-    open(ACTIVE, $inn::active) or logdie("Cannot open $inn::active: $!");
+    open(ACTIVE, $INN::Config::active) or logdie("Cannot open $INN::Config::active: $!");
     my @oldgroup;
     while (<ACTIVE>) {
         next unless /^(\Q$groupname\E)\s\d+\s\d+\s(\w)/;
@@ -73,8 +73,8 @@
           $ngdesc .= ' (Moderated)' if $modflag eq 'moderated';
       }
       # Scan newsgroups to see the previous description, if any.
-      open(NEWSGROUPS, $inn::newsgroups)
-          or logdie("Cannot open $inn::newsgroups: $!");
+      open(NEWSGROUPS, $INN::Config::newsgroups)
+          or logdie("Cannot open $INN::Config::newsgroups: $!");
       while (<NEWSGROUPS>) {
           if (/^\Q$groupname\E\s+(.*)/) {
               $olddesc = $1;
@@ -109,7 +109,7 @@
 to $status.
 
 If this is acceptable, type:
-  $inn::newsbin/ctlinnd newgroup $groupname $modcmd $sender
+  $INN::Config::newsbin/ctlinnd newgroup $groupname $modcmd $sender
 
 And do not forget to update the corresponding description in your
 newsgroups file.
@@ -149,10 +149,10 @@
 
 sub update_desc {
     my ($name, $desc) = @_;
-    shlock("$inn::locks/LOCK.newsgroups");
-    my $tempfile = "$inn::newsgroups.$$";
-    open(NEWSGROUPS, $inn::newsgroups)
-        or logdie("Cannot open $inn::newsgroups: $!");
+    shlock("$INN::Config::locks/LOCK.newsgroups");
+    my $tempfile = "$INN::Config::newsgroups.$$";
+    open(NEWSGROUPS, $INN::Config::newsgroups)
+        or logdie("Cannot open $INN::Config::newsgroups: $!");
     open(TEMPFILE, ">$tempfile") or logdie("Cannot open $tempfile: $!");
     while (<NEWSGROUPS>) {
         next if (/^\Q$name\E\s+(.*)/);
@@ -168,9 +168,9 @@
     }
     close TEMPFILE;
     close NEWSGROUPS;
-    rename($tempfile, $inn::newsgroups)
+    rename($tempfile, $INN::Config::newsgroups)
         or logdie("Cannot rename $tempfile: $!");
-    unlink("$inn::locks/LOCK.newsgroups", $tempfile);
+    unlink("$INN::Config::locks/LOCK.newsgroups", $tempfile);
 }
 
 # Check the group name.  This is partially derived from C News.

Modified: control/modules/rmgroup.pl
===================================================================
--- control/modules/rmgroup.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/rmgroup.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -23,7 +23,7 @@
     my ($groupname) = @$par;
 
     # Scan active to see what sort of change we are making.
-    open(ACTIVE, $inn::active) or logdie("Cannot open $inn::active: $!");
+    open(ACTIVE, $INN::Config::active) or logdie("Cannot open $INN::Config::active: $!");
     my @oldgroup;
     while (<ACTIVE>) {
         next unless /^(\Q$groupname\E)\s\d+\s\d+\s(\w)/;
@@ -47,7 +47,7 @@
 to be $status.
 
 If this is acceptable, type:
-  $inn::newsbin/ctlinnd rmgroup $groupname
+  $INN::Config::newsbin/ctlinnd rmgroup $groupname
 
 And do not forget to remove the corresponding description, if any,
 from your newsgroups file.
@@ -69,19 +69,19 @@
     } elsif ($action eq 'doit' and $status !~ /(no change|unapproved)/) {
         ctlinnd('rmgroup', $groupname);
         # Update newsgroups too.
-        shlock("$inn::locks/LOCK.newsgroups");
-        open(NEWSGROUPS, $inn::newsgroups)
-            or logdie("Cannot open $inn::newsgroups: $!");
-        my $tempfile = "$inn::newsgroups.$$";
+        shlock("$INN::Config::locks/LOCK.newsgroups");
+        open(NEWSGROUPS, $INN::Config::newsgroups)
+            or logdie("Cannot open $INN::Config::newsgroups: $!");
+        my $tempfile = "$INN::Config::newsgroups.$$";
         open(TEMPFILE, ">$tempfile") or logdie("Cannot open $tempfile: $!");
         while (<NEWSGROUPS>) {
             print TEMPFILE $_ if not /^\Q$groupname\E\s/;
         }
         close TEMPFILE;
         close NEWSGROUPS;
-        rename($tempfile, $inn::newsgroups)
+        rename($tempfile, $INN::Config::newsgroups)
             or logdie("Cannot rename $tempfile: $!");
-        unlink "$inn::locks/LOCK.newsgroups";
+        unlink "$INN::Config::locks/LOCK.newsgroups";
         unlink $tempfile;
 
         logger($log, "rmgroup $groupname $status $sender", $headers, $body)

Modified: control/modules/sendme.pl
===================================================================
--- control/modules/sendme.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/sendme.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -32,8 +32,8 @@
             logmsg("sendme from $sender");
         }
     } elsif ($action eq 'doit') {
-        my $tempfile = "$inn::tmpdir/sendme.$$";
-        open(GREPHIST, "|grephistory -s > $tempfile")
+        my $tempfile = "$INN::Config::tmpdir/sendme.$$";
+        open(GREPHIST, "| $INN::Config::newsbin/grephistory -s > $tempfile")
             or logdie("Cannot run grephistory: $!");
 	foreach (@$body) {
             print GREPHIST "$_\n";
@@ -42,8 +42,8 @@
 
         if (-s $tempfile and $site =~ /^[a-zA-Z0-9.-_]+$/) {
             open(TEMPFILE, $tempfile) or logdie("Cannot open $tempfile: $!");
-            open(BATCH, ">>$inn::batch/$site.work")
-                or logdie("Cannot open $inn::batch/$site.work: $!");
+            open(BATCH, ">>$INN::Config::batch/$site.work")
+                or logdie("Cannot open $INN::Config::batch/$site.work: $!");
             print BATCH $_ while <TEMPFILE>;
             close BATCH;
             close TEMPFILE;

Modified: control/modules/sendsys.pl
===================================================================
--- control/modules/sendsys.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/sendsys.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -29,7 +29,7 @@
 of your newsgroups file.
 
 If this is acceptable, type:
-  $inn::mailcmd -s "sendsys reply from $inn::pathhost" $replyto < $inn::newsfeeds
+  $INN::Config::mailcmd -s "sendsys reply from $INN::Config::pathhost" $replyto < $INN::Config::newsfeeds
 
 The control message follows:
 
@@ -45,13 +45,13 @@
             logmsg("sendsys $sender");
         }
     } elsif ($action =~ /^(doit|doifarg)$/) {
-        if ($action eq 'doifarg' and $where ne $inn::pathhost) {
+        if ($action eq 'doifarg' and $where ne $INN::Config::pathhost) {
             logmsg("skipped sendsys $sender");
             return;
         }
-        my $mail = sendmail("sendsys reply from $inn::pathhost", $replyto);
-        open(NEWSFEEDS, $inn::newsfeeds)
-            or logdie("Cannot open $inn::newsfeeds: $!");
+        my $mail = sendmail("sendsys reply from $INN::Config::pathhost", $replyto);
+        open(NEWSFEEDS, $INN::Config::newsfeeds)
+            or logdie("Cannot open $INN::Config::newsfeeds: $!");
         print $mail $_ while <NEWSFEEDS>;
         print $mail "\n";
         close NEWSFEEDS;

Modified: control/modules/senduuname.pl
===================================================================
--- control/modules/senduuname.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/senduuname.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -28,7 +28,7 @@
 $sender has requested information about your UUCP name.
 
 If this is acceptable, type:
-  uuname | $inn::mailcmd -s "senduuname reply from $inn::pathhost" $replyto
+  uuname | $INN::Config::mailcmd -s "senduuname reply from $INN::Config::pathhost" $replyto
 
 The control message follows:
 
@@ -44,11 +44,11 @@
             logmsg("senduuname $sender");
         }
     } elsif ($action =~ /^(doit|doifarg)$/) {
-        if ($action eq 'doifarg' and $where ne $inn::pathhost) {
+        if ($action eq 'doifarg' and $where ne $INN::Config::pathhost) {
             logmsg("skipped senduuname $sender");
             return;
         }
-        my $mail = sendmail("senduuname reply from $inn::pathhost", $replyto);
+        my $mail = sendmail("senduuname reply from $INN::Config::pathhost", $replyto);
         open(UUNAME, 'uuname|') or logdie("Cannot run uuname: $!");
         print $mail $_ while <UUNAME>;
         close UUNAME or logdie("Cannot run uuname: $!");

Modified: control/modules/version.pl
===================================================================
--- control/modules/version.pl	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/modules/version.pl	2007-09-18 19:44:47 UTC (rev 7683)
@@ -22,7 +22,7 @@
         $headers, $body) = @_;
     my ($where) = @$par;
 
-    my $version = $inn::version || '(unknown version)';
+    my $version = $INN::Config::version || '(unknown version)';
 
     if ($action eq 'mail') {
         my $mail = sendmail("version $sender");
@@ -31,7 +31,7 @@
 news software version.
 
 If this is acceptable, type:
-  echo "InterNetNews $version" | $inn::mailcmd -s "version reply from $inn::pathhost" $replyto
+  echo "InterNetNews $version" | $INN::Config::mailcmd -s "version reply from $INN::Config::pathhost" $replyto
 
 The control message follows:
 
@@ -47,11 +47,11 @@
             logmsg("version $sender");
         }
     } elsif ($action =~ /^(doit|doifarg)$/) {
-        if ($action eq 'doifarg' and $where ne $inn::pathhost) {
+        if ($action eq 'doifarg' and $where ne $INN::Config::pathhost) {
             logmsg("skipped version $sender");
             return;
         }
-        sendmail("version reply from $inn::pathhost", $replyto,
+        sendmail("version reply from $INN::Config::pathhost", $replyto,
             [ "InterNetNews $version\n" ]);
 
         logger($log, "version $sender to $replyto", $headers, $body) if $log;

Modified: control/perl-nocem.in
===================================================================
--- control/perl-nocem.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/perl-nocem.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#!/usr/bin/perl -w
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 ##############################################################################
 # perl-nocem - a NoCeM-on-spool implementation for INN 2.x.
@@ -23,7 +23,7 @@
 # If nobody can't fix it just ship the program with this line commented.
 #use Time::HiRes qw(time);
 
-my $keyring = $inn::pathetc . '/pgp/ncmring.gpg';
+my $keyring = $INN::Config::pathetc . '/pgp/ncmring.gpg';
 
 # XXX To be moved to a config file.
 #sub local_want_cancel_id {
@@ -47,9 +47,9 @@
 my $log_open = 0;
 my $nntp_open = 0;
 my $last_cancel = 0;
-my $socket_timeout = $inn::peertimeout - 100;
+my $socket_timeout = $INN::Config::peertimeout - 100;
 
-my $logfile = $inn::pathlog . '/perl-nocem.log';
+my $logfile = $INN::Config::pathlog . '/perl-nocem.log';
 
 # initialization and main loop ###############################################
 
@@ -58,16 +58,16 @@
 if ($use_syslog) {
     eval "sub Sys::Syslog::_PATH_LOG { '/dev/log' }" if $^O eq 'dec_osf';
     Sys::Syslog::setlogsock('unix') if $^O =~ /linux|dec_osf/;
-    openlog('nocem', '', $inn::syslog_facility);
+    openlog('nocem', '', $INN::Config::syslog_facility);
 }
 
-if (not $inn::gpgv) {
+if (not $INN::Config::gpgv) {
     logmsg('cannot find the gpgv binary', 'err');
     sleep 5;
     exit 1;
 }
 
-if ($inn::version and not $inn::version =~ /^INN 2\.[0123]\./) {
+if ($INN::Config::version and not $INN::Config::version =~ /^INN 2\.[0123]\./) {
     $cancel = \&cancel_nntp;
 } else {
     $cancel = \&cancel_ctlinnd;
@@ -193,7 +193,7 @@
 
     # we do want it, so read the entire article. Also copy it to
     # a temp file so that we can check the PGP signature when done.
-    my $tmpfile = "$inn::pathtmp/nocem.$$";
+    my $tmpfile = "$INN::Config::pathtmp/nocem.$$";
     if (not open(OFD, ">$tmpfile")) {
         logmsg("cannot open temp file $tmpfile: $!", 'err');
         return;
@@ -283,7 +283,7 @@
     }
     if ($pid == 0) {
         open(STDERR, '>&STDOUT');
-        exec($inn::gpgv, '--status-fd=1',
+        exec($INN::Config::gpgv, '--status-fd=1',
             $keyring ? '--keyring=' . $keyring : '', $art);
         exit 126;
     }
@@ -295,11 +295,11 @@
         if ($? >> 8) {
             $status = $? >> 8;
         } else {
-            logmsg("Article $msgid: $inn::gpgv killed by signal " . ($? & 255));
+            logmsg("Article $msgid: $INN::Config::gpgv killed by signal " . ($? & 255));
             return 0;
         }
     }
-#    logmsg("Command line was: $inn::gpg $pgpargs $art", 'debug');
+#    logmsg("Command line was: $INN::Config::gpg $pgpargs $art", 'debug');
 #    logmsg("Full PGP output: >>>$_<<<", 'debug');
 
     if (/^\[GNUPG:\]\s+GOODSIG\s+\S+\s+(.*)/m) {
@@ -318,7 +318,7 @@
         # some other error we don't know about happened.
         # 126 is returned by the child if exec fails.
         s/ at \S+ line \d+\.\n$//; s/\n/_/;
-        logmsg("Article $msgid: $inn::gpgv exited "
+        logmsg("Article $msgid: $INN::Config::gpgv exited "
             . (($status == 126) ? "($_)" : "with status $status"), 'err');
     }
     return 0;
@@ -335,7 +335,7 @@
             return undef;
         }
         if ($pid == 0) {
-            exec("$inn::newsbin/sm", '-q', $token) or
+            exec("$INN::Config::newsbin/sm", '-q', $token) or
                 logmsg("Cannot exec sm: $!", 'err');
             return undef;
         }
@@ -359,7 +359,7 @@
             my $pid;
             sleep 5 until (defined ($pid = fork));
             if ($pid == 0) {
-                exec "$inn::pathbin/ctlinnd", '-s', '-t', '180',
+                exec "$INN::Config::pathbin/ctlinnd", '-s', '-t', '180',
                     'cancel', $msgid;
                 exit 126;
             }
@@ -392,7 +392,7 @@
             logmsg("socket: $!", 'err');
             goto ERR;
         }
-        if (not connect(NNTP, sockaddr_un($inn::pathrun . '/nntpin'))) {
+        if (not connect(NNTP, sockaddr_un($INN::Config::pathrun . '/nntpin'))) {
             logmsg("connect: $!", 'err');
             goto ERR;
         }
@@ -430,7 +430,7 @@
 }
 
 sub read_ctlfile {
-    my $permfile = $inn::pathetc . '/nocem.ctl';
+    my $permfile = $INN::Config::pathetc . '/nocem.ctl';
 
     unless (open(CTLFILE, $permfile)) {
         logmsg("Cannot open $permfile: $!", 'err');
@@ -480,10 +480,6 @@
     exit 1;
 }
 
-# lint food
-print $inn::pathrun.$inn::pathlog.$inn::pathetc.$inn::newsbin.$inn::pathbin
-    . $inn::pathtmp.$inn::syslog_facility.$inn::peertimeout;
-
 __END__
 
 =head1 NAME

Modified: control/pgpverify.in
===================================================================
--- control/pgpverify.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ control/pgpverify.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,10 +1,10 @@
 #! /usr/bin/perl -w
-# do '@LIBDIR@/innshellvars.pl';
-# If running inside INN, uncomment the above and point to innshellvars.pl.
+# use lib '@LIBPERLDIR@'; use INN::Config;
+# If running inside INN, uncomment the above and point to INN::Config.
 #
 # Written April 1996, <tale at isc.org> (David C Lawrence)
 # Currently maintained by Russ Allbery <rra at stanford.edu>
-# Version 1.27, 2005-07-02
+# Version 1.28, 2007-09-18
 #
 # NOTICE TO INN MAINTAINERS:  The version that is shipped with INN is the
 # same as the version that I make available to the rest of the world
@@ -16,6 +16,10 @@
 # me about it; I want to know what old versions of Perl are still used in
 # practice.
 #
+# Changes from 1.27 -> 1.28
+# -- Use the INN::Config Perl module instead of innshellvars.pl to
+#    accomodate the new build process of INN 2.5.
+#
 # Changes from 1.26 -> 1.27
 # -- Default to pubring.gpg when trustedkeys.gpg is not found in the
 #    default key location, for backward compatibility.
@@ -120,26 +124,26 @@
 # Path to the GnuPG gpgv binary, if you have GnuPG.  If you do, this will
 # be used in preference to PGP.  For most current control messages, you
 # need a version of GnuPG that can handle RSA signatures.  If you have INN
-# and the script is able to successfully include your innshellvars.pl
-# file, the value of $inn::gpgv will override this.
+# and the script is able to successfully include your INN::Config module,
+# the value of $INN::Config::gpgv will override this.
 # $gpgv = '/usr/local/bin/gpgv';
 
 # Path to pgp binary; for PGP 5.0, set the path to the pgpv binary.  If
 # you have INN and the script is able to successfully include your
-# innshellvars.pl file, the value of $inn::pgp will override this.
+# INN::Config module, the value of $INN::Config::pgp will override this.
 $pgp = '/usr/local/bin/pgp';
 
 # If you keep your keyring somewhere that is not the default used by pgp,
 # uncomment the next line and set appropriately.  If you have INN and the
-# script is able to successfully include your innshellvars.pl file, this
-# will be set to $inn::newsetc/pgp if that directory exists unless you set
-# it explicitly.  GnuPG will use a file named pubring.gpg in this
+# script is able to successfully include your INN::Config module, this
+# will be set to $INN::Config::newsetc/pgp if that directory exists unless
+# you set it explicitly.  GnuPG will use a file named pubring.gpg in this
 # directory.
 # $keyring = '/path/to/your/pgp/config';
 
 # If you have INN and the script is able to successfully include your
-# innshellvars.pl file, the value of $inn::pathtmp and $inn::locks will
-# override these.
+# INN::Config module, the value of $INN::Config::pathtmp and
+# $INN::Config::locks will override these.
 $tmpdir = "/tmp";
 $lockdir = $tmpdir;
 
@@ -172,8 +176,8 @@
 # and level to use, as would be found in syslog.conf.  For various
 # reasons, it is impossible to economically have the script figure out how
 # to do syslogging correctly on the machine.  If you have INN and the
-# script is able to successfully include you innshellvars.pl file, then
-# the value of $inn::syslog_facility will override this value of
+# script is able to successfully include you INN::Config module, then
+# the value of $INN::Config::syslog_facility will override this value of
 # $syslog_facility; $syslog_level is unaffected.
 $syslog_facility = 'news';
 $syslog_level = 'err';
@@ -209,15 +213,15 @@
 # the script manually.
 die "Usage: $0 < message\n" if @ARGV != 0;
 
-# Grab various defaults from innshellvars.pl if running inside INN.
-$pgp = $inn::pgp
-    if $inn::pgp && $inn::pgp ne "no-pgp-found-during-configure";
-$gpgv = $inn::gpgv if $inn::gpgv;
-$tmp = ($inn::pathtmp ? $inn::pathtmp : $tmpdir) . "/pgp$$";
-$lockdir = $inn::locks if $inn::locks;
-$syslog_facility = $inn::syslog_facility if $inn::syslog_facility;
-if (! $keyring && $inn::newsetc) {
-  $keyring = $inn::newsetc . '/pgp' if -d $inn::newsetc . '/pgp';
+# Grab various defaults from INN::Config if running inside INN.
+$pgp = $INN::Config::pgp
+    if $INN::Config::pgp && $INN::Config::pgp ne "no-pgp-found-during-configure";
+$gpgv = $INN::Config::gpgv if $INN::Config::gpgv;
+$tmp = ($INN::Config::pathtmp ? $INN::Config::pathtmp : $tmpdir) . "/pgp$$";
+$lockdir = $INN::Config::locks if $INN::Config::locks;
+$syslog_facility = $INN::Config::syslog_facility if $INN::Config::syslog_facility;
+if (! $keyring && $INN::Config::newsetc) {
+  $keyring = $INN::Config::newsetc . '/pgp' if -d $INN::Config::newsetc . '/pgp';
 }
 
 # Trim /path/to/prog to prog for error messages.

Modified: doc/pod/hacking.pod
===================================================================
--- doc/pod/hacking.pod	2007-09-18 13:14:28 UTC (rev 7682)
+++ doc/pod/hacking.pod	2007-09-18 19:44:47 UTC (rev 7683)
@@ -303,6 +303,11 @@
 substitute values in them.  Any values needed at run-time should instead
 be available from all of the different innshellvars.
 
+As for Perl, the INN::Config module has the same features as
+F<innshellvars.pl> (only kept for compatibility reasons with old scripts
+not shipped with INN); however, it can be safely used with warnings on
+in Perl scripts.
+
 See the existing scripts for examples of how this is done.
 
 =head1 Include Files

Modified: frontends/cnfsheadconf.in
===================================================================
--- frontends/cnfsheadconf.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ frontends/cnfsheadconf.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 #  $Id$
 # 
@@ -23,8 +23,8 @@
 # required for >32bit ints
 require 'bigint.pl';
 
-my($conffile) = "$inn::pathetc/cycbuff.conf";
-my($storageconf) = "$inn::pathetc/storage.conf";
+my($conffile) = "$INN::Config::pathetc/cycbuff.conf";
+my($storageconf) = "$INN::Config::pathetc/storage.conf";
 
 # Hex to bigint conversion routine
 # bhex(HEXSTRING) returns BIGINT  (with leading + chopped off)

Modified: frontends/cnfsstat.in
===================================================================
--- frontends/cnfsstat.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ frontends/cnfsstat.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 #  $Id$
 # 
@@ -14,14 +14,14 @@
 # 
 #  bigint support added by Duane Currie (sandman at hub.org) 1998
 
-use vars qw($opt_l $opt_h $opt_a $opt_s);
+use vars qw($opt_l $opt_h $opt_a $opt_s $opt_p $opt_P);
 use Getopt::Long;
 use Math::BigInt;
 use Math::BigFloat;
 use English;
 
-my($conffile) = "$inn::pathetc/cycbuff.conf";
-my($storageconf) = "$inn::pathetc/storage.conf";
+my($conffile) = "$INN::Config::pathetc/cycbuff.conf";
+my($storageconf) = "$INN::Config::pathetc/storage.conf";
 
 sub usage {
     print <<_end_;
@@ -38,7 +38,7 @@
 	-h:          This information
 	-m <BUFFER>: prints out information suitable for mrtg
 	-p:	     prints out an mrtg config file 
-	-P:          write PID into $inn::pathrun/cnfsstat.pid
+	-P:          write PID into $INN::Config::pathrun/cnfsstat.pid
 _end_
     exit(1);
 }
@@ -66,14 +66,14 @@
             Sys::Syslog::setlogsock('unix') 
                 if $OSNAME =~ /linux|freebsd|dec_osf|darwin/;
         }
-	openlog ('cnfsstat', 'pid', $inn::syslog_facility);
+	openlog ('cnfsstat', 'pid', $INN::Config::syslog_facility);
     } else {
 	print STDERR "Syslog is not available.  -s option is ignored.\n";
     }
 }
 
 if ($opt_P) {
-    open(FILE, ">$inn::pathrun/cnfsstat.pid") && do {
+    open(FILE, ">$INN::Config::pathrun/cnfsstat.pid") && do {
 	print FILE "$$\n";
 	close FILE;
     };
@@ -370,7 +370,7 @@
 	#my ($name, $num, $buff, $size) = @_;
         $tag = 'cnfs-' . $buffer;
 
-        print 'Target[', $tag, ']: `', "$inn::pathbin/cnfsstat -m ", $buffer, '`', "\n";  
+        print 'Target[', $tag, ']: `', "$INN::Config::pathbin/cnfsstat -m ", $buffer, '`', "\n";  
         print 'MaxBytes[', $tag, ']: ', (&get_cycbuff_info($buff{$buffer}))[1], "\n";
         print 'Title[', $tag, ']: ', "${buffer} Usage\n";
         print 'Options[', $tag, ']: growright gauge', "\n";
@@ -498,7 +498,7 @@
 sub lookup_age {
     my ($msgid) = @_;
 
-    my $history = &safe_run("grephistory", "-l", $msgid);
+    my $history = &safe_run("$INN::Config::newsbin/grephistory", "-l", $msgid);
     if ($history =~ /\t(\d+)~/) {
 	return $1;
     }

Modified: frontends/mailpost.in
===================================================================
--- frontends/mailpost.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ frontends/mailpost.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # mailpost - yet another mail-to-news filter
 # 21feb00 [added "lc" to duplicate header fixer stmt to make it case-insensitive]
@@ -36,13 +36,13 @@
 $usage =~ s!.*/!! ;
 my $prog = $usage ;
 
-openlog $usage, "pid", $inn::syslog_facility ;
+openlog $usage, "pid", $INN::Config::syslog_facility ;
 
 $usage .= "[ -r addr ][ -f addr ][ -a approved ][ -d distribution ]" .
     " [ -m mailing-list ][ -b database ][ -o output-path ] [ -c wait-time ]" .
     " [ -x header [:header...] ] [ -p port ] newsgroups" ;
 
-use vars qw($opt_r $opt_f $opt_a $opt_d $opt_m $opt_b $opt_n $opt_o $opt_h $opt_c $opt_x $opt_p ) ;
+use vars qw($opt_r $opt_f $opt_a $opt_d $opt_m $opt_b $opt_n $opt_o $opt_h $opt_c $opt_x $opt_p) ;
 getopts("hr:f:a:d:m:b:no:c:x:p:") || die "usage: $usage\n" ;
 die "usage: $usage\n" if $opt_h ;
 
@@ -51,14 +51,14 @@
 # to be a news article (without the #!rnews header but with the news hdr).
 #
 
-my $Sendmail = $inn::mta ;
-my $Submit = $inn::inews . " -S -h" . ($opt_p ? " -p $opt_p" : '');
-my $Database = ($opt_b || $inn::pathtmp) . "/mailpost-msgid" ;
-my $Maintainer = $inn::newsmaster || "usenet" ; 
+my $Sendmail = $INN::Config::mta ;
+my $Submit = $INN::Config::inews . " -S -h" . ($opt_p ? " -p $opt_p" : '');
+my $Database = ($opt_b || $INN::Config::pathtmp) . "/mailpost-msgid" ;
+my $Maintainer = $INN::Config::newsmaster || "usenet" ; 
 my $WhereTo = $opt_o || $Submit ;
-my $Mailname = $inn::fromhost ;
+my $Mailname = $INN::Config::fromhost ;
 
-# can't use $inn::tmpdir as we're usually not running as news
+# can't use $INN::Config::tmpdir as we're usually not running as news
 my $Tmpdir = "/var/tmp" ;	
 
 if ($debugging || $opt_n) {
@@ -362,7 +362,7 @@
   exit 0 if (!$opt_c) ;
 
 ## crosspost -c
-  $newsgroups = append_newsgroups($DATABASE{$message_id}, $newsgroups) ;
+  $newsgroups = &append_newsgroups($DATABASE{$message_id}, $newsgroups) ;
   syslog "err", "crosspost $newsgroups\n" if $debugging ;
 }
 

Modified: frontends/scanspool.in
===================================================================
--- frontends/scanspool.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ frontends/scanspool.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # @(#)scanspool.pl	1.20 4/6/92 00:47:35
 #
@@ -110,9 +110,9 @@
 # global constants
 #
 $prog = $0;			 	# our name
-$spool = "$inn::patharticles";
-$active = "$inn::active";
-$ctlinnd = "$inn::pathbin/ctlinnd";
+$spool = "$INN::Config::patharticles";
+$active = "$INN::Config::active";
+$ctlinnd = "$INN::Config::pathbin/ctlinnd";
 $reason = "running scanspool";		# throttle reason
 
 # parse args

Modified: innfeed/procbatch.in
===================================================================
--- innfeed/procbatch.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ innfeed/procbatch.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Author:       James Brister <brister at vix.com> -- berkeley-unix --
 # Start Date:   Thu May 16 10:32:02 1996 +0200
@@ -18,10 +18,10 @@
 #	Hmm, perhaps we should try to read "backlog-directory"
 #	from innfeed.conf. Oh well.
 #
-$tapeDir = $inn'pathspool . "/innfeed"; #'
-$destDir = $inn'spooltemp ; #'
-$spoolArts = $inn'patharticles ; #'
-$outGoing = $inn'pathoutgoing; #'
+$tapeDir = $INN::Config::pathspool . "/innfeed";
+$destDir = $INN::Config::spooltemp ;
+$spoolArts = $INN::Config::patharticles ;
+$outGoing = $INN::Config::pathoutgoing;
 
 ##
 ## Everything below here should probably be left alone.
@@ -135,7 +135,7 @@
 			die "$0: $cmd: failed\n" unless ($? == 0) ;
 		}
 
-		$cmd = "cat $tmpTape |sort -u >> $tapeFile && rm -f $tmpTape" ;
+		$cmd = "cat $tmpTape | $INN::Config::sort -u >> $tapeFile && rm -f $tmpTape" ;
 		system ($cmd) ;
 		die "$0: $cmd: failed\n" unless ($? == 0) ;
 	}

Modified: m4/paths.m4
===================================================================
--- m4/paths.m4	2007-09-18 13:14:28 UTC (rev 7682)
+++ m4/paths.m4	2007-09-18 19:44:47 UTC (rev 7683)
@@ -29,6 +29,9 @@
 _INN_ARG_DIR([filter], ['${bindir}/filter'], [FILTERDIR],
     [AC_HELP_STRING([--with-filter-dir=PATH],
         [Path for embedded filters [PREFIX/bin/filter]])])
+_INN_ARG_DIR([libperl], ['${libdir}/perl'], [LIBPERLDIR],
+    [AC_HELP_STRING([--with-libperl-dir=PATH],
+        [Path for Perl modules [PREFIX/lib/perl]])])
 _INN_ARG_DIR([log], ['${prefix}/log'], [LOGDIR],
     [AC_HELP_STRING([--with-log-dir=PATH],
         [Path for news logs [PREFIX/log]])])


Property changes on: trunk/perl/INN
___________________________________________________________________
Name: svn:ignore
   + Config.pm


Added: perl/INN/Config.pm.in
===================================================================
--- perl/INN/Config.pm.in	                        (rev 0)
+++ perl/INN/Config.pm.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -0,0 +1,225 @@
+##  $Id$
+##
+##  Perl module which sets up any and all variables that an
+##  INN Perl script might need.
+##
+
+package INN::Config;
+
+use warnings;
+use Exporter;
+
+our @ISA = qw(Exporter);
+our $VERSION = @PACKAGE_VERSION@;
+
+
+##  First, two necessary variables (listed below in @DIRVAR).
+our $prefix = '@prefix@';
+our $exec_prefix = "@exec_prefix@";
+
+
+##  Then, process the variables provided by innconfval.
+my @INNCONFVAR = ();
+my @values = `${exec_prefix}/bin/innconfval -p`;
+foreach $line (@values) {
+  eval 'our '.$line;
+  if ($line =~ /^(.*?) = /m) {
+    push(@INNCONFVAR, $1);
+  }
+}
+
+
+##  Paths of useful directories.
+my @DIRVAR = qw($prefix $exec_prefix $newshome $newslib
+$newsbin $controlprogs $newslbin $newsetc $spooldir
+$archivedir $spool $incoming $spoolnews $badnews
+$batch $overviewdir $most_logs $locks $innddir $tmpdir
+$spooltemp);
+our $newshome = $pathnews;
+our $newslib = "@libdir@";
+our $newsbin = $pathbin;
+our $controlprogs = $pathcontrol;
+our $newslbin = "$pathnews/local";
+our $newsetc = $pathetc;
+our $spooldir = $pathspool;
+our $archivedir = $patharchive;
+our $spool = $patharticles;
+our $incoming = $pathincoming;
+our $spoolnews = $pathincoming;
+our $badnews = "$pathincoming/bad";
+our $batch = $pathoutgoing;
+our $overviewdir = $pathoverview;
+our $most_logs = $pathlog;
+our $locks = $pathrun;
+our $innddir = $pathrun;
+our $tmpdir = $pathtmp;
+our $spooltemp = $pathtmp;
+
+
+##  Paths of useful files.
+my @FILESVAR = qw($active $activetimes $newactive $oldactive
+$history $newsgroups $ctlfile $ctlwatch $localgroups
+$newsfeeds $path_motd $expirectl $errlog $log);
+our $active = "${pathdb}/active";
+our $activetimes = "${pathdb}/active.times";
+our $newactive = "${pathdb}/active.tmp";
+our $oldactive = "${pathdb}/active.old";
+our $history = "${pathdb}/history";
+our $newsgroups = "${pathdb}/newsgroups";
+our $ctlfile = "${newsetc}/control.ctl";
+our $ctlwatch = "${newsetc}/innwatch.ctl";
+our $localgroups = "${newsetc}/localgroups";
+our $newsfeeds = "${newsetc}/newsfeeds";
+our $path_motd = "${newsetc}/motd.news";
+our $expirectl = "${newsetc}/expire.ctl";
+our $errlog = "${most_logs}/errlog";
+our $log = "${most_logs}/news";
+
+
+##  Paths of useful programs.
+my @PROGVAR = qw($inews $innconfval $innd $inndf $innwatch
+$rnews $perl_startup_innd $perl_filter_innd $perl_filter_nnrpd
+$python_filter_innd $path_python_inn_module $path_tcl_startup
+$path_tcl_filter);
+our $inews = "${newsbin}/inews";
+our $innconfval = "${newsbin}/innconfval";
+our $innd = "${newsbin}/innd";
+our $inndf = "${newsbin}/inndf";
+our $innwatch = "${newsbin}/innwatch";
+our $rnews = "${newsbin}/rnews";
+our $perl_startup_innd = "$pathfilter/startup_innd.pl";
+our $perl_filter_innd = "$pathfilter/filter_innd.pl";
+our $perl_filter_nnrpd = "$pathfilter/filter_nnrpd.pl";
+our $python_filter_innd = "$pathfilter/filter_innd.py";
+our $path_python_inn_module = "$pathfilter/INN.py";
+our $path_tcl_startup = "$pathfilter/startup.tcl";
+our $path_tcl_filter = "$pathfilter/filter.tcl";
+
+
+##  Paths of lock/PID/status files.
+my @LOCKVAR = qw($daily $newscontrol $nntpconnect $serverpid
+$innwstatus $watchpid $tempsock $tempsockdir);
+our $daily = "${locks}/LOCK.news.daily";
+our $newscontrol = "${innddir}/control";
+our $nntpconnect = "${innddir}/nntpin";
+our $serverpid = "${innddir}/innd.pid";
+our $innwstatus = "${innddir}/innwatch.status";
+our $watchpid = "${innddir}/innwatch.pid";
+(our $tempsock = "${innddir}/ctlinndXXXXXX") =~ s!.*/(.*)XXXXXX$!$1*!;
+(our $tempsockdir = "${innddir}/ctlinndXXXXXX") =~ s!/[^/]*$!!;
+
+
+##  Paths of external used programs.
+my @EXTPROGVAR = qw($awk $egrep $gpgv $perl $pgp $sed
+$sort $getftp $uux);
+our $awk = '@AWK@';
+our $egrep = '@EGREP@';
+our $gpgv = '@GPGV@';
+our $perl = '@PERL@';
+our $pgp = '@PGP@';
+our $sed = '@SED@';
+our $sort = '@SORT@';
+our $getftp = '@PATH_GETFTP@';
+our $uux = '@UUX@';
+
+
+##  Paths of external used compressors.
+my @EXTCOMPVAR = qw($bzip2 $compress $gzip $uncompress
+$log_compress $z);
+our $bzip2 = '@BZIP2@';
+our $compress = '@COMPRESS@';
+our $gzip = '@GZIP@';
+our $uncompress = '@UNCOMPRESS@';
+our $log_compress = '@LOG_COMPRESS@';
+our $z = '@LOG_COMPRESSEXT@';
+
+
+##  Set up some useful system file information.
+my @SYSVAR = qw($newsmaster $newsuser $newsgroup
+$umask $syslog_facility);
+our $newsmaster = '@NEWSMASTER@';
+our $newsuser = '@NEWSUSER@';
+our $newsgroup = '@NEWSGRP@';
+our $umask = @NEWSUMASK@;        # It is a number.
+our $syslog_facility = lc('@SYSLOG_FACILITY@');
+$syslog_facility =~ s/log_//;
+
+
+##  Set up some environment values.
+if ($ovmethod && $ovmethod eq "ovdb") {
+    $ENV{'DB_HOME'} = $pathoverview;
+}
+$ENV{'HOME'} = ${pathnews};
+$ENV{'PATH'} ||= '';
+$ENV{'PATH'} = "${newslbin}:${newsbin}:$ENV{'PATH'}:/bin:/usr/bin";
+$ENV{'TMPDIR'} = $pathtmp;
+
+
+##  This array will contain what it is possible to export.
+our @EXPORT_OK = (@INNCONFVAR, @DIRVAR, @FILESVAR, @PROGVAR,
+ at LOCKVAR, @EXTPROGVAR, @EXTCOMPVAR, @SYSVAR);
+
+
+##  That's all.
+1;
+
+__END__
+
+=head1 NAME
+
+Config.pm - Export all the variables an INN Perl script might need
+
+=head1 DESCRIPTION
+
+This Perl module sets up any and all the variables that an INN Perl
+script might need.  More particularly, it allows to use F<inn.conf>
+variables:  they are all provided by B<innconfval>, as well as
+the version of INN (in the variable C<$INN::Config::version>).
+Other useful variables are also provided (directories, files,
+programs, masks) and you should have a look at the source code
+of the module to see what you can use in your Perl scripts.
+
+You only have to declare the module at the beginning of them:
+
+    use lib '<pathnews>/lib/perl';
+    use INN::Config;
+
+Then, you can for instance use:
+
+    print $INN::Config::localmaxartsize;
+
+to print the value of I<localmaxartsize> as it is set in F<inn.conf>.
+
+You can also specify a version when you import the module.  If
+you write:
+
+    use INN::Config 2.5.0;
+
+only versions of INN superior to 2.5.0 will be able to run the Perl
+script.
+
+It is also possible to import the variables directly in your namespace
+if you specify what you want to import:
+
+    use INN::Config qw($localmaxartsize $pathbin);
+
+Note that a legacy F<innshellvars.pl> is also provided in I<pathnews>/lib
+for compatibility reasons with old Perl scripts not shipped with INN.
+It was used by versions of INN anterior to 2.5.0.  The corresponding
+scripts for Shell and Tcl are, however, still in use:  F<innshellvars>
+and F<innshellvars.tcl>.  They offer the same capabilities as this
+module.
+
+=head1 HISTORY
+
+F<innshellvars.pl> was written by James Brister <brister at vix.com>
+for InterNetNews in 1996.  It was converted to the INN::Config Perl
+module by Julien Elie <julien at trigofacile.com> in 2007.
+
+$Id$
+
+=head1 SEE ALSO
+
+inn.conf(5), innconfval(1), perl(1).
+
+=cut


Property changes on: trunk/perl/INN/Config.pm.in
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Added: perl/Makefile
===================================================================
--- perl/Makefile	                        (rev 0)
+++ perl/Makefile	2007-09-18 19:44:47 UTC (rev 7683)
@@ -0,0 +1,31 @@
+##  $Id$
+
+include ../Makefile.global
+
+top	      = ..
+
+ALL           =
+EXTRA         = INN/Config.pm
+
+all: $(ALL) $(EXTRA)
+
+install: all
+	for F in $(EXTRA) ; do \
+	    $(CP_RPUB) $$F $D$(PATHLIBPERL)/$$F ; \
+	done
+
+bootstrap:
+
+clean:
+	rm -f $(ALL)
+
+clobber distclean maintclean: clean
+	rm -f $(EXTRA)
+
+depend:
+
+profiled: all
+
+$(EXTRA) $(FIXSCRIPT):
+	@echo Run configure before running make.  See INSTALL for details.
+	@exit 1


Property changes on: trunk/perl/Makefile
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Modified: samples/nnrpd_access.pl.in
===================================================================
--- samples/nnrpd_access.pl.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ samples/nnrpd_access.pl.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 ##
 ##  Sample code for the nnrpd Perl access hooks.
@@ -27,7 +27,7 @@
 # For details on all the information passed to it, see
 # ~news/doc/hook-perl.
 sub access {
-   &loadnnrp($inn::newsetc . '/nnrp.access');
+   &loadnnrp($INN::Config::newsetc . '/nnrp.access');
    return &checkhost($attributes{hostname}, $attributes{ipaddress});
 }
 

Modified: samples/nnrpd_access_wrapper.pl.in
===================================================================
--- samples/nnrpd_access_wrapper.pl.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ samples/nnrpd_access_wrapper.pl.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Example wrapper nnrpd_access.pl for support of old perl authentication
 # scripts, by Erik Klavon.
@@ -13,6 +13,7 @@
 # - rename the old "auth_init" sub to "old_auth_init"
 # - rename the old "authenticate" sub to "old_authenticate"
 
+use vars qw(%attributes);
 
 # access
 # This sub modifies the global hash attributes so that it has all the

Modified: samples/nnrpd_auth.pl.in
===================================================================
--- samples/nnrpd_auth.pl.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ samples/nnrpd_auth.pl.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 ##
 ##  Sample code for the nnrpd Perl authentication hooks.
@@ -36,8 +36,8 @@
 # authentication stuff needs.
 sub auth_init {
     require CDB_File;
-    tie (%users, 'CDB_File', $inn::pathdb . '/users.cdb')
-        or warn "Could not open $inn::pathdb/users.cdb for users: $!\n";
+    tie (%users, 'CDB_File', $INN::Config::pathdb . '/users.cdb')
+        or warn "Could not open $INN::Config::pathdb/users.cdb for users: $!\n";
 }
 
 # This function is called for authentication requests.  For details on

Modified: samples/nnrpd_auth_wrapper.pl.in
===================================================================
--- samples/nnrpd_auth_wrapper.pl.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ samples/nnrpd_auth_wrapper.pl.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Example wrapper nnrpd_auth.pl for support of old perl authentication
 # scripts, by Erik Klavon.
@@ -13,6 +13,7 @@
 # - rename the old "auth_init" sub to "old_auth_init"
 # - rename the old "authenticate" sub to "old_authenticate"
 
+use vars qw(%attributes);
 
 # auth_init
 # This sub simply calls old_auth_init

Modified: scripts/inncheck.in
===================================================================
--- scripts/inncheck.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/inncheck.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -3,10 +3,14 @@
 ##  Sanity-check the configuration of an INN system
 ##  by Brendan Kehoe <brendan at cygnus.com> and Rich $alz.
 
-$prefix = '@prefix@';
-$exec_prefix = "@exec_prefix@";
-require "@libdir@/innshellvars.pl" ;
+BEGIN {
+    $prefix = '@prefix@';
+    $exec_prefix = "@exec_prefix@";
+    $libdir="@libdir@";
+}
 
+use lib "@LIBPERLDIR@"; use INN::Config;
+
 $ST_MODE = 2;
 $ST_UID  = 4;
 $ST_GID  = 5;
@@ -17,38 +21,38 @@
 ##  We use simple names, mapping them to the real filenames only when
 ##  we actually need a filename.
 %paths = (
-    'active',		"$inn::active",
-    'archive',		"$inn::patharchive",
-    'badnews',		"$inn::badnews",
-    'batchdir',		"$inn::pathoutgoing",
-    'control.ctl',	"$inn::ctlfile",
-    'ctlprogs',		"$inn::pathcontrol",
-    'expire.ctl',	"$inn::expirectl",
-    'history',		"$inn::history",
-    'incoming.conf',	"$inn::pathetc/incoming.conf",
-    'inews',		"$inn::inews",
-    'inn.conf',		"$inn::pathetc/inn.conf",
-    'innbind',          "$inn::pathbin/innbind",
-    'innd',		"$inn::innd",
-    'innddir',		"$inn::pathrun",
-    'moderators',	"$inn::pathetc/moderators",
-    'most_logs',	"$inn::pathlog",
-    'newsbin',		"$inn::pathbin",
-    'newsboot',		"$inn::pathbin/rc.news",
-    'newsfeeds',	"$inn::newsfeeds",
-    'overview.fmt',	"$inn::pathetc/overview.fmt",
-    'newsetc',		"$inn::pathetc",
+    'active',		"$INN::Config::active",
+    'archive',		"$INN::Config::patharchive",
+    'badnews',		"$INN::Config::badnews",
+    'batchdir',		"$INN::Config::pathoutgoing",
+    'control.ctl',	"$INN::Config::ctlfile",
+    'ctlprogs',		"$INN::Config::pathcontrol",
+    'expire.ctl',	"$INN::Config::expirectl",
+    'history',		"$INN::Config::history",
+    'incoming.conf',	"$INN::Config::pathetc/incoming.conf",
+    'inews',		"$INN::Config::inews",
+    'inn.conf',		"$INN::Config::pathetc/inn.conf",
+    'innbind',          "$INN::Config::pathbin/innbind",
+    'innd',		"$INN::Config::innd",
+    'innddir',		"$INN::Config::pathrun",
+    'moderators',	"$INN::Config::pathetc/moderators",
+    'most_logs',	"$INN::Config::pathlog",
+    'newsbin',		"$INN::Config::pathbin",
+    'newsboot',		"$INN::Config::pathbin/rc.news",
+    'newsfeeds',	"$INN::Config::newsfeeds",
+    'overview.fmt',	"$INN::Config::pathetc/overview.fmt",
+    'newsetc',		"$INN::Config::pathetc",
     'newslib',		"@libdir@",
-    'nnrpd',		"$inn::pathbin/nnrpd",
-    'nntpsend.ctl',	"$inn::pathetc/nntpsend.ctl",
-    'oldlogs',		"$inn::pathlog/OLD",
-    'passwd.nntp',	"$inn::pathetc/passwd.nntp",
-    'readers.conf',	"$inn::pathetc/readers.conf",
-    'rnews',		"$inn::rnews",
-    'rnewsprogs',	"$inn::pathbin/rnews.libexec",
-    'spooltemp',	"$inn::pathtmp",
-    'spool',		"$inn::patharticles",
-    'spoolnews',	"$inn::pathincoming"
+    'nnrpd',		"$INN::Config::pathbin/nnrpd",
+    'nntpsend.ctl',	"$INN::Config::pathetc/nntpsend.ctl",
+    'oldlogs',		"$INN::Config::pathlog/OLD",
+    'passwd.nntp',	"$INN::Config::pathetc/passwd.nntp",
+    'readers.conf',	"$INN::Config::pathetc/readers.conf",
+    'rnews',		"$INN::Config::rnews",
+    'rnewsprogs',	"$INN::Config::pathbin/rnews.libexec",
+    'spooltemp',	"$INN::Config::pathtmp",
+    'spool',		"$INN::Config::patharticles",
+    'spoolnews',	"$INN::Config::pathincoming"
 );
 
 ##  The sub's that check the config files.
@@ -216,7 +220,7 @@
 {
     local ($rem, $v, $def, $class, $pat, $flag, $keep, $default, $purge, $groupbaseexpiry);
 
-    $groupbaseexpiry = $inn::groupbaseexpiry;
+    $groupbaseexpiry = $INN::Config::groupbaseexpiry;
     $groupbaseexpiry =~ tr/A-Z/a-z/;
     input: while ( <IN> ) {
 	next input if &spacious($file, ++$line);
@@ -280,7 +284,7 @@
 sub
 inn_conf
 {
-    system ("$inn::innconfval", '-C');
+    system ("$INN::Config::innconfval", '-C');
 
 #    if ( $k eq "domain" ) {
 #        print "$file:$line: domain (`$v') isn't local domain\n"

Modified: scripts/innmail.in
===================================================================
--- scripts/innmail.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/innmail.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
 
 # Author:       James Brister <brister at vix.com> -- berkeley-unix --
 # Start Date:   Fri, 25 Apr 1997 14:11:23 +0200
@@ -14,11 +14,12 @@
 
 require 5.001 ;
 require 'getopts.pl' ;
+use vars qw($opt_h);
 
-die "$0: No \$inn::mta  variable defined.\n" 
-    if ! defined ($inn::mta);
+die "$0: No \$INN::Config::mta  variable defined.\n" 
+    if ! defined ($INN::Config::mta);
 
-$sm = $inn::mta ;
+$sm = $INN::Config::mta ;
 
 die "$0: MTA path is not absolute\n" unless ($sm =~ m!^/!) ;
 
@@ -53,7 +54,7 @@
 
 @smarr = split(/\s+/,$sm);
 
-($t = $inn::mta) =~ s!\s.*!!;
+($t = $INN::Config::mta) =~ s!\s.*!!;
 die "$0: MTA variable definition is changed after subsitution\n" 
     if ($t ne $smarr[0]);
 

Modified: scripts/innreport.in
===================================================================
--- scripts/innreport.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/innreport.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
 #! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+# fixscript will replace this line with code to load INN::Config
 
 ##########################################################################
 #
@@ -99,7 +99,7 @@
 my $GRAPH = "DO";
 
 ## Directory for the Web pages (used only if the previous line is active)
-my $HTML_dir = "$inn::pathhttp";
+my $HTML_dir = "$INN::Config::pathhttp";
 
 ## Directory for the pictures (need HTML support) in the file space
 my $IMG_dir = "$HTML_dir/pics";

Modified: scripts/innshellvars.in
===================================================================
--- scripts/innshellvars.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/innshellvars.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -3,8 +3,9 @@
 ##  Set up any and all shell variables that an INN shell script
 ##  might need.  Also sets umask.
 
-## NOTE: When adding stuff here, add the corresponding variables to 
-## innshellvars.pl and innshellvars.tcl and innshellvars.csh
+##  NOTE:  When adding stuff here, add the corresponding variables to 
+##  innshellvars.tcl and the INN::Config Perl module (as well as the
+##  old innshellvars.pl script).
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@

Modified: scripts/innshellvars.pl.in
===================================================================
--- scripts/innshellvars.pl.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/innshellvars.pl.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,4 +1,7 @@
 # 
+# This package is only kept for compatibility reasons with old softwares.
+# Please use the real INN::Config Perl module instead.
+#
 # Author:       James Brister <brister at vix.com> -- berkeley-unix --
 # Start Date:   Sat, 24 Aug 1996 22:08:19 +0200
 # Project:      INN 
@@ -6,6 +9,7 @@
 # RCSId:        $Id$
 # Description:  Set up any and all variables that an INN perl script
 #               might need.
+#
 
 package inn ;
 
@@ -58,7 +62,7 @@
 $perl_filter_innd = "$pathfilter/filter_innd.pl" ;
 $perl_filter_nnrpd = "$pathfilter/filter_nnrpd.pl" ;
 $python_filter_innd = "$pathfilter/filter_innd.py" ;
-$path_python_inn_module ="$pathfilter/INN.py" ;
+$path_python_inn_module = "$pathfilter/INN.py" ;
 $path_tcl_startup = "$pathfilter/startup.tcl" ;
 $path_tcl_filter = "$pathfilter/filter.tcl" ;
 

Modified: scripts/innupgrade.in
===================================================================
--- scripts/innupgrade.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/innupgrade.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#! /usr/bin/perl -w
 
 ##  $Id$
 ##
@@ -8,7 +8,7 @@
 ##  convert existing INN configuration files to the syntax expected by the
 ##  current version, if that's changed.
 ##
-##  Note that this script cannot use innshellvars.pl, since loading that file
+##  Note that this script cannot use INN::Config, since loading that file
 ##  requires innconfval be able to parse inn.conf, and until this script runs,
 ##  inn.conf may not be valid.
 ##

Modified: scripts/simpleftp.in
===================================================================
--- scripts/simpleftp.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ scripts/simpleftp.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -1,5 +1,5 @@
 #! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
+# fixscript will replace this line with code to load INN::Config
 
 # simpleftp
 # Author: David Lawrence <tale at isc.org>

Modified: support/fixconfig.in
===================================================================
--- support/fixconfig.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ support/fixconfig.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -24,6 +24,7 @@
 CONTROLDIR=@CONTROLDIR@
 DBDIR=@DBDIR@
 FILTERDIR=@FILTERDIR@
+LIBPERLDIR=@LIBPERLDIR@
 LOGDIR=@LOGDIR@
 RUNDIR=@RUNDIR@
 SPOOLDIR=@SPOOLDIR@
@@ -62,6 +63,7 @@
      -e "s, at CONTROLDIR\@,$CONTROLDIR," \
      -e "s, at DBDIR\@,$DBDIR," \
      -e "s, at FILTERDIR\@,$FILTERDIR," \
+     -e "s, at LIBPERLDIR\@,$LIBPERLDIR," \
      -e "s, at LOGDIR\@,$LOGDIR," \
      -e "s, at RUNDIR\@,$RUNDIR," \
      -e "s, at SPOOLDIR\@,$SPOOLDIR," \

Modified: support/fixscript.in
===================================================================
--- support/fixscript.in	2007-09-18 13:14:28 UTC (rev 7682)
+++ support/fixscript.in	2007-09-18 19:44:47 UTC (rev 7683)
@@ -25,6 +25,7 @@
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 libdir="@libdir@"
+libperldir="@LIBPERLDIR@"
 
 # We can probably just assume sed is on the path, but since we have it, we may
 # as well use it.
@@ -63,7 +64,7 @@
     ;;
 */perl*|*PERL*)
     path=`echo "$interpretor" | sed 's%^#! *[^ ][^ ]*%'"$PERLPATH%"`
-    lib="require '$libdir/innshellvars.pl';"
+    lib="use lib '@LIBPERLDIR@'; use INN::Config;"
     ;;
 *)
     echo "Unknown interpretor $interpretor" >&2

Modified: support/mkmanifest
===================================================================
--- support/mkmanifest	2007-09-18 13:14:28 UTC (rev 7682)
+++ support/mkmanifest	2007-09-18 19:44:47 UTC (rev 7683)
@@ -178,6 +178,7 @@
 innfeed/procbatch
 innfeed/version.c
 nnrpd/nnrpd
+perl/INN/Config.pm
 samples/buffindexed.conf
 samples/inn.conf
 samples/innreport.conf



More information about the inn-committers mailing list