Thread View: linux.debian.bugs.dist
1 messages
1 total messages
Started by Bastian Germann
Tue, 27 Oct 2026 20:30
Bug#1112094: ruby-em-websocket: Build-Depends on to-be-removed ruby-em-http-request
Author: Bastian Germann
Date: Tue, 27 Oct 2026 20:30
Date: Tue, 27 Oct 2026 20:30
160 lines
7799 bytes
7799 bytes
--ha97lLoPAsCDKzR6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Control: tags -1 patch
I am uploading a NMU to DELAYED/10 in order to fix this.
Please find the debdiff attached.
--ha97lLoPAsCDKzR6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
filename=ruby-em-websocket_0.5.3-2.1.debdiff
diff -Nru ruby-em-websocket-0.5.3/debian/changelog ruby-em-websocket-0.5.3/debian/changelog
--- ruby-em-websocket-0.5.3/debian/changelog 2026-06-27 00:37:25.000000000 +0200
+++ ruby-em-websocket-0.5.3/debian/changelog 2026-10-27 21:16:17.000000000 +0100
@@ -1,3 +1,10 @@
+ruby-em-websocket (0.5.3-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Drop ruby-em-http-request from Build-Depends. (Closes: #1112094)
+
+ -- Bastian Germann <bage@debian.org> Tue, 27 Oct 2026 21:16:17 +0100
+
ruby-em-websocket (0.5.3-2) unstable; urgency=medium
* Team upload.
diff -Nru ruby-em-websocket-0.5.3/debian/control ruby-em-websocket-0.5.3/debian/control
--- ruby-em-websocket-0.5.3/debian/control 2026-06-27 00:35:38.000000000 +0200
+++ ruby-em-websocket-0.5.3/debian/control 2026-10-27 21:04:12.000000000 +0100
@@ -5,7 +5,6 @@
Build-Depends: debhelper-compat (= 14),
gem2deb,
rake,
- ruby-em-http-request <!nocheck>,
ruby-em-spec <!nocheck>,
ruby-eventmachine,
ruby-http-parser.rb,
diff -Nru ruby-em-websocket-0.5.3/debian/patches/drop-em-http-request.patch ruby-em-websocket-0.5.3/debian/patches/drop-em-http-request.patch
--- ruby-em-websocket-0.5.3/debian/patches/drop-em-http-request.patch 1970-01-01 01:00:00.000000000 +0100
+++ ruby-em-websocket-0.5.3/debian/patches/drop-em-http-request.patch 2026-10-27 21:14:19.000000000 +0100
@@ -0,0 +1,108 @@
+Description: drop build dependency on em-http-request
+ The test suite uses EM::HttpRequest (from the em-http-request gem) purely to
+ send plain HTTP requests to the WebSocket server and check that they are
+ rejected. Replace it with a minimal raw TCP HTTP client so that the
+ ruby-em-http-request build dependency can be dropped.
+Forwarded: not-needed
+Bug-Debian: https://bugs.debian.org/1112094
+Last-Update: 2026-10-27
+---
+--- a/spec/helper.rb
++++ b/spec/helper.rb
+@@ -3,7 +3,6 @@
+ require 'rubygems'
+ require 'rspec'
+ require 'em-spec/rspec'
+-require 'em-http'
+
+ require 'em-websocket'
+
+@@ -154,6 +153,45 @@
+ data
+ end
+
++# Minimal plain HTTP client used to send a non-WebSocket request to the
++# server, so that the tests can check that such requests are rejected without
++# depending on the em-http-request gem.
++class PlainHTTPClient < EM::Connection
++ def initialize(host, port, path = "/")
++ @host, @port, @path = host, port, path
++ end
++
++ def post_init
++ send_data "GET #{@path} HTTP/1.1\r\n"
++ send_data "Host: #{@host}:#{@port}\r\n"
++ send_data "Connection: close\r\n"
++ send_data "\r\n"
++ end
++
++ def errback(&blk)
++ @errback = blk
++ end
++
++ def callback(&blk)
++ @callback = blk
++ end
++
++ # An HTTP response means the plain HTTP request was accepted, which is
++ # unexpected
++ def receive_data(data)
++ @callback.call if defined? @callback
++ end
++
++ # The server rejects non-WebSocket requests by closing the connection
++ def unbind
++ @errback.call if defined? @errback
++ end
++end
++
++def connect_http_client(host = "127.0.0.1", port = 12345, path = "/")
++ EM.connect(host, port, PlainHTTPClient, host, port, path)
++end
++
+ RSpec::Matchers.define :succeed_with_upgrade do |response|
+ match do |actual|
+ success = nil
+--- a/spec/integration/common_spec.rb
++++ b/spec/integration/common_spec.rb
+@@ -9,7 +9,7 @@ describe "WebSocket server" do
+ it "should fail on non WebSocket requests" do
+ em {
+ EM.add_timer(0.1) do
+- http = EM::HttpRequest.new('http://127.0.0.1:12345/').get :timeout => 0
++ http = connect_http_client
+ http.errback { done }
+ http.callback { fail }
+ end
+@@ -91,7 +91,7 @@ describe "WebSocket server" do
+ it "should allow the server to be started inside an existing EM" do
+ em {
+ EM.add_timer(0.1) do
+- http = EM::HttpRequest.new('http://127.0.0.1:12345/').get :timeout => 0
++ http = connect_http_client
+ http.errback { |e| done }
+ http.callback { fail }
+ end
+--- a/spec/integration/draft75_spec.rb
++++ b/spec/integration/draft75_spec.rb
+@@ -1,9 +1,7 @@
+ require 'helper'
+
+-# These integration tests are older and use a different testing style to the
+-# integration tests for newer drafts. They use EM::HttpRequest which happens
+-# to currently estabish a websocket connection using the draft75 protocol.
+-#
++# These integration tests are older and use a different testing style to the
++# integration tests for newer drafts, driven through em-websocket-client.
+ describe "WebSocket server draft75" do
+ include EM::SpecHelper
+ default_timeout 1
+@@ -92,7 +90,7 @@ describe "WebSocket server draft75" do
+ it "should call onerror callback with raised exception and close connection on bad handshake" do
+ em {
+ EventMachine.add_timer(0.1) do
+- http = EM::HttpRequest.new('http://127.0.0.1:12345/').get
++ http = connect_http_client
+ http.errback { }
+ http.callback { fail }
+ end
diff -Nru ruby-em-websocket-0.5.3/debian/patches/series ruby-em-websocket-0.5.3/debian/patches/series
--- ruby-em-websocket-0.5.3/debian/patches/series 2026-06-26 19:43:17.000000000 +0200
+++ ruby-em-websocket-0.5.3/debian/patches/series 2026-10-27 21:04:12.000000000 +0100
@@ -1,2 +1,3 @@
em-websocket-client.patch
git-in-gemspec.patch
+drop-em-http-request.patch
--ha97lLoPAsCDKzR6--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads