[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#703927: marked as done (unblock: tinyca/0.7.5-4)



Your message dated Mon, 25 Mar 2013 21:08:09 +0000
with message-id <1364245689.3284.2.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#703927: unblock: tinyca/0.7.5-4
has caused the Debian Bug report #703927,
regarding unblock: tinyca/0.7.5-4
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
703927: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703927
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package tinyca

tinyca (0.7.5-4) unstable; urgency=medium

  * Ensured compatibility with openssl 1.0.1 (Closes: #702233). Thanks to
    Mateusz Kijowski for the bug report.
  * Fixed deprecation warning form perl about use of qw() without
    parentheses (Closes: 702433). Thanks to Jörgen Hägg for the patch.

 -- Christoph Ulrich Scholler <scholler@fnb.tu-darmstadt.de>  Mon, 25 Mar 2013 02:25:09 +0100

unblock tinyca/0.7.5-4

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u tinyca-0.7.5/lib/GUI.pm tinyca-0.7.5/lib/GUI.pm
--- tinyca-0.7.5/lib/GUI.pm
+++ tinyca-0.7.5/lib/GUI.pm
@@ -978,7 +978,7 @@
    $piter = $store->append($root);
    $store->set($piter, 0 => $t);
 
-   for my $l qw(CN EMAIL O OU C ST L) {
+   for my $l (qw(CN EMAIL O OU C ST L)) {
       if(defined($parsed->{$l})) {
          if($l eq "OU") {
             foreach my $ou (@{$parsed->{'OU'}}) {
@@ -1003,7 +1003,7 @@
       $piter = $store->append($root);
       $store->set($piter, 0 => $t);
    
-      for my $l qw(CN EMAIL O OU C ST L) {
+      for my $l (qw(CN EMAIL O OU C ST L)) {
          if(defined($parsed->{'ISSUERDN'}->{$l})) {
             if($l eq "OU") {
                foreach my $ou (@{$parsed->{'ISSUERDN'}->{'OU'}}) {
@@ -1029,7 +1029,7 @@
       $piter = $store->append($root);
       $store->set($piter, 0 => $t);
    
-      for my $l qw(STATUS NOTBEFORE NOTAFTER) {
+      for my $l (qw(STATUS NOTBEFORE NOTAFTER)) {
          if(defined($parsed->{$l})) {
             $citer = $store->append($piter);
             $store->set($citer, 
@@ -1045,7 +1045,7 @@
    $store->set($piter, 0 => $t);
 
 
-   for my $l qw(STATUS SERIAL KEYSIZE PK_ALGORITHM SIG_ALGORITHM TYPE) {
+   for my $l (qw(STATUS SERIAL KEYSIZE PK_ALGORITHM SIG_ALGORITHM TYPE)) {
       if(defined($parsed->{$l})) {
          $citer = $store->append($piter);
          $store->set($citer, 
@@ -1060,7 +1060,7 @@
       $piter = $store->append($root);
       $store->set($piter, 0 => $t);
    
-      for my $l qw(FINGERPRINTMD5 FINGERPRINTSHA1) {
+      for my $l (qw(FINGERPRINTMD5 FINGERPRINTSHA1)) {
          if(defined($parsed->{$l})) {
             $citer = $store->append($piter);
             $store->set($citer, 
diff -u tinyca-0.7.5/debian/changelog tinyca-0.7.5/debian/changelog
--- tinyca-0.7.5/debian/changelog
+++ tinyca-0.7.5/debian/changelog
@@ -1,3 +1,12 @@
+tinyca (0.7.5-4) unstable; urgency=medium
+
+  * Ensured compatibility with openssl 1.0.1 (Closes: #702233). Thanks to
+    Mateusz Kijowski for the bug report.
+  * Fixed deprecation warning form perl about use of qw() without
+    parentheses (Closes: 702433). Thanks to Jörgen Hägg for the patch.
+
+ -- Christoph Ulrich Scholler <scholler@fnb.tu-darmstadt.de>  Mon, 25 Mar 2013 02:25:09 +0100
+
 tinyca (0.7.5-3) unstable; urgency=low
 
   * Fixed deprecation warning in About dialog (Closes: #519164).  Thanks
only in patch2:
unchanged:
--- tinyca-0.7.5.orig/lib/OpenSSL.pm
+++ tinyca-0.7.5/lib/OpenSSL.pm
@@ -22,6 +22,7 @@
 
 use POSIX;
 use IPC::Open3;
+use IO::Select;
 use Time::Local;
 
 sub new {
@@ -41,7 +42,7 @@
    close(TEST);
 
    # set version (format: e.g. 0.9.7 or 0.9.7a)
-   if($v =~ /\b(0\.9\.[678][a-z]?)\b/) {
+   if($v =~ /\b(0\.9\.[6-9][a-z]?)\b/ || $v =~ /\b(1\.0\.[01][a-z]?)\b/) {
       $self->{'version'} = $1;
    }
 
@@ -817,7 +818,7 @@
    my $self = shift;
    my $opts = { @_ };
    
-   my ($tmp, $ext, $ret, $file, $pid, $cmd);
+   my ($tmp, $ext, $ret, $file, $pid, $cmd, $cmdout, $cmderr);
    $file = HELPERS::mktmp($self->{'tmp'}."/data");
 
    $cmd = "$self->{'bin'} $opts->{'cmd'}";
@@ -830,16 +831,7 @@
       $cmd .= " -outform $opts->{'outform'}";
    }
 
-   my($rdfh, $wtfh);
-   $ext = "$cmd\n\n";
-   $pid = open3($wtfh, $rdfh, $rdfh, $cmd);
-   print $wtfh "$opts->{'data'}\n";
-   while(<$rdfh>){
-      $ext .= $_;
-      # print STDERR "DEBUG: cmd ret: $_";
-   };
-   waitpid($pid, 0);
-   $ret = $?>>8;
+   ($ret, $tmp, $ext) = _run_with_fixed_input($cmd, $opts->{'data'});
 
    if($self->{'broken'}) {
        if(($ret != 0 && $opts->{'cmd'} ne 'crl') ||
@@ -859,14 +851,15 @@
       }
    }
 
-   open(IN, $file) || do {
-      my $t = sprintf(_("Can't open file %s: %s"), $file, $!);
-      GUI::HELPERS::print_warning($t);
-      return;
-   };
-   $tmp .= $_ while(<IN>);
-   close(IN);
-
+   if (-s $file) { # If the file is empty, the payload is in $tmp (via STDOUT of the called process).
+      open(IN, $file) || do {
+         my $t = sprintf(_("Can't open file %s: %s"), $file, $!);
+         GUI::HELPERS::print_warning($t);
+         return;
+      };
+      $tmp .= $_ while(<IN>);
+      close(IN);
+   }
    unlink($file);
 
    return($ret, $tmp, $ext);
@@ -1076,4 +1069,72 @@
    }
 }
    
+
+=over
+
+=item _run_with_fixed_input($cmd, $input)
+
+This function runs C<$cmd> and writes the C<$input> to STDIN of the
+new process (all at once).
+
+While the command runs, all of its output to STDOUT and STDERR is
+collected.
+
+After the command terminates (closes both STDOUT and STDIN) the
+function returns the command's return value as well as everything it
+wrote to its STDOUT and STDERR in a list.
+
+=back
+
+=cut
+
+sub _run_with_fixed_input {
+   my $cmd = shift;
+   my $input = shift;
+
+   my ($wtfh, $rdfh, $erfh, $pid, $sel, $ret, $stdout, $stderr);
+   $erfh = Symbol::gensym; # Must not be false, otherwise it is lumped together with rdfh
+
+   # Run the command
+   $pid = open3($wtfh, $rdfh, $erfh, $cmd);
+   print $wtfh $input, "\n";
+
+   $stdout = '';
+   $stderr = '';
+   $sel = new IO::Select($rdfh, $erfh);
+   while (my @fhs = $sel->can_read()) {
+      foreach my $fh (@fhs) {
+         if ($fh == $rdfh) { # STDOUT
+            my $bytes_read = sysread($fh, my $buf='', 1024);
+            if ($bytes_read == -1) {
+               warn("Error reading from child's STDOUT: $!\n");
+               $sel->remove($fh);
+             } elsif ($bytes_read == 0) {
+               # print("Child's STDOUT closed.\n");
+               $sel->remove($fh);
+             } else {
+               $stdout .= $buf;
+             }
+         }
+         elsif ($fh == $erfh) { # STDERR
+            my $bytes_read = sysread($fh, my $buf='', 1024);
+            if ($bytes_read == -1) {
+               warn("Error reading from child's STDERR: $!\n");
+               $sel->remove($fh);
+            } elsif ($bytes_read == 0) {
+               # print("Child's STDERR closed.\n");
+               $sel->remove($fh);
+            } else {
+              $stderr .= $buf;
+            }
+         }
+      }
+   }
+
+   waitpid($pid, 0);
+   $ret = $?>>8;
+
+   return ($ret, $stdout, $stderr)
+   }
+
 1

--- End Message ---
--- Begin Message ---
On Mon, 2013-03-25 at 21:52 +0100, Christoph Ulrich Scholler wrote:
> tinyca (0.7.5-4) unstable; urgency=medium
> 
>   * Ensured compatibility with openssl 1.0.1 (Closes: #702233). Thanks to
>     Mateusz Kijowski for the bug report.
>   * Fixed deprecation warning form perl about use of qw() without
>     parentheses (Closes: 702433). Thanks to Jörgen Hägg for the patch.

This was unblocked earlier today.

Regards,

Adam

--- End Message ---

Reply to: