Hello community, here is the log from the commit of package rubygem-gpgme for openSUSE:Factory checked in at 2017-09-26 21:13:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-gpgme (Old) and /work/SRC/openSUSE:Factory/.rubygem-gpgme.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-gpgme" Tue Sep 26 21:13:23 2017 rev:6 rq:514942 version:2.0.13 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-gpgme/rubygem-gpgme.changes 2016-04-28 16:52:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gpgme.new/rubygem-gpgme.changes 2017-09-26 21:13:33.965620754 +0200 @@ -1,0 +2,6 @@ +Thu Aug 3 19:19:48 UTC 2017 - co...@suse.com + +- updated to version 2.0.13 + no changelog found + +------------------------------------------------------------------- Old: ---- gpgme-2.0.12.gem New: ---- gpgme-2.0.13.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-gpgme.spec ++++++ --- /var/tmp/diff_new_pack.rb1gp7/_old 2017-09-26 21:13:35.037470033 +0200 +++ /var/tmp/diff_new_pack.rb1gp7/_new 2017-09-26 21:13:35.041469470 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-gpgme # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-gpgme -Version: 2.0.12 +Version: 2.0.13 Release: 0 %define mod_name gpgme %define mod_full_name %{mod_name}-%{version} ++++++ gpgme-2.0.12.gem -> gpgme-2.0.13.gem ++++++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/gpgme/extconf.rb new/ext/gpgme/extconf.rb --- old/ext/gpgme/extconf.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/ext/gpgme/extconf.rb 2017-07-02 05:07:25.000000000 +0200 @@ -62,9 +62,12 @@ require 'rubygems' require 'mini_portile2' - libgpg_error_recipe = MiniPortile.new('libgpg-error', '1.21').tap do |recipe| + libgpg_error_recipe = MiniPortile.new('libgpg-error', '1.27').tap do |recipe| recipe.target = File.join(ROOT, "ports") - recipe.files = ["ftp://ftp.gnupg.org/gcrypt/#{recipe.name}/#{recipe.name}-#{recipe.version}.tar.bz2"] + recipe.files = [{ + :url => "https://www.gnupg.org/ftp/gcrypt/#{recipe.name}/#{recipe.name}-#{recipe.version}.tar.bz2", + :sha256 => '4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2' + }] recipe.configure_options = [ '--disable-shared', '--enable-static', @@ -79,9 +82,12 @@ recipe.activate end - libassuan_recipe = MiniPortile.new('libassuan', '2.4.2').tap do |recipe| + libassuan_recipe = MiniPortile.new('libassuan', '2.4.3').tap do |recipe| recipe.target = File.join(ROOT, "ports") - recipe.files = ["ftp://ftp.gnupg.org/gcrypt/#{recipe.name}/#{recipe.name}-#{recipe.version}.tar.bz2"] + recipe.files = [{ + :url => "https://www.gnupg.org/ftp/gcrypt/#{recipe.name}/#{recipe.name}-#{recipe.version}.tar.bz2", + :sha256 => '22843a3bdb256f59be49842abf24da76700354293a066d82ade8134bb5aa2b71' + }] recipe.configure_options = [ '--disable-shared', '--enable-static', @@ -96,9 +102,12 @@ recipe.activate end - gpgme_recipe = MiniPortile.new('gpgme', '1.6.0').tap do |recipe| + gpgme_recipe = MiniPortile.new('gpgme', '1.9.0').tap do |recipe| recipe.target = File.join(ROOT, "ports") - recipe.files = ["ftp://ftp.gnupg.org/gcrypt/#{recipe.name}/#{recipe.name}-#{recipe.version}.tar.bz2"] + recipe.files = [{ + :url => "https://www.gnupg.org/ftp/gcrypt/#{recipe.name}/#{recipe.name}-#{recipe.version}.tar.bz2", + :sha256 => '1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb' + }] recipe.configure_options = [ '--disable-shared', '--enable-static', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/gpgme/gpgme_n.c new/ext/gpgme/gpgme_n.c --- old/ext/gpgme/gpgme_n.c 2016-01-19 06:48:40.000000000 +0100 +++ new/ext/gpgme/gpgme_n.c 2017-07-02 05:07:25.000000000 +0200 @@ -197,6 +197,53 @@ } static VALUE +rb_s_gpgme_ctx_get_engine_info (VALUE dummy, VALUE vctx, VALUE rinfo) +{ + long idx; + + gpgme_ctx_t ctx; + + UNWRAP_GPGME_CTX(vctx, ctx); + if (!ctx) + rb_raise (rb_eArgError, "released ctx"); + + gpgme_engine_info_t info = gpgme_ctx_get_engine_info (ctx); + for (idx = 0; info; info = info->next, idx++) + { + VALUE vinfo = rb_class_new_instance (0, NULL, cEngineInfo); + rb_iv_set (vinfo, "@protocol", INT2FIX(info->protocol)); + if (info->file_name) + rb_iv_set (vinfo, "@file_name", rb_str_new2 (info->file_name)); + if (info->version) + rb_iv_set (vinfo, "@version", rb_str_new2 (info->version)); + if (info->req_version) + rb_iv_set (vinfo, "@req_version", rb_str_new2 (info->req_version)); + if (info->home_dir) + rb_iv_set (vinfo, "@home_dir", rb_str_new2 (info->home_dir)); + rb_ary_store (rinfo, idx, vinfo); + } + return Qnil; +} + +static VALUE +rb_s_gpgme_ctx_set_engine_info (VALUE dummy, VALUE vctx, VALUE vproto, VALUE vfile_name, + VALUE vhome_dir) +{ + gpgme_ctx_t ctx; + + UNWRAP_GPGME_CTX(vctx, ctx); + if (!ctx) + rb_raise (rb_eArgError, "released ctx"); + gpgme_error_t err = gpgme_ctx_set_engine_info (ctx, + NUM2INT(vproto), + NIL_P(vfile_name) ? NULL : + StringValueCStr(vfile_name), + NIL_P(vhome_dir) ? NULL : + StringValueCStr(vhome_dir)); + return LONG2NUM(err); +} + +static VALUE rb_s_gpgme_pubkey_algo_name (VALUE dummy, VALUE valgo) { const char *name = gpgme_pubkey_algo_name (NUM2INT(valgo)); @@ -843,7 +890,13 @@ { VALUE string = rb_str_new2 (data); #ifdef HAVE_RUBY_ENCODING_H + /* We assume all the C strings from GPGME are in UTF-8 encoding. + If there is any string which cannot be represented in UTF-8, + set the string's encoding to ASCII-8BIT and leave the caller to + detect the encoding. */ rb_enc_associate_index (string, rb_enc_find_index ("UTF-8")); + if (rb_enc_str_coderange (string) == ENC_CODERANGE_BROKEN) + rb_enc_associate_index (string, rb_enc_find_index ("ASCII-8BIT")); #endif return string; } @@ -2203,7 +2256,10 @@ rb_s_gpgme_get_engine_info, 1); rb_define_module_function (mGPGME, "gpgme_set_engine_info", rb_s_gpgme_set_engine_info, 3); - + rb_define_module_function (mGPGME, "gpgme_ctx_get_engine_info", + rb_s_gpgme_ctx_get_engine_info, 2); + rb_define_module_function (mGPGME, "gpgme_ctx_set_engine_info", + rb_s_gpgme_ctx_set_engine_info, 4); rb_define_module_function (mGPGME, "gpgme_pubkey_algo_name", rb_s_gpgme_pubkey_algo_name, 1); rb_define_module_function (mGPGME, "gpgme_hash_algo_name", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gpgme/key_common.rb new/lib/gpgme/key_common.rb --- old/lib/gpgme/key_common.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/lib/gpgme/key_common.rb 2017-07-02 05:07:25.000000000 +0200 @@ -16,10 +16,10 @@ # +:encrypt+, +:sign+, +:certify+ or +:authenticate+ def capability caps = [] - caps << :encrypt if @can_encrypt - caps << :sign if @can_sign - caps << :certify if @can_certify - caps << :authenticate if @can_authenticate + caps << :encrypt if @can_encrypt == 1 + caps << :sign if @can_sign == 1 + caps << :certify if @can_certify == 1 + caps << :authenticate if @can_authenticate == 1 caps end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gpgme/sub_key.rb new/lib/gpgme/sub_key.rb --- old/lib/gpgme/sub_key.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/lib/gpgme/sub_key.rb 2017-07-02 05:07:25.000000000 +0200 @@ -30,7 +30,7 @@ end def sha - (@fingerprint || @keyid)[-8 .. -1] + (@fpr || @keyid)[-8 .. -1] end PUBKEY_ALGO_LETTERS = { @@ -49,7 +49,7 @@ secret? ? 'ssc' : 'sub', length, pubkey_algo_letter, - (@fingerprint || @keyid)[-8 .. -1], + (@fpr || @keyid)[-8 .. -1], timestamp.strftime('%Y-%m-%d'), trust.inspect, capability.inspect) @@ -60,7 +60,7 @@ secret? ? 'ssc' : 'sub', length, pubkey_algo_letter, - (@fingerprint || @keyid)[-8 .. -1], + (@fpr || @keyid)[-8 .. -1], timestamp.strftime('%Y-%m-%d')) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gpgme/version.rb new/lib/gpgme/version.rb --- old/lib/gpgme/version.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/lib/gpgme/version.rb 2017-07-02 05:07:25.000000000 +0200 @@ -1,4 +1,4 @@ module GPGME # The version of GPGME ruby binding you are using - VERSION = "2.0.12" + VERSION = "2.0.13" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-01-19 06:48:40.000000000 +0100 +++ new/metadata 2017-07-02 05:07:25.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: gpgme version: !ruby/object:Gem::Version - version: 2.0.12 + version: 2.0.13 platform: ruby authors: - Daiki Ueno @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2016-01-19 00:00:00.000000000 Z +date: 2017-07-02 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: mini_portile2 @@ -17,14 +17,14 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: 2.1.0 + version: '2.1' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 2.1.0 + version: '2.1' - !ruby/object:Gem::Dependency name: mocha requirement: !ruby/object:Gem::Requirement @@ -131,9 +131,9 @@ - lib/gpgme/sub_key.rb - lib/gpgme/user_id.rb - lib/gpgme/version.rb -- ports/archives/gpgme-1.6.0.tar.bz2 -- ports/archives/libassuan-2.4.2.tar.bz2 -- ports/archives/libgpg-error-1.21.tar.bz2 +- ports/archives/gpgme-1.9.0.tar.bz2 +- ports/archives/libassuan-2.4.3.tar.bz2 +- ports/archives/libgpg-error-1.27.tar.bz2 - test/crypto_test.rb - test/ctx_test.rb - test/data_test.rb @@ -166,9 +166,8 @@ version: '0' requirements: [] rubyforge_project: ruby-gpgme -rubygems_version: 2.4.8 +rubygems_version: 2.5.2 signing_key: specification_version: 4 summary: Ruby binding of GPGME. test_files: [] -has_rdoc: true Binary files old/ports/archives/gpgme-1.6.0.tar.bz2 and new/ports/archives/gpgme-1.6.0.tar.bz2 differ Binary files old/ports/archives/gpgme-1.9.0.tar.bz2 and new/ports/archives/gpgme-1.9.0.tar.bz2 differ Binary files old/ports/archives/libassuan-2.4.2.tar.bz2 and new/ports/archives/libassuan-2.4.2.tar.bz2 differ Binary files old/ports/archives/libassuan-2.4.3.tar.bz2 and new/ports/archives/libassuan-2.4.3.tar.bz2 differ Binary files old/ports/archives/libgpg-error-1.21.tar.bz2 and new/ports/archives/libgpg-error-1.21.tar.bz2 differ Binary files old/ports/archives/libgpg-error-1.27.tar.bz2 and new/ports/archives/libgpg-error-1.27.tar.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/crypto_test.rb new/test/crypto_test.rb --- old/test/crypto_test.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/test/crypto_test.rb 2017-07-02 05:07:26.000000000 +0200 @@ -4,7 +4,7 @@ describe GPGME::Crypto do before do - skip unless GPGME::Engine.check_version GPGME::PROTOCOL_OpenPGP + skip unless ensure_keys GPGME::PROTOCOL_OpenPGP end describe "default options functionality" do @@ -43,7 +43,7 @@ describe :encrypt do it "should raise an error if the recipients aren't trusted" do - assert_raises GPGME::Error::General do + assert_raises GPGME::Error::UnusablePublicKey do GPGME::Crypto.new.encrypt TEXT[:plain] end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/ctx_test.rb new/test/ctx_test.rb --- old/test/ctx_test.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/test/ctx_test.rb 2017-07-02 05:07:26.000000000 +0200 @@ -3,7 +3,7 @@ describe GPGME::Ctx do before do - skip unless GPGME::Engine.check_version GPGME::PROTOCOL_OpenPGP + skip unless ensure_keys GPGME::PROTOCOL_OpenPGP end it "can instantiate" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/key_test.rb new/test/key_test.rb --- old/test/key_test.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/test/key_test.rb 2017-07-02 05:07:26.000000000 +0200 @@ -3,7 +3,7 @@ describe GPGME::Key do before do - skip unless GPGME::Engine.check_version GPGME::PROTOCOL_OpenPGP + skip unless ensure_keys GPGME::PROTOCOL_OpenPGP end it "has certain attributes" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/signature_test.rb new/test/signature_test.rb --- old/test/signature_test.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/test/signature_test.rb 2017-07-02 05:07:26.000000000 +0200 @@ -3,7 +3,7 @@ describe GPGME::Signature do before do - skip unless GPGME::Engine.check_version GPGME::PROTOCOL_OpenPGP + skip unless ensure_keys GPGME::PROTOCOL_OpenPGP end it "#valid? is true when the signature is valid" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/sub_key_test.rb new/test/sub_key_test.rb --- old/test/sub_key_test.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/test/sub_key_test.rb 2017-07-02 05:07:26.000000000 +0200 @@ -3,7 +3,7 @@ describe GPGME::SubKey do before do - skip unless GPGME::Engine.check_version GPGME::PROTOCOL_OpenPGP + skip unless ensure_keys GPGME::PROTOCOL_OpenPGP end # We trust Key for common methods that come from KeyCommon diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_helper.rb new/test/test_helper.rb --- old/test/test_helper.rb 2016-01-19 06:48:40.000000000 +0100 +++ new/test/test_helper.rb 2017-07-02 05:07:26.000000000 +0200 @@ -82,12 +82,33 @@ end end -if GPGME::Engine.check_version GPGME::PROTOCOL_OpenPGP - # We use a different home directory for the keys to not disturb current - # installation +DIRS = [] - require 'tmpdir' - GPGME::Engine.home_dir = Dir.tmpdir - remove_all_keys - import_keys +at_exit do + DIRS.each do |dir| + FileUtils.remove_entry dir + end + DIRS.clear +end + +def ensure_keys(proto) + return false unless GPGME::Engine.check_version proto + + case proto + when GPGME::PROTOCOL_OpenPGP + # We use a different home directory for the keys to not disturb current + # installation + require 'tmpdir' + + if DIRS.empty? + dir = Dir.mktmpdir + GPGME::Engine.home_dir = dir + DIRS.push(dir) + remove_all_keys + import_keys + end + true + else + return false + end end