[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#784946: marked as done (jessie-pu: package feed2imap/1.2.3-1+deb8u1)



Your message dated Sat, 06 Jun 2015 13:11:11 +0100
with message-id <1433592671.2987.12.camel@adam-barratt.org.uk>
and subject line Fix released with 8.1 point release
has caused the Debian Bug report #784946,
regarding jessie-pu: package feed2imap/1.2.3-1+deb8u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
784946: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784946
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

This fixes 2 regressions with regard to the wheezy version. Both
changes are already in unstable as part of new upstream releases.

debdiff is attached.

-- System Information:
Debian Release: stretch/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Antonio Terceiro <terceiro@debian.org>
diff -Nru feed2imap-1.2.3/debian/changelog feed2imap-1.2.3/debian/changelog
--- feed2imap-1.2.3/debian/changelog	2014-10-07 18:40:39.000000000 -0300
+++ feed2imap-1.2.3/debian/changelog	2015-05-10 20:52:43.000000000 -0300
@@ -1,3 +1,12 @@
+feed2imap (1.2.3-1+deb8u1) jessie; urgency=medium
+
+  * debian/patches/0001-Fix-usage-of-filters.patch: apply upstream patch to
+    fix usage of filters (Closes: #783444)
+  * debian/patches/0002-Fix-regression-in-include-images-option.patch: apply
+    upstream patch to fix the `include-images` option (Closes: #784591)
+
+ -- Antonio Terceiro <terceiro@debian.org>  Sun, 10 May 2015 20:08:43 -0300
+
 feed2imap (1.2.3-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru feed2imap-1.2.3/debian/patches/0001-Fix-usage-of-filters.patch feed2imap-1.2.3/debian/patches/0001-Fix-usage-of-filters.patch
--- feed2imap-1.2.3/debian/patches/0001-Fix-usage-of-filters.patch	1969-12-31 21:00:00.000000000 -0300
+++ feed2imap-1.2.3/debian/patches/0001-Fix-usage-of-filters.patch	2015-05-10 20:52:43.000000000 -0300
@@ -0,0 +1,72 @@
+From c1e5c1c00bd996140d2a74ee4b5e50182b846bc6 Mon Sep 17 00:00:00 2001
+From: Antonio Terceiro <terceiro@softwarelivre.org>
+Date: Sun, 3 May 2015 20:13:29 -0300
+Subject: [PATCH] Fix usage of filters
+
+- avoid accessing $? unless it is actually available
+- when calling a filter, make sure to release the mutex even if there is
+  an exception during the filter handling.
+
+The long term solution is to drastically reorganize concurrency code.
+---
+ feed2imap-test             |  5 +++++
+ lib/feed2imap/feed2imap.rb | 35 +++++++++++++++++++----------------
+ 2 files changed, 24 insertions(+), 16 deletions(-)
+
+diff --git a/lib/feed2imap/feed2imap.rb b/lib/feed2imap/feed2imap.rb
+index 64663c6..b84b6b6 100644
+--- a/lib/feed2imap/feed2imap.rb
++++ b/lib/feed2imap/feed2imap.rb
+@@ -130,7 +130,7 @@ class Feed2Imap
+               # thread-safe, and we need to get the right exitcode
+               mutex.lock
+               s = %x{#{feed.execurl}}
+-              if $?.exitstatus != 0
++              if $? && $?.exitstatus != 0
+                 @logger.warn("Command for #{feed.name} exited with status #{$?.exitstatus} !")
+               end
+               mutex.unlock
+@@ -143,22 +143,25 @@ class Feed2Imap
+               # thread-safe, and we need to get the right exitcode.
+               mutex.lock
+               # hack hack hack, avoid buffering problems
+-              stdin, stdout, stderr = Open3::popen3(feed.filter)
+-              inth = Thread::new do
+-                stdin.puts s
+-                stdin.close
++              begin
++                stdin, stdout, stderr = Open3::popen3(feed.filter)
++                inth = Thread::new do
++                  stdin.puts s
++                  stdin.close
++                end
++                output = nil
++                outh = Thread::new do
++                  output = stdout.read
++                end
++                inth.join
++                outh.join
++                s = output
++                if $? && $?.exitstatus != 0
++                  @logger.warn("Filter command for #{feed.name} exited with status #{$?.exitstatus}. Output might be corrupted !")
++                end
++              ensure
++                mutex.unlock
+               end
+-              output = nil
+-              outh = Thread::new do
+-                output = stdout.read
+-              end
+-              inth.join
+-              outh.join
+-              s = output
+-              if $?.exitstatus != 0
+-                @logger.warn("Filter command for #{feed.name} exited with status #{$?.exitstatus}. Output might be corrupted !")
+-              end
+-              mutex.unlock
+             end
+             if Time::now - fetch_start > F2I_WARNFETCHTIME
+               @logger.info("Fetching feed #{feed.name} took #{(Time::now - fetch_start).to_i}s")
+-- 
+2.1.4
+
diff -Nru feed2imap-1.2.3/debian/patches/0002-Fix-regression-in-include-images-option.patch feed2imap-1.2.3/debian/patches/0002-Fix-regression-in-include-images-option.patch
--- feed2imap-1.2.3/debian/patches/0002-Fix-regression-in-include-images-option.patch	1969-12-31 21:00:00.000000000 -0300
+++ feed2imap-1.2.3/debian/patches/0002-Fix-regression-in-include-images-option.patch	2015-05-10 20:52:43.000000000 -0300
@@ -0,0 +1,102 @@
+From 4614e1fa4ff4cb5d7442f680a053298e0cc80819 Mon Sep 17 00:00:00 2001
+From: Antonio Terceiro <terceiro@softwarelivre.org>
+Date: Sun, 10 May 2015 20:40:19 -0300
+Subject: [PATCH] Fix regression in `include-images` option
+
+test/tc_httpfetcher.rb can't still be re-enabled because it hits the
+network, and a hostname that is no longer valid.
+---
+ feed2imap-test              |  1 +
+ lib/feed2imap/itemtomail.rb |  3 ++-
+ test/tc_httpfetcher.rb      | 20 +++++++++++++-------
+ 3 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/lib/feed2imap/itemtomail.rb b/lib/feed2imap/itemtomail.rb
+index fcf8f8b..455a136 100644
+--- a/lib/feed2imap/itemtomail.rb
++++ b/lib/feed2imap/itemtomail.rb
+@@ -99,7 +99,8 @@ def item_to_mail(config, item, id, updated, from = 'Feed2Imap', inline_images =
+     htmlpart.body.gsub!(/(<img[^>]+)src="(\S+?\/([^\/]+?\.(png|gif|jpe?g)))"([^>]*>)/i) do |match|
+       # $2 contains url, $3 the image name, $4 the image extension
+       begin
+-        image = Base64.encode64(HTTPFetcher::fetch($2, Time.at(0)).chomp) + "\n"
++        fetcher = HTTPFetcher.new
++        image = Base64.encode64(fetcher.fetch($2, Time.at(0)).chomp) + "\n"
+         cid = "#{Digest::MD5.hexdigest($2)}@#{config.hostname}"
+         if not cids.include?(cid)
+           cids << cid
+diff --git a/test/tc_httpfetcher.rb b/test/tc_httpfetcher.rb
+index d44b3ee..e904086 100755
+--- a/test/tc_httpfetcher.rb
++++ b/test/tc_httpfetcher.rb
+@@ -9,7 +9,7 @@ class HttpFetcherTest < Test::Unit::TestCase
+   def test_get_https
+     s = ''
+     assert_nothing_raised do
+-      s = HTTPFetcher::fetch('https://linuxfr.org/pub/', Time::at(0))
++      s = fetcher.fetch('https://linuxfr.org/pub/', Time::at(0))
+     end
+     assert(s.length > 20)
+   end
+@@ -21,7 +21,7 @@ class HttpFetcherTest < Test::Unit::TestCase
+   def test_get_httpnotmodif
+     s = 'aaa'
+     assert_nothing_raised do
+-      s = HTTPFetcher::fetch('http://www.lucas-nussbaum.net/feed2imap_tests/notmodified.php', Time::new())
++      s = fetcher.fetch('http://www.lucas-nussbaum.net/feed2imap_tests/notmodified.php', Time::new())
+     end
+     assert_nil(s)
+   end
+@@ -29,7 +29,7 @@ class HttpFetcherTest < Test::Unit::TestCase
+   def test_get_redir1
+     s = 'aaa'
+     assert_nothing_raised do
+-      s = HTTPFetcher::fetch("http://www.lucas-nussbaum.net/feed2imap_tests/redir.php?redir=#{MAXREDIR}";, Time::at(0))
++      s = fetcher.fetch("http://www.lucas-nussbaum.net/feed2imap_tests/redir.php?redir=#{MAXREDIR}";, Time::at(0))
+     end
+     assert_equal('OK', s)
+   end
+@@ -37,14 +37,14 @@ class HttpFetcherTest < Test::Unit::TestCase
+   def test_get_redir2
+     s = ''
+     assert_raise(RuntimeError) do
+-      s = HTTPFetcher::fetch("http://www.lucas-nussbaum.net/feed2imap_tests/redir.php?redir=#{MAXREDIR + 1}", Time::at(0))
++      s = fetcher.fetch("http://www.lucas-nussbaum.net/feed2imap_tests/redir.php?redir=#{MAXREDIR + 1}", Time::at(0))
+     end
+   end
+ 
+   def test_httpauth
+     s = ''
+     assert_nothing_raised do
+-      s = HTTPFetcher::fetch("http://aaa:bbb@ensilinx1.imag.fr/~lucas/f2i_redirauth.php";, Time::at(0))
++      s = fetcher.fetch("http://aaa:bbb@ensilinx1.imag.fr/~lucas/f2i_redirauth.php";, Time::at(0))
+     end
+     assert_equal("Login: aaa / Password: bbb \n", s)
+   end
+@@ -52,7 +52,7 @@ class HttpFetcherTest < Test::Unit::TestCase
+   def test_redirauth
+     s = ''
+     assert_nothing_raised do
+-      s = HTTPFetcher::fetch("http://aaa:bbb@ensilinx1.imag.fr/~lucas/f2i_redirauth.php?redir=1";, Time::at(0))
++      s = fetcher.fetch("http://aaa:bbb@ensilinx1.imag.fr/~lucas/f2i_redirauth.php?redir=1";, Time::at(0))
+     end
+     assert_equal("Login: aaa / Password: bbb \n", s)
+   end
+@@ -60,7 +60,13 @@ class HttpFetcherTest < Test::Unit::TestCase
+   def test_notfound
+     s = ''
+     assert_raises(RuntimeError) do
+-      s = HTTPFetcher::fetch("http://ensilinx1.imag.fr/~lucas/notfound.html";, Time::at(0))
++      s = fetcher.fetch("http://ensilinx1.imag.fr/~lucas/notfound.html";, Time::at(0))
+     end
+   end
++
++  private
++
++  def fetcher
++    HTTPFetcher.new
++  end
+ end
+-- 
+2.1.4
+
diff -Nru feed2imap-1.2.3/debian/patches/series feed2imap-1.2.3/debian/patches/series
--- feed2imap-1.2.3/debian/patches/series	1969-12-31 21:00:00.000000000 -0300
+++ feed2imap-1.2.3/debian/patches/series	2015-05-10 20:52:43.000000000 -0300
@@ -0,0 +1,2 @@
+0001-Fix-usage-of-filters.patch
+0002-Fix-regression-in-include-images-option.patch

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Version: 8.1

Hi,

The fix discussed in this bug was released to stable as part of the 8.1
point release earlier today.

Regards,

Adam

--- End Message ---

Reply to: