[Pkg-privacy-commits] [msva-perl] 94/356: minimize logging spew by default, emit POSIX sh commands to set environment variables if no subcommand is present

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository msva-perl.

commit 32d9bf890c1968e99c5996735363c77e24ed9696
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Mar 12 00:32:06 2010 -0500

    minimize logging spew by default, emit POSIX sh commands to set environment variables if no subcommand is present
---
 msva-perl | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/msva-perl b/msva-perl
index 4509a04..6a9f60e 100755
--- a/msva-perl
+++ b/msva-perl
@@ -74,7 +74,7 @@ use strict;
     my $msglevel = shift;
 
     my $level = $loglevels{lc($ENV{MSVA_LOG_LEVEL})};
-    $level = $loglevels{info} if (! defined $level);
+    $level = $loglevels{error} if (! defined $level);
 
     if ($loglevels{lc($msglevel)} <= $level) {
       printf STDERR @_;
@@ -83,7 +83,7 @@ use strict;
 
   sub get_log_level {
     my $level = $loglevels{lc($ENV{MSVA_LOG_LEVEL})};
-    $level = $loglevels{info} if (! defined $level);
+    $level = $loglevels{error} if (! defined $level);
     return $level;
   }
 
@@ -463,6 +463,11 @@ use strict;
           exec(@args) or exit 111;
         }
       }
+    } else {
+      printf("MONKEYSPHERE_VALIDATION_AGENT_SOCKET=http://localhost:%d;\nexport MONKEYSPHERE_VALIDATION_AGENT_SOCKET;\n", $self->port);
+      # FIXME: consider daemonizing here to behave more like
+      # ssh-agent.  maybe avoid backgrounding by setting
+      # MSVA_NO_BACKGROUND.
     };
   }
 
@@ -478,7 +483,8 @@ use strict;
 my $server = MSVA->new();
 $server->run(host=>'localhost',
              log_level=>MSVA::get_log_level(),
-             user => $>,  # explicitly choose regular user (avoids a warning)
+             user => $>,  # explicitly choose regular user and group (avoids spew)
+             group => $),
              msva=>$server);
 __END__
 
@@ -536,7 +542,7 @@ msva-perl is configured by means of environment variables.
 msva-perl logs messages about its operation to stderr.  MSVA_LOG_LEVEL
 controls its verbosity, and should be one of (in increasing
 verbosity): silent, quiet, fatal, error, info, verbose, debug, debug1,
-debug2, debug3.  Default is 'info'.
+debug2, debug3.  Default is 'error'.
 
 =item MSVA_ALLOWED_USERS
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git



More information about the Pkg-privacy-commits mailing list