Merge ~bryce/ubuntu/+source/ruby2.5:sru.1835968-bionic into ubuntu/+source/ruby2.5:ubuntu/bionic-devel

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: 9f3ad7b0e3fa28d43eefd1fa0812b4757ca21fd5
Proposed branch: ~bryce/ubuntu/+source/ruby2.5:sru.1835968-bionic
Merge into: ubuntu/+source/ruby2.5:ubuntu/bionic-devel
Diff against target: 52 lines (+30/-0)
3 files modified
debian/changelog (+9/-0)
debian/patches/restore_buffer_newline_check.patch (+20/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt (community) Approve
Ubuntu Server Developers Pending
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+370639@code.launchpad.net

Description of the change

Fixes LP: #1835968 for Ubuntu bionic by restoring a bit of code that had
been dropped by a recent patch, introducing a regression when
transferring certain files using openssh.

PPA with test package: https://launchpad.net/~bryce/+archive/ubuntu/ruby2.5-sru-1835968
  $ sudo add-apt-repository ppa:bryce/ruby2.5-sru-1835968
  $ sudo apt-get update
  $ sudo apt-get install ruby2.5

Test case:
  $ lxc create ubuntu:18.04/amd64 ruby25-sru-1835968-bionic
  $ lxc exec ruby25-sru-1835968-bionic -- bash
  (...)
  # sudo apt-get update
  $ sudo apt-get -y install ruby-roadie ruby

  # Preconfigure as Internet site
  $ sudo debconf-set-selections <<< "postfix postfix/mailname string ruby25-sru-1835968-bionic.lxd"
  $ sudo debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'"
  $ sudo apt-get install -y postfix

  ./testcase-ruby-ssl.rb (private)

  With the current Ubuntu version, the testcase generates a backtrace
  ending in an error message involving ASCII/UTF8 confusion.

  With the PPA version, the test file gets successfully delivered to a
  local mailbox

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt (paelzer) wrote :

Great analysis on the bug down to the minimal change for the SRU.
changelog: ok
patch: ok
headers: ok

Thanks for continuing on that bug.
+1, but lets wait with the upload until also unit193 acks on the PPA in the bug.

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Unit 193 gave his ack, he's been running the package over the weekend without issue. I'll proceed with the upload directly.

Revision history for this message
Bryce Harrington (bryce) wrote :

$ git push pkg upload/${version}
Counting objects: 12, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (12/12), 1.90 KiB | 1.90 MiB/s, done.
Total 12 (delta 8), reused 1 (delta 1)
To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/ruby2.5
 * [new tag] upload/2.5.1-1ubuntu1.5 -> upload/2.5.1-1ubuntu1.5

$ dput ubuntu ../ruby2.5_2.5.1-1ubuntu1.5_source.changes
Checking signature on .changes
gpg: ../ruby2.5_2.5.1-1ubuntu1.5_source.changes: Valid signature from E603B2578FB8F0FB
Checking signature on .dsc
gpg: ../ruby2.5_2.5.1-1ubuntu1.5.dsc: Valid signature from E603B2578FB8F0FB
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading ruby2.5_2.5.1-1ubuntu1.5.dsc: done.
  Uploading ruby2.5_2.5.1-1ubuntu1.5.debian.tar.xz: done.
  Uploading ruby2.5_2.5.1-1ubuntu1.5_source.buildinfo: done.
  Uploading ruby2.5_2.5.1-1ubuntu1.5_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 95d3a6b..413642b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+ruby2.5 (2.5.1-1ubuntu1.5) bionic; urgency=medium
7+
8+ * Add d/p/restore_buffer_newline_check.patch to fix failure sending
9+ files with mixed newline encoding styles; this regression was
10+ introduced by 0009-openssl-sync-with-upstream-repository.patch.
11+ (LP: #1835968)
12+
13+ -- Bryce Harrington <bryce@canonical.com> Thu, 25 Jul 2019 16:06:31 -0700
14+
15 ruby2.5 (2.5.1-1ubuntu1.4) bionic; urgency=medium
16
17 * Cherrypick ruby-openssl upstream commits to fix compat with OpenSSL
18diff --git a/debian/patches/restore_buffer_newline_check.patch b/debian/patches/restore_buffer_newline_check.patch
19new file mode 100644
20index 0000000..5266cd0
21--- /dev/null
22+++ b/debian/patches/restore_buffer_newline_check.patch
23@@ -0,0 +1,20 @@
24+Description: Restores a conditional newline check introduced by the final patch
25+ in 0009-openssl-sync-with-upstream-repository.patch. With this check missing,
26+ certain kinds of files can trigger ASCII/UTF8 errors sent over the network.
27+Author: Bryce Harrington <bryce@canonical.com>
28+Origin: vendor
29+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ruby2.5/+bug/1835968
30+Last-Update: 2019-07-25
31+
32+
33+--- a/ext/openssl/lib/openssl/buffering.rb 2019-07-25 15:54:54.884477423 -0700
34++++ b/ext/openssl/lib/openssl/buffering.rb.new 2019-07-25 15:54:47.440489042 -0700
35+@@ -316,7 +316,7 @@ module OpenSSL::Buffering
36+ @wbuffer << s
37+ @wbuffer.force_encoding(Encoding::BINARY)
38+ @sync ||= false
39+- if @sync or @wbuffer.size > BLOCK_SIZE
40++ if @sync or @wbuffer.size > BLOCK_SIZE or @wbuffer.rindex("\n")
41+ until @wbuffer.empty?
42+ begin
43+ nwrote = syswrite(@wbuffer)
44diff --git a/debian/patches/series b/debian/patches/series
45index 0851a31..e479af4 100644
46--- a/debian/patches/series
47+++ b/debian/patches/series
48@@ -20,3 +20,4 @@ fixing_expired_SSL_certs.patch
49 0008-reduce-LibreSSL-warnings.patch
50 0009-openssl-sync-with-upstream-repository.patch
51 rubygems-2388.patch
52+restore_buffer_newline_check.patch

Subscribers

People subscribed via source and target branches