[DRE-commits] [sup-mail] 12/26: Remove patches obsoleted by new upstream release

Per Andersson avtobiff at moszumanska.debian.org
Wed Oct 1 19:06:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

avtobiff pushed a commit to branch next-0.14.1.1
in repository sup-mail.

commit efdd4b4a4f32f075ff412aef2d4c4a19394da1ec
Author: Per Andersson <avtobiff at gmail.com>
Date:   Thu Aug 22 22:45:02 2013 +0200

    Remove patches obsoleted by new upstream release
---
 .../patches/0002-Fix-support-for-gpgme-2.0.patch   | 227 ---------------------
 .../0003-Update-tests-so-they-all-pass.patch       | 178 ----------------
 ...0004-Avoid-crash-when-maybe-wrapping-text.patch |  29 ---
 ...quire-iconv-and-locale-instead-of-gettext.patch |  23 ---
 ...Use-RbConfig-instead-of-deprecated-Config.patch |  22 --
 debian/patches/series                              |   5 -
 6 files changed, 484 deletions(-)

diff --git a/debian/patches/0002-Fix-support-for-gpgme-2.0.patch b/debian/patches/0002-Fix-support-for-gpgme-2.0.patch
deleted file mode 100644
index 9e68e5b..0000000
--- a/debian/patches/0002-Fix-support-for-gpgme-2.0.patch
+++ /dev/null
@@ -1,227 +0,0 @@
-From: Clint Byrum <clint at ubuntu.com>
-Date: Wed, 16 Nov 2011 23:33:00 -0800
-Subject: Fix support for gpgme 2.0
-
-* Add support for gpgme 2.0 and stay backward compatible with 1.0.
-* Add test suite for lib/sup/crypto.rb.
-* Update call to current GPGME::Data API.
-
-Taken from http://gitorious.org/sup/mainline/merge_requests/12
----
- lib/sup/crypto.rb   |   41 ++++++++++++++++---
- test/test_crypto.rb |  108 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 142 insertions(+), 7 deletions(-)
- create mode 100755 test/test_crypto.rb
-
-diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
-index bc96f88..4ddcf70 100644
---- a/lib/sup/crypto.rb
-+++ b/lib/sup/crypto.rb
-@@ -48,10 +48,17 @@ EOS
-     @gpgme_present =
-       begin
-         begin
--          GPGME.check_version({:protocol => GPGME::PROTOCOL_OpenPGP})
-+          begin
-+            GPGME.check_version({:protocol => GPGME::PROTOCOL_OpenPGP})
-+          rescue TypeError
-+            GPGME.check_version(nil)
-+          end
-           true
-         rescue GPGME::Error
-           false
-+        rescue ArgumentError
-+          # gpgme 2.0.0 raises this due to the hash->string conversion
-+          false
-         end
-       rescue NameError
-         false
-@@ -65,7 +72,11 @@ EOS
- 
-     # if gpg2 is available, it will start gpg-agent if required
-     if (bin = `which gpg2`.chomp) =~ /\S/
--      GPGME.set_engine_info GPGME::PROTOCOL_OpenPGP, bin, nil
-+      if GPGME.respond_to?('set_engine_info')
-+        GPGME.set_engine_info GPGME::PROTOCOL_OpenPGP, bin, nil
-+      else
-+        GPGME.gpgme_set_engine_info GPGME::PROTOCOL_OpenPGP, bin, nil
-+      end
-     else
-       # check if the gpg-options hook uses the passphrase_callback
-       # if it doesn't then check if gpg agent is present
-@@ -104,7 +115,13 @@ EOS
-                                {:operation => "sign", :options => gpg_opts}) || gpg_opts
- 
-     begin
--      sig = GPGME.detach_sign(format_payload(payload), gpg_opts)
-+      if GPGME.respond_to?('detach_sign')
-+        sig = GPGME.detach_sign(format_payload(payload), gpg_opts)
-+      else
-+        crypto = GPGME::Crypto.new
-+        gpg_opts[:mode] = GPGME::SIG_MODE_DETACH
-+        sig = crypto.sign(format_payload(payload), gpg_opts).read
-+      end
-     rescue GPGME::Error => exc
-       raise Error, gpgme_exc_msg(exc.message)
-     end
-@@ -137,7 +154,13 @@ EOS
-     recipients = to + [from]
- 
-     begin
--      cipher = GPGME.encrypt(recipients, format_payload(payload), gpg_opts)
-+      if GPGME.respond_to?('encrypt')
-+        cipher = GPGME.encrypt(recipients, format_payload(payload), gpg_opts)
-+      else
-+        crypto = GPGME::Crypto.new
-+        gpg_opts[:recipients] = recipients
-+        cipher = crypto.encrypt(format_payload(payload), gpg_opts).read
-+      end
-     rescue GPGME::Error => exc
-       raise Error, gpgme_exc_msg(exc.message)
-     end
-@@ -223,7 +246,7 @@ EOS
-       plain_data = nil
-     else
-       signed_text_data = nil
--      plain_data = GPGME::Data.empty
-+      plain_data = GPGME::Data.empty!
-     end
-     begin
-       ctx.verify(sig_data, signed_text_data, plain_data)
-@@ -246,7 +269,11 @@ EOS
-                                {:operation => "decrypt", :options => gpg_opts}) || gpg_opts
-     ctx = GPGME::Ctx.new(gpg_opts)
-     cipher_data = GPGME::Data.from_str(format_payload(payload))
--    plain_data = GPGME::Data.empty
-+    if GPGME::Data.respond_to?('empty')
-+      plain_data = GPGME::Data.empty
-+    else
-+      plain_data = GPGME::Data.empty!
-+    end
-     begin
-       ctx.decrypt_verify(cipher_data, plain_data)
-     rescue GPGME::Error => exc
-@@ -314,7 +341,7 @@ private
- 
-   def gpgme_exc_msg msg
-     err_msg = "Exception in GPGME call: #{msg}"
--    info err_msg
-+    #info err_msg
-     err_msg
-   end
- 
-diff --git a/test/test_crypto.rb b/test/test_crypto.rb
-new file mode 100755
-index 0000000..c7ec88b
---- /dev/null
-+++ b/test/test_crypto.rb
-@@ -0,0 +1,108 @@
-+#!/usr/bin/ruby
-+
-+# tests for sup's crypto libs
-+#
-+# Copyright Clint Byrum <clint at ubuntu.com> 2011. All Rights Reserved.
-+#
-+# This program is free software; you can redistribute it and/or
-+# modify it under the terms of the GNU General Public License
-+# as published by the Free Software Foundation; either version 2
-+# of the License, or (at your option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301, USA.
-+
-+require 'tmpdir'
-+require 'test/unit'
-+require 'rmail/message'
-+require 'rmail/parser'
-+require 'sup/util'
-+require 'sup/hook'
-+require 'sup/contact'
-+require 'sup/person'
-+require 'sup/account'
-+require 'sup/message-chunks'
-+require 'sup/crypto'
-+require 'stringio'
-+
-+module Redwood
-+
-+# These are all singletons
-+CryptoManager.init
-+Dir.mktmpdir('sup-test') do|f|
-+    HookManager.init f
-+end
-+am = {:default=> {:name => "", :email=>ENV['EMAIL']}}
-+AccountManager.init am
-+
-+class TestCryptoManager < Test::Unit::TestCase
-+
-+    def setup
-+        @from_email = ENV['EMAIL']
-+        # Change this or import my public key to make these tests work.
-+        @to_email = 'clint at ubuntu.com'
-+    end
-+
-+    def teardown
-+    end
-+
-+    def test_sign
-+        if CryptoManager.have_crypto? then
-+            signed = CryptoManager.sign @from_email, at to_email,"ABCDEFG"
-+            assert_instance_of RMail::Message, signed
-+            assert_equal "ABCDEFG", signed.body[0]
-+            assert signed.body[1].body.length > 0 , "signature length must be > 0"
-+            assert (signed.body[1].body.include? "-----BEGIN PGP SIGNATURE-----") , "Expecting PGP armored data"
-+        end
-+    end
-+
-+    def test_encrypt
-+        if CryptoManager.have_crypto? then
-+            encrypted = CryptoManager.encrypt @from_email, [@to_email], "ABCDEFG"
-+            assert_instance_of RMail::Message, encrypted
-+            assert (encrypted.body[1].body.include? "-----BEGIN PGP MESSAGE-----") , "Expecting PGP armored data"
-+        end
-+    end
-+
-+    def test_sign_and_encrypt
-+        if CryptoManager.have_crypto? then
-+            encrypted = CryptoManager.sign_and_encrypt @from_email, [@to_email], "ABCDEFG"
-+            assert_instance_of RMail::Message, encrypted
-+            assert (encrypted.body[1].body.include? "-----BEGIN PGP MESSAGE-----") , "Expecting PGP armored data"
-+        end
-+    end
-+
-+    def test_decrypt
-+        if CryptoManager.have_crypto? then
-+            encrypted = CryptoManager.encrypt @from_email, [@to_email], "ABCDEFG"
-+            assert_instance_of RMail::Message, encrypted
-+            assert_instance_of String, (encrypted.body[1].body)
-+            decrypted = CryptoManager.decrypt encrypted.body[1], true
-+            assert_instance_of Array, decrypted
-+            assert_instance_of Chunk::CryptoNotice, decrypted[0]
-+            assert_instance_of Chunk::CryptoNotice, decrypted[1]
-+            assert_instance_of RMail::Message, decrypted[2]
-+            assert_equal "ABCDEFG" , decrypted[2].body
-+        end
-+    end
-+
-+    def test_verify
-+        if CryptoManager.have_crypto?
-+            signed = CryptoManager.sign @from_email, @to_email, "ABCDEFG"
-+            assert_instance_of RMail::Message, signed
-+            assert_instance_of String, (signed.body[1].body)
-+            CryptoManager.verify signed.body[0], signed.body[1], true
-+            CryptoManager.verify signed.body[0], signed.body[1], false
-+        end
-+    end
-+
-+end
-+
-+end
--- 
diff --git a/debian/patches/0003-Update-tests-so-they-all-pass.patch b/debian/patches/0003-Update-tests-so-they-all-pass.patch
deleted file mode 100644
index 5888da2..0000000
--- a/debian/patches/0003-Update-tests-so-they-all-pass.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-From: Per Andersson <avtobiff at gmail.com>
-Date: Fri, 18 May 2012 23:52:55 +0200
-Subject: Update tests so they all pass!
-
----
- test/dummy_source.rb        |    4 ++--
- test/test_header_parsing.rb |   29 +++++++++++++++++++++--------
- test/test_message.rb        |   27 +++++++++++++++++++--------
- 3 files changed, 42 insertions(+), 18 deletions(-)
-
-diff --git a/test/dummy_source.rb b/test/dummy_source.rb
-index da26e44..ec4debf 100644
---- a/test/dummy_source.rb
-+++ b/test/dummy_source.rb
-@@ -11,8 +11,8 @@ class DummySource < Source
- 
-   attr_accessor :messages
- 
--  def initialize uri, last_date=nil, usual=true, archived=false, id=nil, labels=[]
--    super uri, last_date, usual, archived, id
-+  def initialize uri, usual=true, archived=false, id=nil
-+    super uri, usual, archived, id
-     @messages = nil
-   end
- 
-diff --git a/test/test_header_parsing.rb b/test/test_header_parsing.rb
-index 1929e07..60eb968 100644
---- a/test/test_header_parsing.rb
-+++ b/test/test_header_parsing.rb
-@@ -106,7 +106,8 @@ EOS
-   end
- 
-   def test_from_line_splitting
--    l = MBox.new StringIO.new(<<EOS)
-+    tmpfile = Tempfile.new('test_from_line_splitting', '.')
-+    tmpfile.puts(<<EOS)
- From sup-talk-bounces at rubyforge.org Mon Apr 27 12:56:18 2009
- From: Bob <bob at bob.com>
- To: a dear friend
-@@ -125,14 +126,21 @@ From bob at bob.com
- 
- This is the end of the email.
- EOS
--    offset, labels = l.next
--    assert_equal 0, offset
--    offset, labels = l.next
-+    tmpfile.seek 0
-+
-+    l = MBox.new tmpfile
-+    offset = l.next_offset 0
-+    # I assume it is meant to actually split on the From: line
-+    assert_equal 61, offset
-+    offset = l.next_offset offset
-     assert_nil offset
-+
-+    tmpfile.close!
-   end
- 
-   def test_more_from_line_splitting
--    l = MBox.new StringIO.new(<<EOS)
-+    tmpfile = Tempfile.new('test_more_from_line_splitting', '.')
-+    tmpfile.puts(<<EOS)
- From sup-talk-bounces at rubyforge.org Mon Apr 27 12:56:18 2009
- From: Bob <bob at bob.com>
- To: a dear friend
-@@ -145,13 +153,18 @@ To: a dear friend
- 
- Hello again! Would you like to buy my products?
- EOS
--    offset, labels = l.next
-+    tmpfile.seek 0
-+
-+    l = MBox.new tmpfile
-+    offset = l.next_offset 0
-     assert_not_nil offset
- 
--    offset, labels = l.next
-+    offset = l.next_offset offset
-     assert_not_nil offset
- 
--    offset, labels = l.next
-+    offset = l.next_offset offset
-     assert_nil offset
-+
-+    tmpfile.close!
-   end
- end
-diff --git a/test/test_message.rb b/test/test_message.rb
-index 94b962a..f7c8279 100644
---- a/test/test_message.rb
-+++ b/test/test_message.rb
-@@ -29,9 +29,14 @@ module Redwood
- class TestMessage < Test::Unit::TestCase
- 
-   def setup
-+    @path = Dir.mktmpdir
-+    HookManager.init File.join(@path, 'hooks')
-   end
- 
-   def teardown
-+    FileUtils.rm_r @path if passed?
-+    puts "not cleaning up #{@path}" unless passed?
-+    HookManager.deinstantiate!
-   end
- 
-   def test_simple_message
-@@ -72,7 +77,8 @@ EOS
-     source.messages = [ message ]
-     source_info = 0
- 
--    sup_message = Message.new( {:source => source, :source_info => source_info } )
-+    location = Location.new(source, source_info)
-+    sup_message = Message.new( {:locations => [location] } )
-     sup_message.load_from_source!
- 
-     # see how well parsing the header went
-@@ -222,7 +228,8 @@ EOS
-     source.messages = [ message ]
-     source_info = 0
- 
--    sup_message = Message.new( {:source => source, :source_info => source_info } )
-+    location = Location.new(source, source_info)
-+    sup_message = Message.new( {:locations => [location] } )
-     sup_message.load_from_source!
- 
-     # read the message body chunks
-@@ -272,7 +279,8 @@ EOS
-     source.messages = [ message ]
-     source_info = 0
- 
--    sup_message = Message.new( {:source => source, :source_info => source_info } )
-+    location = Location.new(source, source_info )
-+    sup_message = Message.new( {:locations => [location] } )
-     sup_message.load_from_source!
- 
-     to = sup_message.to
-@@ -318,7 +326,8 @@ EOS
-     source.messages = [ message ]
-     source_info = 0
- 
--    sup_message = Message.new( {:source => source, :source_info => source_info } )
-+    location = Location.new(source, source_info)
-+    sup_message = Message.new( {:locations => [location] } )
-     sup_message.load_from_source!
- 
-     # read the message body chunks: no errors should reach this level
-@@ -417,7 +426,8 @@ EOS
-     source.messages = [ message ]
-     source_info = 0
- 
--    sup_message = Message.new( {:source => source, :source_info => source_info } )
-+    location = Location.new(source, source_info)
-+    sup_message = Message.new( {:locations => [location] } )
-     sup_message.load_from_source!
- 
-     # read the message body chunks
-@@ -508,7 +518,8 @@ EOS
-     source.messages = [ message ]
-     source_info = 0
- 
--    sup_message = Message.new( {:source => source, :source_info => source_info } )
-+    location = Location.new(source, source_info)
-+    sup_message = Message.new( {:locations => [location] } )
-     sup_message.load_from_source!
- 
-     # See how well parsing the message ID went.
-@@ -517,8 +528,8 @@ EOS
- 
-     # Look at another header field whose first line was blank.
-     list_unsubscribe = sup_message.list_unsubscribe
--    assert_equal("<http://mailman2.widget.com/mailman/listinfo/monitor-list>, " +
--                 "<mailto:monitor-list-request at widget.com?subject=unsubscribe>",
-+    assert_equal("<http://mailman2.widget.com/mailman/listinfo/monitor-list>,\n" +
-+                 " \t<mailto:monitor-list-request at widget.com?subject=unsubscribe>",
-                  list_unsubscribe)
- 
-   end
--- 
diff --git a/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch b/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch
deleted file mode 100644
index fb6de06..0000000
--- a/debian/patches/0004-Avoid-crash-when-maybe-wrapping-text.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Per Andersson <avtobiff at gmail.com>
-Date: Sat, 26 May 2012 00:41:29 +0200
-Subject: Avoid crash when (maybe) wrapping text.
-
-Crash occurs for instance when expanding GPG signatures.
----
- lib/sup/modes/thread-view-mode.rb |    8 +++++++-
- 1 files changed, 7 insertions(+), 1 deletions(-)
-
-diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
-index 9fcc45d..510f967 100644
---- a/lib/sup/modes/thread-view-mode.rb
-+++ b/lib/sup/modes/thread-view-mode.rb
-@@ -846,7 +846,13 @@ private
-       else
-         width = buffer.content_width
-       end
--      lines = lines.map { |l| l.chomp.wrap width }.flatten
-+      # this function apparently takes both String and Array as input.
-+      # if String convert to Array so map works.
-+      if lines.kind_of? String
-+        lines = lines.lines.to_a
-+      end
-+      # sometimes l is nil, avoid crash when this happens
-+      lines = lines.map { |l| l.chomp.wrap width unless l == nil }.flatten
-     end
-     return lines
-   end
--- 
diff --git a/debian/patches/0005-Require-iconv-and-locale-instead-of-gettext.patch b/debian/patches/0005-Require-iconv-and-locale-instead-of-gettext.patch
deleted file mode 100644
index 6b0f4ae..0000000
--- a/debian/patches/0005-Require-iconv-and-locale-instead-of-gettext.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Per Andersson <avtobiff at gmail.com>
-Date: Mon, 18 Jun 2012 23:58:19 +0200
-Subject: Require iconv and locale instead of gettext
-
----
- lib/sup.rb |    3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/lib/sup.rb b/lib/sup.rb
-index 9a4064d..f03b99e 100644
---- a/lib/sup.rb
-+++ b/lib/sup.rb
-@@ -4,7 +4,8 @@ require 'yaml'
- require 'zlib'
- require 'thread'
- require 'fileutils'
--require 'gettext'
-+require 'iconv'
-+require 'locale'
- require 'curses'
- require 'rmail'
- begin
--- 
diff --git a/debian/patches/0006-Use-RbConfig-instead-of-deprecated-Config.patch b/debian/patches/0006-Use-RbConfig-instead-of-deprecated-Config.patch
deleted file mode 100644
index b423ac4..0000000
--- a/debian/patches/0006-Use-RbConfig-instead-of-deprecated-Config.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Per Andersson <avtobiff at gmail.com>
-Date: Wed, 20 Jun 2012 22:31:20 +0200
-Subject: Use RbConfig instead of deprecated Config
-
----
- bin/sup |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/bin/sup b/bin/sup
-index ba67490..6ab45f0 100755
---- a/bin/sup
-+++ b/bin/sup
-@@ -117,7 +117,7 @@ end
- require 'dl/import'
- module LibC
-   extend DL.const_defined?(:Importer) ? DL::Importer : DL::Importable
--  setlocale_lib = case Config::CONFIG['arch']
-+  setlocale_lib = case RbConfig::CONFIG['arch']
-     when /darwin/; "libc.dylib"
-     when /cygwin/; "cygwin1.dll"
-     else; "libc.so.6"
--- 
diff --git a/debian/patches/series b/debian/patches/series
index 5ca11c6..9fb5e07 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1 @@
 0001-Patch-out-all-requires-of-rubygems.patch
-0002-Fix-support-for-gpgme-2.0.patch
-0003-Update-tests-so-they-all-pass.patch
-0004-Avoid-crash-when-maybe-wrapping-text.patch
-0005-Require-iconv-and-locale-instead-of-gettext.patch
-0006-Use-RbConfig-instead-of-deprecated-Config.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/sup-mail.git



More information about the Pkg-ruby-extras-commits mailing list