commit tinyca2 for openSUSE:Factory
Hello community, here is the log from the commit of package tinyca2 for openSUSE:Factory checked in at 2013-11-29 21:25:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tinyca2 (Old) and /work/SRC/openSUSE:Factory/.tinyca2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "tinyca2" Changes: -------- --- /work/SRC/openSUSE:Factory/tinyca2/tinyca2.changes 2011-09-23 12:48:15.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.tinyca2.new/tinyca2.changes 2013-11-29 21:25:02.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Nov 29 14:35:37 UTC 2013 - lnussel@suse.de + +- fix tinyca not starting up (bnc#848907) and some deprecation warnings + 0001-fix-paranthesis-use.diff + 0002-fix-deprecation-warning.diff + 0003-fix-compatibility-with-openssl-1.0.1.diff + +------------------------------------------------------------------- New: ---- 0001-fix-paranthesis-use.diff 0002-fix-deprecation-warning.diff 0003-fix-compatibility-with-openssl-1.0.1.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tinyca2.spec ++++++ --- /var/tmp/diff_new_pack.MuSSRt/_old 2013-11-29 21:25:03.000000000 +0100 +++ /var/tmp/diff_new_pack.MuSSRt/_new 2013-11-29 21:25:03.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package tinyca2 # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,8 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: tinyca2 BuildRequires: update-desktop-files @@ -24,15 +22,20 @@ %define libdir %{_datadir}/TinyCA2/lib %define templatesdir %{_datadir}/TinyCA2/templates %define localedir %{_datadir}/locale/ -Group: Productivity/Networking/Security -License: GPL-2.0+ -Requires: perl perl-Gtk2 perl-MIME-Base64 +Requires: perl +Requires: perl-Gtk2 +Requires: perl-MIME-Base64 Version: 0.7.5 -Release: 57 +Release: 0 Source0: %{name}-%{version}.tar.bz2 Patch0: 0001-fix-combobox-strings-for-extended-key-usage.diff Patch1: 0002-add-support-for-Microsoft-extendedKeyUsage-attributes.diff +Patch2: 0001-fix-paranthesis-use.diff +Patch3: 0002-fix-deprecation-warning.diff +Patch4: 0003-fix-compatibility-with-openssl-1.0.1.diff Summary: A Graphical Tool for Managing a Certification Authority +License: GPL-2.0+ +Group: Productivity/Networking/Security BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: tinyca:/usr/bin/tinyca @@ -64,6 +67,9 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build # Configure pristine source ++++++ 0001-fix-paranthesis-use.diff ++++++
From a4d57b429282b4adcab82666994a5dd75e8709dc Mon Sep 17 00:00:00 2001 From: Ludwig Nussel
Date: Fri, 29 Nov 2013 15:32:02 +0100 Subject: [PATCH 1/3] fix paranthesis use
patch from debian --- lib/GUI.pm | 14 +++++++------- lib/GUI/X509_browser.pm | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/GUI.pm b/lib/GUI.pm index 3ed2eec..67a5c2d 100644 --- a/lib/GUI.pm +++ b/lib/GUI.pm @@ -978,7 +978,7 @@ sub create_detail_tree { $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 @@ sub create_detail_tree { $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 @@ sub create_detail_tree { $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 @@ sub create_detail_tree { $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 @@ sub create_detail_tree { $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, @@ -1249,7 +1249,7 @@ sub show_req_dialog { # table for request data my $cc=0; my $ous = 1; - if(defined($opts->{'OU'})) { + if(defined($opts->{'OU'}) and defined @{$opts->{'OU'}}) { $ous = @{$opts->{'OU'}} - 1; } $reqtable = Gtk2::Table->new(1, 13 + $ous, 0); @@ -1297,7 +1297,7 @@ sub show_req_dialog { _("Organization Name (eg. company):"), \$opts->{'O'}, $reqtable, 10, 1); - if(defined($opts->{'OU'})) { + if(defined($opts->{'OU'}) and defined @{$opts->{'OU'}}) { foreach my $ou (@{$opts->{'OU'}}) { $entry = GUI::HELPERS::entry_to_table( _("Organizational Unit Name (eg. section):"), diff --git a/lib/GUI/X509_browser.pm b/lib/GUI/X509_browser.pm index 4fb6cec..8cb1a71 100644 --- a/lib/GUI/X509_browser.pm +++ b/lib/GUI/X509_browser.pm @@ -624,7 +624,7 @@ sub selection_cadir { $dir = $self->{'actdir'}; # cut off the last directory name to provide the ca-directory - $dir =~ s/\/certs|\/req|\/keys$//; + $dir =~ s/(\/certs|\/req|\/keys)$//; return($dir); } -- 1.8.1.4 ++++++ 0002-fix-deprecation-warning.diff ++++++
From aaebad85d307eeaf38c7f497efee0b278f0fc317 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel
Date: Fri, 29 Nov 2013 15:32:15 +0100 Subject: [PATCH 2/3] fix deprecation warning
patch from debian
---
lib/GUI.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/GUI.pm b/lib/GUI.pm
index 67a5c2d..d9c4064 100644
--- a/lib/GUI.pm
+++ b/lib/GUI.pm
@@ -2521,7 +2521,7 @@ sub about {
my ($aboutdialog, $href, $label);
$aboutdialog = Gtk2::AboutDialog->new();
- $aboutdialog->set_name("TinyCA2");
+ $aboutdialog->set_program_name("TinyCA2");
$aboutdialog->set_version($main->{'version'});
$aboutdialog->set_copyright("2002-2006 Stephan Martin");
$aboutdialog->set_license("GNU Public License (GPL)");
@@ -2534,6 +2534,8 @@ sub about {
_("French: Thibault Le Meur
From 85e927728ea21cd9ae30530efe606ba3d95b15a5 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel
Date: Fri, 29 Nov 2013 15:32:32 +0100 Subject: [PATCH 3/3] fix compatibility with openssl 1.0.1
patch from debian --- lib/OpenSSL.pm | 101 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 81 insertions(+), 20 deletions(-) diff --git a/lib/OpenSSL.pm b/lib/OpenSSL.pm index 3422bcf..0645bda 100644 --- a/lib/OpenSSL.pm +++ b/lib/OpenSSL.pm @@ -22,6 +22,7 @@ package OpenSSL; use POSIX; use IPC::Open3; +use IO::Select; use Time::Local; sub new { @@ -41,7 +42,7 @@ sub new { 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 @@ sub convdata { 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 @@ sub convdata { $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 @@ sub convdata { } } - 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 @@ sub _get_index { } } + +=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 -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de