]> git.pld-linux.org Git - packages/mbank-cli.git/commitdiff
- up to 1.2.2 auto/th/mbank-cli-1.2.2-1
authorJan Palus <atler@pld-linux.org>
Sat, 25 Oct 2014 18:14:40 +0000 (20:14 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 25 Oct 2014 18:24:40 +0000 (20:24 +0200)
- epoch 1 due to changed versioning scheme
- defconf patch no longer requried
- ca patch updated
- ssl_opts patch for LWP::Protocol::https >= 6 taken from upstream
- updated source url
- BR: Term::ReadLine::Gnu for config wizard

mbank-cli-ca.patch
mbank-cli-defconf.patch [deleted file]
mbank-cli-ssl_opts.patch [new file with mode: 0644]
mbank-cli.spec

index ea1432a692d83bd5629a6d9904b624094099bba1..4e6e4c524d5452ee87f5d19f312d9447e6f74988 100644 (file)
@@ -1,19 +1,41 @@
-diff -uNr mbank-cli-20120215/mbank-cli mbank-cli-20120215.new/mbank-cli
---- mbank-cli-20120215/mbank-cli       2012-02-15 22:48:39.000000000 +0100
-+++ mbank-cli-20120215.new/mbank-cli   2012-02-23 14:40:56.453431641 +0100
-@@ -189,12 +189,12 @@
+diff -urN mbank-cli-1.2.2.orig/mbank-cli mbank-cli-1.2.2/mbank-cli
+--- mbank-cli-1.2.2.orig/mbank-cli     2014-10-25 12:19:48.139241025 +0200
++++ mbank-cli-1.2.2/mbank-cli  2014-10-25 12:20:41.925905849 +0200
+@@ -547,36 +547,7 @@
  
- sub lwp_init()
+ sub get_default_ca_path
  {
--  my $ca_dir = $ENV{HTTPS_CA_DIR};
--  $ca_dir //= '/etc/ssl/certs/';
-+  my $ca_file = $ENV{HTTPS_CA_FILE};
-+  $ca_file //= '/etc/certs/ca-certificates.crt';
-   map { delete $ENV{$_}; } grep(/^HTTPS_/, keys %ENV);
-   $ENV{'HTTPS_VERSION'} = 3;
-   $ENV{'HTTPS_DEBUG'} = 0;
--  $ENV{'HTTPS_CA_DIR'} = $ca_dir;
-+  $ENV{'HTTPS_CA_FILE'} = $ca_file;
-   umask(umask() | 077);
-   my $ua = new LWP::UserAgent(
-     agent => 'Mozilla/5.0',
+-    my ($name, @hashes) = @_;
+-    my $filename = "$name.crt";
+-    $filename =~ y/ /_/;
+-    my $path = "/usr/share/ca-certificates/mozilla/$filename";
+-    if (-r $path) {
+-        return $path;
+-    }
+-    my $ssl_cert_dir = $ENV{SSL_CERT_DIR};
+-    if (not defined($ssl_cert_dir) and $Net::SSLeay::VERSION >= 1.43) {
+-        # https://www.openssl.org/docs/crypto/SSLeay_version.html
+-        # SSLEAY_DIR == 5
+-        my $openssl_info = Net::SSLeay::SSLeay_version(5);
+-        my ($openssl_dir) = $openssl_info =~ m/\AOPENSSLDIR: "(.*)"\Z/;
+-        if (defined($openssl_dir)) {
+-            $ssl_cert_dir = "$openssl_dir/certs";
+-        }
+-    }
+-    if (defined($ssl_cert_dir)) {
+-        for my $hash (@hashes) {
+-            $path = "$ssl_cert_dir/$hash.0";
+-            # TODO: actually check if this is the certificate we want
+-            # hash collisions are unlikely, but not impossible
+-            -r $path or next;
+-            my $rpath = readlink($path) or next;
+-            $rpath =~ m{\A/}
+-                or $rpath = "$ssl_cert_dir/$rpath";
+-            return $rpath;
+-        }
+-    }
+-    return "$FindBin::Bin/ca.crt";
++    return '/etc/certs/ca-certificates.crt';
+ }
+ # ===========================
diff --git a/mbank-cli-defconf.patch b/mbank-cli-defconf.patch
deleted file mode 100644 (file)
index 6cf46c2..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -uNr mbank-cli-20120215/mbank-cli mbank-cli-20120215.new/mbank-cli
---- mbank-cli-20120215/mbank-cli       2012-02-15 22:48:39.000000000 +0100
-+++ mbank-cli-20120215.new/mbank-cli   2012-02-23 14:36:01.943098229 +0100
-@@ -70,8 +70,8 @@
- my $mbank_host = undef; # use set_country() to define
- my $mbank = undef; # use set_country() to define
--my $cookie_jar_file = './cookie-jar.txt';
--my $config_file = './mbank-cli.conf';
-+my $cookie_jar_file = "$ENV{ HOME }/.mbank-cli_cookie-jar.txt";
-+my $config_file = "$ENV{ HOME }/.mbank-cli.conf";
- my $http_read_size_hint = 1 << 20; # 1 MiB
- sub set_country($)
-@@ -302,7 +302,7 @@
-     eval { $digest_module = Digest->new('SHA-1'); } if $@;
-     $digest_module = Digest->new('MD5') if $@;
-   }
--  user_error "Can't open the config file: $!" unless open my $config, '<', $config_file;
-+  user_error "Can't open the config file ($config_file): $!" unless open my $config, '<', $config_file;
-   my $prev_digest = '';
-   $main::digest_module->new();
-   my $header = '';
diff --git a/mbank-cli-ssl_opts.patch b/mbank-cli-ssl_opts.patch
new file mode 100644 (file)
index 0000000..24cc478
--- /dev/null
@@ -0,0 +1,20 @@
+changeset:   715:41fa04634db2
+tag:         tip
+user:        Jakub Wilk <jwilk@jwilk.net>
+date:        Sat Oct 25 19:59:32 2014 +0200
+summary:     Always pass ssl_options to LWP >= 6.
+
+diff -r 78985f550841 -r 41fa04634db2 mbank-cli
+--- a/mbank-cli        Sat Oct 25 19:53:40 2014 +0200
++++ b/mbank-cli        Sat Oct 25 19:59:32 2014 +0200
+@@ -463,7 +463,8 @@
+         IO::Socket::SSL::set_args_filter_hack('use_defaults');
+         # TODO: Work around the bug also for earlier versions of
+         # IO::Socket::SSL, which don't support set_args_filter_hack().
+-    } elsif ($LWP::UserAgent::VERSION >= 6) {
++    }
++    if ($LWP::UserAgent::VERSION >= 6) {
+         $ua->ssl_opts(
+             @ssl_options,
+         )
+
index 1db66aa63a4e83a24b89ed34e6242cccb6efafce..007dfb12b740a524fbca0256a71541e2126079ed 100644 (file)
@@ -2,13 +2,14 @@
 Summary:       A command line interface to mBank
 Summary(pl.UTF-8):     Interfejs CLI do mBanku
 Name:          mbank-cli
-Version:       20140112
+Version:       1.2.2
 Release:       1
+Epoch:         1
 License:       GPL v2
 Group:         Applications/Console
-Source0:       http://mbank-cli.googlecode.com/files/%{name}-%{version}.tar.gz
-# Source0-md5: ed196f70dd78984925ae2f56fb31da3b
-Patch0:                %{name}-defconf.patch
+Source0:       https://bitbucket.org/jwilk/mbank-cli/downloads/%{name}-%{version}.tar.gz
+# Source0-md5: d7510c3084d4fb148d3723e3a0dd51d9
+Patch0:                %{name}-ssl_opts.patch
 Patch1:                %{name}-ca.patch
 URL:           http://code.google.com/p/mbank-cli/
 BuildRequires: perl-base >= 5.10
@@ -16,6 +17,7 @@ BuildRequires:        rpm-perlprov
 Requires:      ca-certificates
 Requires:      perl(LWP::Protocol::https)
 Requires:      perl(Net::SSL)
+Requires:      perl(Term::ReadLine::Gnu)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
This page took 0.195511 seconds and 4 git commands to generate.