Article View: linux.debian.bugs.dist
Article #2408Bug#1112094: ruby-em-websocket: Build-Depends on to-be-removed ruby-em-http-request
From: 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--
Technical Details
Message-ID:
<NSVXX-8iq1-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!news.imp.ch!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomodReferences:
<LnY0p-asIZ-5@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!news.imp.ch!news.corradoroberto.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod From: Bastian Germann <bage@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1112094: ruby-em-websocket: Build-Depends on to-be-removed ruby-em-http-request Date: Tue, 27 Oct 2026 21:30:01 +0100 Message-ID: <NSVXX-8iq1-3@gated-at.bofh.it> References: <LnY0p-asIZ-5@gated-at.bofh.it> X-Original-To: 1112094@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Oct 27 20:23:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -0.457 Reply-To: Bastian Germann <bage@debian.org>, 1112094@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: pkg-ruby-extras-maintainers@lists.alioth.debian.org X-Debian-Pr-Message: followup 1112094 X-Debian-Pr-Package: src:ruby-em-websocket X-Debian-Pr-Source: ruby-em-websocket MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ha97lLoPAsCDKzR6" Content-Disposition: inline X-Debian-User: bage X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1999271 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 160 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 27 Oct 2026 21:20:51 +0100 X-Original-Message-ID: <auEHoyeUWP2y3OFT@duagon-BXN3S64.localdomain> X-Original-References: <175619952981.11704.13688228111001103004.reportbug@duagon-BXN3S64.localdomain>