Hello community, here is the log from the commit of package rubygem-gpgme for openSUSE:Factory checked in at 2015-08-28 08:27:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-gpgme (Old) and /work/SRC/openSUSE:Factory/.rubygem-gpgme.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-gpgme" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-gpgme/rubygem-gpgme.changes 2015-07-28 11:43:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-gpgme.new/rubygem-gpgme.changes 2015-08-28 08:27:24.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Aug 27 04:29:24 UTC 2015 - co...@suse.com + +- updated to version 2.0.10 + no changelog found + +------------------------------------------------------------------- Old: ---- gpgme-2.0.9.gem New: ---- gpgme-2.0.10.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-gpgme.spec ++++++ --- /var/tmp/diff_new_pack.6nb4AS/_old 2015-08-28 08:27:25.000000000 +0200 +++ /var/tmp/diff_new_pack.6nb4AS/_new 2015-08-28 08:27:25.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-gpgme -Version: 2.0.9 +Version: 2.0.10 Release: 0 %define mod_name gpgme %define mod_full_name %{mod_name}-%{version} ++++++ gpgme-2.0.9.gem -> gpgme-2.0.10.gem ++++++ 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 2015-07-24 06:50:01.000000000 +0200 +++ new/ext/gpgme/extconf.rb 2015-08-27 03:44:37.000000000 +0200 @@ -62,7 +62,7 @@ require 'rubygems' require 'mini_portile' - libgpg_error_recipe = MiniPortile.new('libgpg-error', '1.19').tap do |recipe| + libgpg_error_recipe = MiniPortile.new('libgpg-error', '1.20').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.configure_options = [ @@ -96,7 +96,7 @@ recipe.activate end - gpgme_recipe = MiniPortile.new('gpgme', '1.5.5').tap do |recipe| + gpgme_recipe = MiniPortile.new('gpgme', '1.6.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.configure_options = [ 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 2015-07-24 06:50:01.000000000 +0200 +++ new/ext/gpgme/gpgme_n.c 2015-08-27 03:44:37.000000000 +0200 @@ -622,6 +622,54 @@ return Qnil; } +#if defined(GPGME_VERSION_NUMBER) && GPGME_VERSION_NUMBER >= 0x010600 +static gpgme_error_t +status_cb (void *hook, const char *keyword, const char *args) +{ + VALUE vcb = (VALUE)hook, vstatusfunc, vhook_value; + + vstatusfunc = RARRAY_PTR(vcb)[0]; + vhook_value = RARRAY_PTR(vcb)[1]; + + rb_funcall (vstatusfunc, rb_intern ("call"), 3, + vhook_value, + keyword ? rb_str_new2 (keyword) : Qnil, + args ? rb_str_new2 (args) : Qnil); + return gpgme_err_make (GPG_ERR_SOURCE_USER_1, GPG_ERR_NO_ERROR); +} + +static VALUE +rb_s_gpgme_set_status_cb (VALUE dummy, VALUE vctx, VALUE vstatusfunc, + VALUE vhook_value) +{ + gpgme_ctx_t ctx; + VALUE vcb = rb_ary_new (); + + rb_ary_push (vcb, vstatusfunc); + rb_ary_push (vcb, vhook_value); + /* Keep a reference to avoid GC. */ + rb_iv_set (vctx, "@status_cb", vcb); + + UNWRAP_GPGME_CTX(vctx, ctx); + if (!ctx) + rb_raise (rb_eArgError, "released ctx"); + gpgme_set_status_cb (ctx, status_cb, (void*)vcb); + return Qnil; +} + +static VALUE +rb_s_gpgme_get_status_cb (VALUE dummy, VALUE vctx, VALUE rstatusfunc, + VALUE rhook_value) +{ + VALUE vcb = rb_iv_get (vctx, "@status_cb"); + + /* No need to call gpgme_get_status_cb. */ + rb_ary_store (rstatusfunc, 0, RARRAY_PTR(vcb)[0]); + rb_ary_store (rhook_value, 0, RARRAY_PTR(vcb)[1]); + return Qnil; +} +#endif + static void progress_cb (void *hook, const char *what, int type, int current, int total) { @@ -709,6 +757,35 @@ } #endif +#if defined(GPGME_VERSION_NUMBER) && GPGME_VERSION_NUMBER >= 0x010600 +static VALUE +rb_s_gpgme_set_offline (VALUE dummy, VALUE vctx, VALUE vyes) +{ + gpgme_ctx_t ctx; + + UNWRAP_GPGME_CTX(vctx, ctx); + if (!ctx) + rb_raise (rb_eArgError, "released ctx"); + + gpgme_set_offline (ctx, vyes == Qtrue); + return Qnil; +} + +static VALUE +rb_s_gpgme_get_offline (VALUE dummy, VALUE vctx) +{ + gpgme_ctx_t ctx; + int yes; + + UNWRAP_GPGME_CTX(vctx, ctx); + if (!ctx) + rb_raise (rb_eArgError, "released ctx"); + + yes = gpgme_get_offline (ctx); + return yes ? Qtrue : Qfalse; +} +#endif + static VALUE rb_s_gpgme_op_keylist_start (VALUE dummy, VALUE vctx, VALUE vpattern, VALUE vsecret_only) @@ -2246,6 +2323,16 @@ rb_s_gpgme_get_progress_cb, 3); rb_define_module_function (mGPGME, "gpgme_set_locale", rb_s_gpgme_set_locale, 3); +#if defined(GPGME_VERSION_NUMBER) && GPGME_VERSION_NUMBER >= 0x010600 + rb_define_module_function (mGPGME, "gpgme_set_offline", + rb_s_gpgme_set_offline, 2); + rb_define_module_function (mGPGME, "gpgme_get_offline", + rb_s_gpgme_get_offline, 1); + rb_define_module_function (mGPGME, "gpgme_set_status_cb", + rb_s_gpgme_set_status_cb, 3); + rb_define_module_function (mGPGME, "gpgme_get_status_cb", + rb_s_gpgme_get_status_cb, 3); +#endif /* Key Management */ rb_define_module_function (mGPGME, "gpgme_op_keylist_start", @@ -2877,4 +2964,26 @@ rb_define_const (mGPGME, "GPGME_SPAWN_ALLOW_SET_FG", INT2FIX(GPGME_SPAWN_ALLOW_SET_FG)); #endif + + /* This flag was added in 1.2.0. */ +#ifdef GPGME_EXPORT_MODE_EXTERN + rb_define_const (mGPGME, "GPGME_EXPORT_MODE_EXTERN", + INT2FIX(GPGME_EXPORT_MODE_EXTERN)); +#endif + + /* This flag was added in 1.3.0. */ +#ifdef GPGME_EXPORT_MODE_MINIMAL + rb_define_const (mGPGME, "GPGME_EXPORT_MODE_MINIMAL", + INT2FIX(GPGME_EXPORT_MODE_MINIMAL)); +#endif + + /* These flags were added in 1.6.0. */ +#if defined(GPGME_VERSION_NUMBER) && GPGME_VERSION_NUMBER >= 0x010600 + rb_define_const (mGPGME, "GPGME_EXPORT_MODE_SECRET", + INT2FIX(GPGME_EXPORT_MODE_SECRET)); + rb_define_const (mGPGME, "GPGME_EXPORT_MODE_RAW", + INT2FIX(GPGME_EXPORT_MODE_RAW)); + rb_define_const (mGPGME, "GPGME_EXPORT_MODE_PKCS12", + INT2FIX(GPGME_EXPORT_MODE_PKCS12)); +#endif } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gpgme/constants.rb new/lib/gpgme/constants.rb --- old/lib/gpgme/constants.rb 2015-07-24 06:50:01.000000000 +0200 +++ new/lib/gpgme/constants.rb 2015-08-27 03:44:37.000000000 +0200 @@ -236,6 +236,20 @@ SPAWN_ALLOW_SET_FG = GPGME_SPAWN_ALLOW_SET_FG end + if defined?(GPGME_EXPORT_MODE_EXTERN) + EXPORT_MODE_EXTERN = GPGME_EXPORT_MODE_EXTERN + end + + if defined?(GPGME_EXPORT_MODE_MINIMAL) + EXPORT_MODE_MINIMAL = GPGME_EXPORT_MODE_MINIMAL + end + + if defined?(GPGME_EXPORT_MODE_SECRET) + EXPORT_MODE_SECRET = GPGME_EXPORT_MODE_SECRET + EXPORT_MODE_RAW = GPGME_EXPORT_MODE_RAW + EXPORT_MODE_PKCS12 = GPGME_EXPORT_MODE_PKCS12 + end + KEYLIST_MODE_NAMES = { KEYLIST_MODE_LOCAL => :local, KEYLIST_MODE_EXTERN => :extern, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/gpgme/ctx.rb new/lib/gpgme/ctx.rb --- old/lib/gpgme/ctx.rb 2015-07-24 06:50:01.000000000 +0200 +++ new/lib/gpgme/ctx.rb 2015-08-27 03:44:37.000000000 +0200 @@ -23,11 +23,14 @@ # * +:pinentry_mode+ One of: +PINENTRY_MODE_DEFAULT+, # +PINENTRY_MODE_ASK+, +PINENTRY_MODE_CANCEL+, # +PINENTRY_MODE_ERROR+, or +PINENTRY_MODE_LOOPBACK+. + # * +:offline+ if set to true, dirmngr will not contact external services # * +:password+ password of the passphrased password being used. # * +:passphrase_callback+ A callback function. See {#set_passphrase_callback}. # * +:passphrase_callback_value+ An object passed to passphrase_callback. # * +:progress_callback+ A callback function. See {#set_progress_callback}. # * +:progress_callback_value+ An object passed to progress_callback. + # * +:status_callback+ A callback function. See {#set_status_callback}. + # * +:status_callback_value+ An object passed to status_callback. # # @example # ctx = GPGME::Ctx.new @@ -51,6 +54,7 @@ ctx.textmode = options[:textmode] if options[:textmode] ctx.keylist_mode = options[:keylist_mode] if options[:keylist_mode] ctx.pinentry_mode = options[:pinentry_mode] if options[:pinentry_mode] + ctx.offline = options[:offline] if options[:offline] if options[:password] ctx.set_passphrase_callback GPGME::Ctx.method(:pass_function), @@ -65,6 +69,10 @@ ctx.set_progress_callback options[:progress_callback], options[:progress_callback_value] end + if options[:status_callback] + ctx.set_status_callback options[:status_callback], + options[:status_callback_value] + end if block_given? begin @@ -153,6 +161,18 @@ GPGME::gpgme_get_pinentry_mode(self) end + # Change the default behaviour of the dirmngr that might require + # connections to external services. + def offline=(mode) + GPGME::gpgme_set_offline(self, mode) + mode + end + + # Return the current offline mode. + def offline + GPGME::gpgme_get_offline(self) + end + ## # Passphrase and progress callbacks ## @@ -223,6 +243,23 @@ end alias set_progress_cb set_progress_callback + # Set the status callback with given hook value. + # +statusfunc+ should respond to +call+ with 3 arguments. + # + # * +obj+ the parameter +:status_callback_value+ passed when creating + # the {GPGME::Ctx} object. + # * +keyword+ the name of the status message + # * +args+ any arguments for the status message + # + # def status_function(obj, keyword, args) + # $stderr.puts("#{keyword} #{args}") + # return 0 + # end + def set_status_callback(statusfunc, hook_value = nil) + GPGME::gpgme_set_status_cb(self, statusfunc, hook_value) + end + alias set_status_cb set_status_callback + ## # Searching and iterating through keys. Used by {GPGME::Key.find} ## 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 2015-07-24 06:50:01.000000000 +0200 +++ new/lib/gpgme/version.rb 2015-08-27 03:44:37.000000000 +0200 @@ -1,4 +1,4 @@ module GPGME # The version of GPGME ruby binding you are using - VERSION = "2.0.9" + VERSION = "2.0.10" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-07-24 06:50:01.000000000 +0200 +++ new/metadata 2015-08-27 03:44:37.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: gpgme version: !ruby/object:Gem::Version - version: 2.0.9 + version: 2.0.10 platform: ruby authors: - Daiki Ueno @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2015-07-24 00:00:00.000000000 Z +date: 2015-08-27 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: mini_portile @@ -131,9 +131,12 @@ - lib/gpgme/sub_key.rb - lib/gpgme/user_id.rb - lib/gpgme/version.rb -- ports/archives/gpgme-1.5.5.tar.bz2 +- ports/archives/gpgme-1.6.0.tar.bz2 +- ports/archives/gpgme-1.6.0.tar.bz2.sig +- ports/archives/libassuan-2.1.2.tar.bz2 - ports/archives/libassuan-2.2.1.tar.bz2 -- ports/archives/libgpg-error-1.19.tar.bz2 +- ports/archives/libgpg-error-1.20.tar.bz2 +- ports/archives/libgpg-error-1.20.tar.bz2.sig - test/crypto_test.rb - test/ctx_test.rb - test/data_test.rb @@ -166,8 +169,9 @@ version: '0' requirements: [] rubyforge_project: ruby-gpgme -rubygems_version: 2.2.2 +rubygems_version: 2.4.8 signing_key: specification_version: 4 summary: Ruby binding of GPGME. test_files: [] +has_rdoc: true Files old/ports/archives/gpgme-1.5.5.tar.bz2 and new/ports/archives/gpgme-1.5.5.tar.bz2 differ Files old/ports/archives/gpgme-1.6.0.tar.bz2 and new/ports/archives/gpgme-1.6.0.tar.bz2 differ Files old/ports/archives/gpgme-1.6.0.tar.bz2.sig and new/ports/archives/gpgme-1.6.0.tar.bz2.sig differ Files old/ports/archives/libassuan-2.1.2.tar.bz2 and new/ports/archives/libassuan-2.1.2.tar.bz2 differ Files old/ports/archives/libgpg-error-1.19.tar.bz2 and new/ports/archives/libgpg-error-1.19.tar.bz2 differ Files old/ports/archives/libgpg-error-1.20.tar.bz2 and new/ports/archives/libgpg-error-1.20.tar.bz2 differ Files old/ports/archives/libgpg-error-1.20.tar.bz2.sig and new/ports/archives/libgpg-error-1.20.tar.bz2.sig differ