INN commit: trunk (8 files)
INN Commit
Russ_Allbery at isc.org
Thu Sep 20 21:53:56 UTC 2007
Date: Thursday, September 20, 2007 @ 14:53:55
Author: iulius
Revision: 7688
* news.daily and inncheck are no longer generated at configure time.
* Fix a problem of uninitialized value in inncheck.
Modified:
trunk/configure.ac
trunk/perl/INN/Config.pm.in
trunk/scripts/Makefile
trunk/scripts/inncheck.in
trunk/scripts/innshellvars.in
trunk/scripts/innshellvars.pl.in
trunk/scripts/innshellvars.tcl.in
trunk/scripts/news.daily.in
-----------------------------+
configure.ac | 2 --
perl/INN/Config.pm.in | 17 ++++++++++++-----
scripts/Makefile | 9 +++++----
scripts/inncheck.in | 38 +++++++++++++++++---------------------
scripts/innshellvars.in | 6 ++++++
scripts/innshellvars.pl.in | 5 +++++
scripts/innshellvars.tcl.in | 5 +++++
scripts/news.daily.in | 8 +++-----
8 files changed, 53 insertions(+), 37 deletions(-)
Modified: configure.ac
===================================================================
--- configure.ac 2007-09-20 21:01:12 UTC (rev 7687)
+++ configure.ac 2007-09-20 21:53:55 UTC (rev 7688)
@@ -514,10 +514,8 @@
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])
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: perl/INN/Config.pm.in
===================================================================
--- perl/INN/Config.pm.in 2007-09-20 21:01:12 UTC (rev 7687)
+++ perl/INN/Config.pm.in 2007-09-20 21:53:55 UTC (rev 7688)
@@ -137,15 +137,22 @@
## Set up some useful system file information.
my @SYSVAR = qw($newsmaster $newsuser $newsgroup
-$umask $syslog_facility);
+$filemode $inewsmode $rnewsmode $umask $syslog_facility);
our $newsmaster = '@NEWSMASTER@';
our $newsuser = '@NEWSUSER@';
our $newsgroup = '@NEWSGRP@';
-our $umask = @NEWSUMASK@; # It is a number.
+our $filemode = @FILEMODE@; # It is a number.
+our $inewsmode = @INEWSMODE@;
+our $rnewsmode = @RNEWSMODE@;
+our $umask = @NEWSUMASK@;
our $syslog_facility = lc('@SYSLOG_FACILITY@');
$syslog_facility =~ s/log_//;
+## Set up some useful parameters.
+my @PARAMVAR = qw($do_dbz_tagged_hash);
+our $do_dbz_tagged_hash = '@DO_DBZ_TAGGED_HASH@';
+
## Set up some environment values.
if ($ovmethod && $ovmethod eq "ovdb") {
$ENV{'DB_HOME'} = $pathoverview;
@@ -158,7 +165,7 @@
## This array will contain what it is possible to export.
our @EXPORT_OK = (@INNCONFVAR, @DIRVAR, @FILESVAR, @PROGVAR,
- at LOCKVAR, @EXTPROGVAR, @EXTCOMPVAR, @SYSVAR);
+ at LOCKVAR, @EXTPROGVAR, @EXTCOMPVAR, @SYSVAR, @PARAMVAR);
## That's all.
@@ -177,8 +184,8 @@
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.
+programs, masks, parameters) 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:
Modified: scripts/Makefile
===================================================================
--- scripts/Makefile 2007-09-20 21:01:12 UTC (rev 7687)
+++ scripts/Makefile 2007-09-20 21:53:55 UTC (rev 7688)
@@ -10,11 +10,10 @@
top = ..
-ALL = innmail innreport innstat innupgrade innwatch rc.news \
- scanlogs simpleftp tally.control writelog
+ALL = inncheck innmail innreport innstat innupgrade innwatch \
+ news.daily rc.news scanlogs simpleftp tally.control writelog
-EXTRA = inncheck innshellvars innshellvars.pl innshellvars.tcl \
- news.daily
+EXTRA = innshellvars innshellvars.pl innshellvars.tcl
all: $(ALL) $(EXTRA)
@@ -52,11 +51,13 @@
FIX = $(FIXSCRIPT)
+inncheck: inncheck.in $(FIX) ; $(FIX) inncheck.in
innmail: innmail.in $(FIX) ; $(FIX) innmail.in
innreport: innreport.in $(FIX) ; $(FIX) innreport.in
innstat: innstat.in $(FIX) ; $(FIX) innstat.in
innupgrade: innupgrade.in $(FIX) ; $(FIX) -i innupgrade.in
innwatch: innwatch.in $(FIX) ; $(FIX) innwatch.in
+news.daily: news.daily.in $(FIX) ; $(FIX) news.daily.in
rc.news: rc.news.in $(FIX) ; $(FIX) rc.news.in
scanlogs: scanlogs.in $(FIX) ; $(FIX) scanlogs.in
simpleftp: simpleftp.in $(FIX) ; $(FIX) -i simpleftp.in
Modified: scripts/inncheck.in
===================================================================
--- scripts/inncheck.in 2007-09-20 21:01:12 UTC (rev 7687)
+++ scripts/inncheck.in 2007-09-20 21:53:55 UTC (rev 7688)
@@ -1,22 +1,16 @@
-#! @PERL@ --
+#! /usr/bin/perl -w
+# fixscript will replace this line with code to load INN::Config
+
## $Revision$
## Sanity-check the configuration of an INN system
## by Brendan Kehoe <brendan at cygnus.com> and Rich $alz.
-BEGIN {
- $prefix = '@prefix@';
- $exec_prefix = "@exec_prefix@";
- $libdir="@libdir@";
-}
-
-use lib "@LIBPERLDIR@"; use INN::Config;
-
$ST_MODE = 2;
$ST_UID = 4;
$ST_GID = 5;
-$newsuser = '@NEWSUSER@';
-$newsgroup = '@NEWSGRP@';
+$newsuser = "$INN::Config::newsuser";
+$newsgroup = "$INN::Config::newsgroup";
## We use simple names, mapping them to the real filenames only when
## we actually need a filename.
@@ -42,7 +36,7 @@
'newsfeeds', "$INN::Config::newsfeeds",
'overview.fmt', "$INN::Config::pathetc/overview.fmt",
'newsetc', "$INN::Config::pathetc",
- 'newslib', "@libdir@",
+ 'newslib', "$INN::Config::newslib",
'nnrpd', "$INN::Config::pathbin/nnrpd",
'nntpsend.ctl', "$INN::Config::pathetc/nntpsend.ctl",
'oldlogs', "$INN::Config::pathlog/OLD",
@@ -72,7 +66,7 @@
## The modes of the config files we can check.
%modes = (
- 'active', @FILEMODE@,
+ 'active', $INN::Config::filemode,
'incoming.conf', 0640,
'inn.conf', 0644,
'moderators', 0644,
@@ -719,10 +713,12 @@
foreach ( @files ) {
$dummy{$_}++;
}
- foreach ( grep ($dummy{$_} == 0, @in) ) {
- print "$pfx$dir:0: ERROR: illegal file `$_' in directory\n";
- $i = 0;
- }
+ foreach ( @in ) {
+ if (not exists $dummy{$_}) {
+ print "$pfx$dir:0: ERROR: illegal file `$_' in directory\n";
+ $i = 0;
+ }
+ }
}
$i;
}
@@ -751,11 +747,11 @@
## The modes for the various programs.
%prog_modes = (
- 'inews', @INEWSMODE@,
+ 'inews', $INN::Config::inewsmode,
'innd', 0550,
'newsboot', 0550,
'nnrpd', 0555,
- 'rnews', @RNEWSMODE@,
+ 'rnews', $INN::Config::rnewsmode,
);
## Check the permissions of nearly every file in an INN installation.
@@ -764,7 +760,7 @@
{
local ($rnewsprogs) = $paths{'rnewsprogs'};
local ($newsbin) = $paths{'newsbin'};
- local ($newslib) = $paths{'newslib'};
+ #local ($newslib) = $paths{'newslib'};
foreach ( @directories ) {
&checkperm($paths{$_}, 0755);
@@ -778,7 +774,7 @@
&checkperm($paths{$_}, $modes{$_})
if defined $modes{$_};
}
- &checkperm($paths{'history'}, @FILEMODE@);
+ &checkperm($paths{'history'}, $INN::Config::filemode);
# Commented out for now since it depends on the history type.
#&checkperm($paths{'history'} . ".dir", 0644);
#&checkperm($paths{'history'} . ".index", 0644);
Modified: scripts/innshellvars.in
===================================================================
--- scripts/innshellvars.in 2007-09-20 21:01:12 UTC (rev 7687)
+++ scripts/innshellvars.in 2007-09-20 21:53:55 UTC (rev 7688)
@@ -100,6 +100,12 @@
NEWSUSER=@NEWSUSER@
NEWSGROUP=@NEWSGRP@
+FILEMODE=@FILEMODE@
+INEWSMODE=@INEWSMODE@
+RNEWSMODE=@RNEWSMODE@
+
+DO_DBZ_TAGGED_HASH=@DO_DBZ_TAGGED_HASH@
+
TMPDIR=${PATHTMP}; export TMPDIR;
SPOOLTEMP=${PATHTMP}
Modified: scripts/innshellvars.pl.in
===================================================================
--- scripts/innshellvars.pl.in 2007-09-20 21:01:12 UTC (rev 7687)
+++ scripts/innshellvars.pl.in 2007-09-20 21:53:55 UTC (rev 7688)
@@ -104,10 +104,15 @@
$newsuser = '@NEWSUSER@' ;
$newsgroup = '@NEWSGRP@' ;
+$do_dbz_tagged_hash = '@DO_DBZ_TAGGED_HASH@' ;
+
$ENV{'TMPDIR'} = $pathtmp;
$tmpdir = $pathtmp;
$spooltemp = $pathtmp;
+$filemode = @FILEMODE@ ;
+$inewsmode = @INEWSMODE@ ;
+$rnewsmode = @RNEWSMODE@ ;
$umask = @NEWSUMASK@ ;
$syslog_facility = lc("@SYSLOG_FACILITY@");
Modified: scripts/innshellvars.tcl.in
===================================================================
--- scripts/innshellvars.tcl.in 2007-09-20 21:01:12 UTC (rev 7687)
+++ scripts/innshellvars.tcl.in 2007-09-20 21:53:55 UTC (rev 7688)
@@ -95,10 +95,15 @@
set inn_newsuser "@NEWSUSER@"
set inn_newsgroup "@NEWSGRP@"
+set do_dbz_tagged_hash "@DO_DBZ_TAGGED_HASH@"
+
set env(TMPDIR) "$inn_pathtmp"
set inn_tmpdir "$inn_pathtmp"
set inn_spooltemp "$inn_pathtmp"
+scan "@FILEMODE@" "%o" inn_filemode
+scan "@INEWSMODE@" "%o" inn_inewsmode
+scan "@RNEWSMODE@" "%o" inn_rnewsmode
scan "@NEWSUMASK@" "%o" inn_umask
set env(PATH) "$inn_newslbin:$inn_newsbin:$env(PATH):/bin:/usr/bin"
Modified: scripts/news.daily.in
===================================================================
--- scripts/news.daily.in 2007-09-20 21:01:12 UTC (rev 7687)
+++ scripts/news.daily.in 2007-09-20 21:53:55 UTC (rev 7688)
@@ -1,4 +1,6 @@
#! /bin/sh
+# fixscript will replace this line with code to load innshellvars
+
## $Revision$
## Daily news maintenance.
## Optional arguments:
@@ -19,15 +21,11 @@
## delayrm Delay unlink files, then do it quicker (expire -z)
## /full/path Path to a program to run before expiring
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-. @libdir@/innshellvars
-
EXPLOG=${MOST_LOGS}/expire.log
INNSTAT=${PATHBIN}/innstat
HOSTNAME=`hostname`
DATE=`date`
-TAGGEDHASH=@DO_DBZ_TAGGED_HASH@
+TAGGEDHASH=${DO_DBZ_TAGGED_HASH}
SORT=sort
## If your expire does not pause or throttle innd, enable this next line:
More information about the inn-committers
mailing list