New Upstream Snapshot - ruby-fcgi
Ready changes
Summary
Merged new upstream version: 0.9.2.2 (was: 0.9.2.1).
Resulting package
Built on 2022-11-20T12:45 (took 5m37s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots ruby-fcgi-dbgsymapt install -t fresh-snapshots ruby-fcgi
Diff
diff --git a/README.rdoc b/README.rdoc
index 832b915..63a8766 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,6 +1,6 @@
= fcgi - The New generation of FastCGI library for Ruby.
-Version 0.9.2.1
+Version 0.9.2.2
== Depends
diff --git a/VERSION b/VERSION
index 69667e5..e3097ae 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.9.2.1
+0.9.2.2
diff --git a/checksums.yaml.gz b/checksums.yaml.gz
deleted file mode 100644
index 4ab3986..0000000
Binary files a/checksums.yaml.gz and /dev/null differ
diff --git a/debian/changelog b/debian/changelog
index 8e62961..8523fd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-fcgi (0.9.2.2-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Sun, 20 Nov 2022 12:41:34 -0000
+
ruby-fcgi (0.9.2.1-3) unstable; urgency=medium
[ Cédric Boutillier ]
diff --git a/ext/fcgi/fcgi.c b/ext/fcgi/fcgi.c
index e8e700b..20c9f21 100755
--- a/ext/fcgi/fcgi.c
+++ b/ext/fcgi/fcgi.c
@@ -12,6 +12,9 @@
#include <fcntl.h>
#include "ruby.h"
+#ifdef HAVE_RUBY_VERSION_H
+#include "ruby/version.h"
+#endif
#ifndef RSTRING_PTR
#define RSTRING_PTR(str) (RSTRING(str)->ptr)
@@ -78,7 +81,7 @@ static VALUE fcgi_s_accept(VALUE self)
{
int status;
FCGX_Request *req;
- fd_set readfds;
+ rb_fdset_t readfds;
req = ALLOC(FCGX_Request);
@@ -88,9 +91,9 @@ static VALUE fcgi_s_accept(VALUE self)
return Qnil;
}
- FD_ZERO(&readfds);
- FD_SET(req->listen_sock, &readfds);
- if (select(req->listen_sock+1, &readfds, NULL, NULL, NULL) < 1) {
+ rb_fd_init(&readfds);
+ rb_fd_set(req->listen_sock, &readfds);
+ if (rb_thread_fd_select(readfds.maxfd, &readfds, NULL, NULL, NULL) < 1) {
return Qnil;
}
@@ -262,7 +265,9 @@ static VALUE fcgi_stream_putc(VALUE self, VALUE ch)
FCGX_Stream *stream;
int c;
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
rb_secure(4);
+#endif
Data_Get_Stream(self, stream);
if ((c = FCGX_PutChar(NUM2INT(ch), stream)) == EOF)
CHECK_STREAM_ERROR(stream);
@@ -274,7 +279,9 @@ static VALUE fcgi_stream_write(VALUE self, VALUE str)
FCGX_Stream *stream;
int len;
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
rb_secure(4);
+#endif
Data_Get_Stream(self, stream);
str = rb_obj_as_string(str);
len = FCGX_PutStr(RSTRING_PTR(str), RSTRING_LEN(str), stream);
@@ -407,9 +414,11 @@ static VALUE fcgi_stream_ungetc(VALUE self, VALUE ch)
FCGX_Stream *stream;
int c;
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
Data_Get_Stream(self, stream);
c = FCGX_UnGetChar(NUM2INT(ch), stream);
CHECK_STREAM_ERROR(stream);
@@ -422,9 +431,11 @@ static VALUE fcgi_stream_gets(VALUE self) {
VALUE str = rb_str_new(0,0);
OBJ_TAINT(str);
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
Data_Get_Stream(self, stream);
@@ -449,9 +460,11 @@ static VALUE fcgi_stream_read(int argc, VALUE *argv, VALUE self)
char *buff;
int n;
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
Data_Get_Stream(self, stream);
@@ -502,9 +515,11 @@ static VALUE fcgi_stream_eof(VALUE self)
{
FCGX_Stream *stream;
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
Data_Get_Stream(self, stream);
return FCGX_HasSeenEOF(stream) ? Qtrue : Qfalse;
}
@@ -513,9 +528,11 @@ static VALUE fcgi_stream_close(VALUE self)
{
FCGX_Stream *stream;
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: can't close");
}
+#endif
Data_Get_Stream(self, stream);
if (FCGX_FClose(stream) == EOF)
CHECK_STREAM_ERROR(stream);
@@ -532,33 +549,41 @@ static VALUE fcgi_stream_closed(VALUE self)
static VALUE fcgi_stream_binmode(VALUE self)
{
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
return self;
}
static VALUE fcgi_stream_isatty(VALUE self)
{
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
return Qfalse;
}
static VALUE fcgi_stream_sync(VALUE self)
{
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
return Qfalse;
}
static VALUE fcgi_stream_setsync(VALUE self,VALUE sync)
{
+#if !defined(RUBY_API_VERSION_MAJOR) || (RUBY_API_VERSION_MAJOR < 3)
if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) {
rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO");
}
+#endif
return Qfalse;
}
diff --git a/fcgi.gemspec b/fcgi.gemspec
index 994b6f6..07d3db5 100644
--- a/fcgi.gemspec
+++ b/fcgi.gemspec
@@ -1,11 +1,11 @@
Gem::Specification.new do |s|
s.name = %q{fcgi}
- s.version = "0.9.2.1"
+ s.version = "0.9.2.2"
s.license = "MIT"
s.authors = [%q{mva}]
- s.date = %q{2013-09-30}
- s.description = %q{FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs. This version aims to be compatible with both 1.8.x and 1.9.x versions of Ruby, and also will be ported to 2.0.x.}
+ s.date = %q{2022-10-17}
+ s.description = %q{FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs. This version aims to be compatible with both 1.8.x and 1.9.x versions of Ruby, and also will be ported to 2.0.x. It has been hacked to work with Ruby 3.0.x.}
s.email = %q{mva@mva.name}
s.extensions = [%q{ext/fcgi/extconf.rb}]
s.extra_rdoc_files = [
diff --git a/lib/fcgi.rb b/lib/fcgi.rb
index 106fcb3..87fcc14 100644
--- a/lib/fcgi.rb
+++ b/lib/fcgi.rb
@@ -115,7 +115,7 @@ rescue LoadError # Load the pure ruby version instead
end
def session
- sock, addr = *@server.accept
+ sock, _ = *@server.accept
return unless sock
fsock = FastCGISocket.new(sock)
req = next_request(fsock)
@@ -196,7 +196,7 @@ rescue LoadError # Load the pure ruby version instead
def read_record
header = @socket.read(Record::HEADER_LENGTH) or return nil
return nil unless header.size == Record::HEADER_LENGTH
- version, type, reqid, clen, padlen, reserved = *Record.parse_header(header)
+ _, type, reqid, clen, padlen, _ = *Record.parse_header(header)
Record.class_for(type).parse(reqid, read_record_body(clen, padlen))
end
@@ -356,7 +356,7 @@ rescue LoadError # Load the pure ruby version instead
BODY_FORMAT = 'nCC5'
def BeginRequestRecord.parse(id, body)
- role, flags, *reserved = *body.unpack(BODY_FORMAT)
+ role, flags, *_ = *body.unpack(BODY_FORMAT)
new(id, role, flags)
end
@@ -626,7 +626,6 @@ class FCGI
if FCGI::is_cgi?
yield ::CGI.new(*args)
else
- exit_requested = false
FCGI::each do |request|
$stdout, $stderr = request.out, request.err
diff --git a/metadata.yml b/metadata.yml
deleted file mode 100644
index 8c81294..0000000
--- a/metadata.yml
+++ /dev/null
@@ -1,65 +0,0 @@
---- !ruby/object:Gem::Specification
-name: fcgi
-version: !ruby/object:Gem::Version
- version: 0.9.2.1
-platform: ruby
-authors:
-- mva
-autorequire:
-bindir: bin
-cert_chain: []
-date: 2013-09-30 00:00:00.000000000 Z
-dependencies: []
-description: FastCGI is a language independent, scalable, open extension to CGI that
- provides high performance without the limitations of server specific APIs. This
- version aims to be compatible with both 1.8.x and 1.9.x versions of Ruby, and also
- will be ported to 2.0.x.
-email: mva@mva.name
-executables: []
-extensions:
-- ext/fcgi/extconf.rb
-extra_rdoc_files:
-- LICENSE
-- README.rdoc
-- README.signals
-files:
-- VERSION
-- ext/fcgi/MANIFEST
-- ext/fcgi/Makefile
-- ext/fcgi/extconf.rb
-- ext/fcgi/fcgi.c
-- lib/fcgi.rb
-- fcgi.gemspec
-- LICENSE
-- README.rdoc
-- README.signals
-- test/helper.rb
-- test/test_fcgi.rb
-homepage: http://github.com/alphallc/ruby-fcgi-ng
-licenses:
-- MIT
-metadata: {}
-post_install_message:
-rdoc_options:
-- --charset=UTF-8
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
- requirements:
- - - '>='
- - !ruby/object:Gem::Version
- version: '0'
-required_rubygems_version: !ruby/object:Gem::Requirement
- requirements:
- - - '>='
- - !ruby/object:Gem::Version
- version: '0'
-requirements: []
-rubyforge_project:
-rubygems_version: 2.0.3
-signing_key:
-specification_version: 4
-summary: FastCGI library for Ruby.
-test_files:
-- test/helper.rb
-- test/test_fcgi.rb
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in second set of .debs but not in first
-rw-r--r-- root/root /usr/lib/debug/.build-id/40/e803ae8215127b038efd221e743b06c63533b7.debug -rw-r--r-- root/root /usr/lib/debug/.build-id/87/63ee146f4655e166badfe4e47baa624b039f89.debug -rw-r--r-- root/root /usr/lib/debug/.dwz/x86_64-linux-gnu/ruby-fcgi.debug -rw-r--r-- root/root /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.0.0/fcgi.so -rw-r--r-- root/root /usr/share/rubygems-integration/3.0.0/specifications/fcgi-0.9.2.2.gemspec -rw-r--r-- root/root /usr/share/rubygems-integration/3.1.0/specifications/fcgi-0.9.2.2.gemspec
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/lib/debug/.build-id/fc/e0c64f6cf723217336a3a5d73edc3081c078da.debug -rw-r--r-- root/root /usr/share/rubygems-integration/3.1.0/specifications/fcgi-0.9.2.1.gemspec
Control files of package ruby-fcgi: lines which differ (wdiff format)
Depends: ruby | ruby-interpreter, libc6 (>= 2.15), 2.4), libfcgi0ldbl (>= 2.4.2), libruby3.0 (>= 3.0.0~preview1) | libruby3.1 (>= 3.1.2), libruby (>= 1:3.0~0) | libruby (>= 1:3.1~0), libruby (<< 1:3.2~)
Ruby-Versions: ruby3.0 ruby3.1
Control files of package ruby-fcgi-dbgsym: lines which differ (wdiff format)
Build-Ids: fce0c64f6cf723217336a3a5d73edc3081c078da 40e803ae8215127b038efd221e743b06c63533b7 8763ee146f4655e166badfe4e47baa624b039f89
Ruby-Versions: ruby3.0 ruby3.1