r46853 - in /trunk/libapp-daemon-perl: Changes Daemon.pm META.yml README debian/changelog debian/control

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Fri Nov 6 20:07:59 UTC 2009


Author: carnil-guest
Date: Fri Nov  6 20:07:48 2009
New Revision: 46853

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46853
Log:
* New upstream release
  + The priority for setting options is now command line > app-internal
    > App:Daemon internal.
  + Point STDIN, STDOUT and STDERR to /dev/null instead of closing them.
* debian/control: Add myself to Uploaders. 

Modified:
    trunk/libapp-daemon-perl/Changes
    trunk/libapp-daemon-perl/Daemon.pm
    trunk/libapp-daemon-perl/META.yml
    trunk/libapp-daemon-perl/README
    trunk/libapp-daemon-perl/debian/changelog
    trunk/libapp-daemon-perl/debian/control

Modified: trunk/libapp-daemon-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-daemon-perl/Changes?rev=46853&op=diff
==============================================================================
--- trunk/libapp-daemon-perl/Changes (original)
+++ trunk/libapp-daemon-perl/Changes Fri Nov  6 20:07:48 2009
@@ -1,14 +1,19 @@
 Revision history for Perl extension App::Daemon.
 
-0.08 (10/08/2009)
-    (ms) [RT 50326] Fixed insecure dependency error in tainted mode
-         by untainting the string obtained by appname().
+0.08 (11/05/2009)
+    (ms) [RT 50884] Applied patch by Matthew Byng-Maddick allow overriding
+         app-internal option settings by command line options. Order is now:
+         command line > app-internal > App::Daemon internal
+    (ms) [RT 51066] Applied patch by Mike Whitaker to point stdin/out/err 
+         to /dev/null instead of closing them.
 
-0.07 (03/24/2009)
+0.07 (10/08/2009)
     (ms) Applied patch by Sadrak [rt:44513] to check if Log4perl has
          already been initialized and skip the easy_init call in this
          case. Note that -v then has to be handled by the user-provided 
          Log4perl configuration instead.
+    (ms) [RT 50326] Fixed insecure dependency error in tainted mode
+         by untainting the string obtained by appname().
 
 0.06 (03/05/2009)
     (ms) Added detach() as an importable method for simple daemons.

Modified: trunk/libapp-daemon-perl/Daemon.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-daemon-perl/Daemon.pm?rev=46853&op=diff
==============================================================================
--- trunk/libapp-daemon-perl/Daemon.pm (original)
+++ trunk/libapp-daemon-perl/Daemon.pm Fri Nov  6 20:07:48 2009
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.07';
+our $VERSION = '0.08';
 
 use Getopt::Std;
 use Pod::Usage;
@@ -30,20 +30,29 @@
         pod2usage();
     }
 
-    if(!defined $pidfile) {
-      $pidfile    = find_option('-p', 1) || ( '/tmp/' . $appname . ".pid" );
-    }
-
-    if(!defined $logfile) {
-      $logfile    = find_option('-l', 1) || ( '/tmp/' . $appname . ".log" );
-    }
-
-    if(!defined $l4p_conf) {
-      $l4p_conf   = find_option('-l4p', 1);
-    }
-
-    if(!defined $as_user) {
-      $as_user    = find_option('-u', 1) || "nobody";
+    if(my $_pidfile = find_option('-p', 1)) {
+      $pidfile    = $_pidfile;
+    }
+    else {
+      $pidfile  ||= ( '/tmp/' . $appname . ".pid" );
+    }
+
+    if(my $_logfile = find_option('-l', 1)) {
+      $logfile    = $_logfile;
+    }
+    else {
+      $logfile  ||= ( '/tmp/' . $appname . ".log" );
+    }
+
+    if(my $_l4p_conf = find_option('-l4p', 1)) {
+      $l4p_conf   = $_l4p_conf;
+    }
+
+    if(my $_as_user = find_option('-u', 1)) {
+      $as_user    = $_as_user;
+    }
+    else {
+      $as_user  ||= 'nobody';
     }
 
     if($> != 0) {
@@ -51,14 +60,12 @@
         ($as_user) = getpwuid($>);
     }
 
-    if(!defined $background) {
-      $background = find_option('-X') ? 0 : 1,
-    }
-
-    if(!defined $loglevel) {
-      $loglevel   = find_option('-v') ? $DEBUG : $INFO;
-      $loglevel   = $DEBUG if !$background;
-    }
+    $background = 1 if(!defined $background);
+    $background = find_option('-X') ? 0 : $background;
+
+    $loglevel   = $background ? $INFO : $DEBUG
+      if(!defined $loglevel);
+    $loglevel   = find_option('-v') ? $DEBUG : $loglevel;
 
     for (qw(start stop status)) {
         if( find_option( $_ ) ) {
@@ -184,9 +191,19 @@
     }
  
         # close std file descriptors
-    close(STDIN);
-    close(STDOUT);
-    close(STDERR);
+    if(-e "/dev/null") {
+        # On Unix, we want to point these file descriptors at /dev/null,
+        # so that any libary routines that try to read form stdin or
+        # write to stdout/err will have no effect (Stevens, APitUE, p. 426
+        # and [RT 51066].
+        open STDIN, '/dev/null';
+        open STDOUT, '>>/dev/null';
+        open STDERR, '>>/dev/null';
+    } else {
+        close(STDIN);
+        close(STDOUT);
+        close(STDERR);
+    }
 }
 
 ###########################################

Modified: trunk/libapp-daemon-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-daemon-perl/META.yml?rev=46853&op=diff
==============================================================================
--- trunk/libapp-daemon-perl/META.yml (original)
+++ trunk/libapp-daemon-perl/META.yml Fri Nov  6 20:07:48 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               App-Daemon
-version:            0.07
+version:            0.08
 abstract:           Start an Application as a Daemon
 author:
     - Mike Schilli <m at perlmeister.com>

Modified: trunk/libapp-daemon-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-daemon-perl/README?rev=46853&op=diff
==============================================================================
--- trunk/libapp-daemon-perl/README (original)
+++ trunk/libapp-daemon-perl/README Fri Nov  6 20:07:48 2009
@@ -1,5 +1,5 @@
 ######################################################################
-    App::Daemon 0.07
+    App::Daemon 0.08
 ######################################################################
 
 NAME

Modified: trunk/libapp-daemon-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-daemon-perl/debian/changelog?rev=46853&op=diff
==============================================================================
--- trunk/libapp-daemon-perl/debian/changelog (original)
+++ trunk/libapp-daemon-perl/debian/changelog Fri Nov  6 20:07:48 2009
@@ -1,3 +1,13 @@
+libapp-daemon-perl (0.08-1) UNRELEASED; urgency=low
+
+  * New upstream release
+    + The priority for setting options is now command line > app-internal
+      > App:Daemon internal.
+    + Point STDIN, STDOUT and STDERR to /dev/null instead of closing them.
+  * debian/control: Add myself to Uploaders. 
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>  Fri, 06 Nov 2009 21:03:37 +0100
+
 libapp-daemon-perl (0.07-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libapp-daemon-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-daemon-perl/debian/control?rev=46853&op=diff
==============================================================================
--- trunk/libapp-daemon-perl/debian/control (original)
+++ trunk/libapp-daemon-perl/debian/control Fri Nov  6 20:07:48 2009
@@ -5,7 +5,8 @@
 Build-Depends-Indep: perl, libproc-processtable-perl, libfile-pid-perl, liblog-log4perl-perl (>= 1.0)
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Xavier Oswald <xoswald at debian.org>,
- Brian Cassidy <brian.cassidy at gmail.com>
+ Brian Cassidy <brian.cassidy at gmail.com>.
+ Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
 Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/App-Daemon/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libapp-daemon-perl/




More information about the Pkg-perl-cvs-commits mailing list