INN commit: trunk (8 files)

INN Commit rra at isc.org
Tue Aug 10 15:36:21 UTC 2010


    Date: Tuesday, August 10, 2010 @ 08:36:21
  Author: iulius
Revision: 9100

Revert commit 7405 (for Debian bug #307765) to resolve another Debian
bug:  #584234.

We started setting HOME to try to get pgpverify to look in the correct
place for the keyring.  Current versions of pgpverify now deal with
this by setting the keyring location explicitly.

Overriding HOME breaks things.  Most notably, it means that gpg will try
and create files in <pathnews>/.gnupg so if pathnews is not the same as ~news,
things like buildinnkeyring (Debian specific) and gpgverify won't work.

Thanks to Matthew Vernon for the bug report.


We also change where pullnews looks for its configuration file.
It is now pullnews.marks in <pathdb>, instead of .pullnews in HOME.

Modified:
  trunk/doc/pod/news.pod
  trunk/doc/pod/pullnews.pod
  trunk/frontends/Makefile
  trunk/frontends/pullnews.in
  trunk/perl/INN/Config.pm.in
  trunk/scripts/innshellvars.in
  trunk/scripts/innshellvars.pl.in
  trunk/scripts/innshellvars.tcl.in

-----------------------------+
 doc/pod/news.pod            |   21 +++++++++++++++++++++
 doc/pod/pullnews.pod        |   31 +++++++++++++++----------------
 frontends/Makefile          |    2 +-
 frontends/pullnews.in       |   15 +++++++++++----
 perl/INN/Config.pm.in       |    1 -
 scripts/innshellvars.in     |    3 +--
 scripts/innshellvars.pl.in  |    1 -
 scripts/innshellvars.tcl.in |    1 -
 8 files changed, 49 insertions(+), 26 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2010-08-05 19:53:32 UTC (rev 9099)
+++ doc/pod/news.pod	2010-08-10 15:36:21 UTC (rev 9100)
@@ -7,6 +7,22 @@
 
 =item *
 
+The name and location of the B<pullnews> configuration file have changed.
+It is now F<pullnews.marks> in I<pathdb> (instead of F<.pullnews>
+in I<pathnews>).  If you use B<pullnews>, you need to manually move the
+configuration file; otherwise, it will no longer work.  Note that the B<-c>
+flag passed to B<pullnews> allows to specify another configuration file,
+if need be.
+
+=item *
+
+$HOME is no longer exported as an environment variable by B<innshellvars>,
+B<innshellvars.tcl> and the Perl module C<INN::Config>.  It was previously
+overriding the default user home directory with I<pathnews>.  If you use
+these scripts in your own scripts, you will have to take care of that change.
+
+=item *
+
 Owing to the implementation of S<RFC 4643> (AUTHINFO USER/PASS) in B<innd>,
 if remote peers have to authenticate in order to feed articles, they now
 have to send a username (which was previously wrongly optional), before
@@ -89,6 +105,11 @@
 It means that if the previous behaviour of IHAVE was expected, B<innd>
 should handle itself the connection instead of B<nnrpd>.
 
+=item *
+
+The name and location of the B<pullnews> configuration file is now
+F<pullnews.marks> in I<pathdb> (instead of F<.pullnews> in I<pathnews>).
+
 =back
 
 =head1 Changes in 2.5.3

Modified: doc/pod/pullnews.pod
===================================================================
--- doc/pod/pullnews.pod	2010-08-05 19:53:32 UTC (rev 9099)
+++ doc/pod/pullnews.pod	2010-08-10 15:36:21 UTC (rev 9100)
@@ -20,15 +20,15 @@
 
 =head1 DESCRIPTION
 
-B<pullnews> reads a config file in the running user's home directory
-(normally called F<~/.pullnews>) and connects to the upstream servers
-given there as a reader client.  By default, it connects to all servers
-listed in the configuration file, but you can limit B<pullnews> to
-specific servers by listing them on the command line:  a whitespace-separated
-list of server names can be specified, like I<from-server> for one of them.
-For each server it connects to, it pulls over articles and feeds them to the
-destination server via the IHAVE or POST commands.  This means that the system
-B<pullnews> is run on must have feeding access to the destination news server.
+B<pullnews> reads a config file named F<pullnews.marks> in I<pathdb> as set
+in F<inn.conf>, and connects to the upstream servers given there as a reader
+client.  By default, it connects to all servers listed in the configuration
+file, but you can limit B<pullnews> to specific servers by listing them
+on the command line:  a whitespace-separated list of server names can be
+specified, like I<from-server> for one of them.  For each server it connects
+to, it pulls over articles and feeds them to the destination server via
+the IHAVE or POST commands.  This means that the system B<pullnews> is
+run on must have feeding access to the destination news server.
 
 B<pullnews> is designed for very small sites that do not want to bother
 setting up traditional peering and is not meant for handling large feeds.
@@ -46,10 +46,10 @@
 
 =item B<-c> I<config>
 
-Normally, the config file is stored in F<~/.pullnews> for the user running
-B<pullnews>.  If B<-c> is given, I<config> will be used as the config file
-instead.  This is useful if you're running B<pullnews> as a system user on
-an automated basis out of cron rather than as an individual user.
+Normally, the config file is stored in F<pullnews.marks> in I<pathdb>.
+If B<-c> is given, I<config> will be used as the config file instead.
+This is useful if you're running B<pullnews> as a system user on an automated
+basis out of cron or as an individual user, rather than the news user.
 
 See L<CONFIG FILE> below for the format of this file.
 
@@ -265,10 +265,9 @@
 The Perl script itself used to pull news from upstream servers and feed
 it to another news server.
 
-=item I<$HOME>/.pullnews
+=item I<pathdb>/pullnews.marks
 
-The default config file.  It is in the running user's home directory
-(normally called F<~/.pullnews>).
+The default config file.
 
 =back
 

Modified: frontends/Makefile
===================================================================
--- frontends/Makefile	2010-08-05 19:53:32 UTC (rev 9099)
+++ frontends/Makefile	2010-08-10 15:36:21 UTC (rev 9100)
@@ -97,7 +97,7 @@
 cnfsheadconf:	cnfsheadconf.in  $(FIX)	; $(FIX) cnfsheadconf.in
 cnfsstat:	cnfsstat.in      $(FIX)	; $(FIX) cnfsstat.in
 mailpost:	mailpost.in      $(FIX)	; $(FIX) mailpost.in
-pullnews:	pullnews.in      $(FIX)	; $(FIX) -i pullnews.in
+pullnews:	pullnews.in      $(FIX)	; $(FIX) pullnews.in
 scanspool:	scanspool.in     $(FIX)	; $(FIX) scanspool.in
 
 bunbatch: Makefile ../Makefile.global

Modified: frontends/pullnews.in
===================================================================
--- frontends/pullnews.in	2010-08-05 19:53:32 UTC (rev 9099)
+++ frontends/pullnews.in	2010-08-10 15:36:21 UTC (rev 9100)
@@ -1,4 +1,6 @@
 #! /usr/bin/perl -w
+# use lib '@LIBPERLDIR@'; use INN::Config;
+# If running inside INN, uncomment the above and point to INN::Config.
 #
 # Author:       James Brister <brister at vix.com> -- berkeley-unix --
 # Start Date:   Sat, 10 Oct 1998 21:40:11 +0200
@@ -21,7 +23,7 @@
 #               machines (in the guise of a reader), and pulls over articles 
 #               and feeds them to a downstream server (in the guise of a feeder).
 #
-#               Uses a simple configuration file:  $HOME/.pullnews to define
+#               Uses a simple configuration file:  <pathdb>/pullnews.marks to define
 #               which machines to pull articles from and which groups at each
 #               machine to pull over.  There is also support for more specific
 #               configurations like cross-posted newsgroups to kill, thanks to
@@ -46,6 +48,10 @@
 #               over.
 #
 
+# If you have INN and the script is able to successfully include your
+# INN::Config module, the value of $INN::Config::pathdb will override it.
+my $pathdb = $ENV{HOME};
+
 require 5.004;
 
 $0 =~ s!.*/!!;
@@ -67,7 +73,8 @@
 use strict;
 
 my $usage = $0;
-my $defaultConfig = "$ENV{HOME}/.pullnews";
+$pathdb = $INN::Config::pathdb if $INN::Config::pathdb;
+my $defaultConfig = "${pathdb}/pullnews.marks";
 my $defaultPort = 119;
 my $defaultHost = "localhost";
 my $defaultCheckPoint = 0;
@@ -91,8 +98,8 @@
                 group.  When fraction is 1.0, pull all the articles on
                 the server.  The default is to do nothing.
 
-  -c config     specify the configuration file instead of the 
-                default of $ENV{HOME}/.pullnews (also called ~/.pullnews).
+  -c config     specify the configuration file
+                (default is ${pathdb}/pullnews.marks).
 
   -C width      use width characters for progress (default is $defaultProgressWidth).
 

Modified: perl/INN/Config.pm.in
===================================================================
--- perl/INN/Config.pm.in	2010-08-05 19:53:32 UTC (rev 9099)
+++ perl/INN/Config.pm.in	2010-08-10 15:36:21 UTC (rev 9100)
@@ -160,7 +160,6 @@
 if ($ovmethod && $ovmethod eq "ovdb") {
     $ENV{'DB_HOME'} = $pathoverview;
 }
-$ENV{'HOME'} = ${pathnews};
 $ENV{'INNDDIR'} = $innddir;
 $ENV{'LOCKS'} = $locks;
 $ENV{'MOST_LOGS'} = $most_logs;

Modified: scripts/innshellvars.in
===================================================================
--- scripts/innshellvars.in	2010-08-05 19:53:32 UTC (rev 9099)
+++ scripts/innshellvars.in	2010-08-10 15:36:21 UTC (rev 9100)
@@ -123,5 +123,4 @@
 PATH=${NEWSLBIN}:${NEWSBIN}:${PATH}:/bin:/usr/bin
 export PATH
 
-HOME=$PATHNEWS
-export HOME
+# Do not override HOME.

Modified: scripts/innshellvars.pl.in
===================================================================
--- scripts/innshellvars.pl.in	2010-08-05 19:53:32 UTC (rev 9099)
+++ scripts/innshellvars.pl.in	2010-08-10 15:36:21 UTC (rev 9100)
@@ -138,6 +138,5 @@
 $ENV{'PATH'} = $path;
 
 $home = ${pathnews};
-$ENV{'HOME'} = ${pathnews};
 
 1 ;

Modified: scripts/innshellvars.tcl.in
===================================================================
--- scripts/innshellvars.tcl.in	2010-08-05 19:53:32 UTC (rev 9099)
+++ scripts/innshellvars.tcl.in	2010-08-10 15:36:21 UTC (rev 9100)
@@ -132,4 +132,3 @@
 set env(PATH) "$inn_path"
 
 set inn_home "$inn_pathnews"
-set env(HOME) "$inn_pathnews"




More information about the inn-committers mailing list