From nobody Mon May 09 11:00:57 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A37B61AC757E; Mon, 9 May 2022 11:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KxdWY4Gxsz3Fsg; Mon, 9 May 2022 11:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652094057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ce7efKa++wUo2VoGmXWlbIHtJsTcGq5kwZJo/cP/PFQ=; b=cnQMCdBbnqMQnyy+JW8HpWTSGtpVD0m9rIisDdXjw88YFnDfcMUKProBEKj9QXD8JtBoEA zKTsdVVFbpXvknsSB6gWTJh585e5ewSFJRCjSdtWQxCQu1V7Miy6edOVt0DCrCq5Bc7bZm TfkO/ev817XHr6UaiJQKebbXtUcJRJYSHjUe2mg38lZyokE544mfGSJughTddfxiKQB2dw IqkVdl6ZxWfdkBxzjTgNJ3ONIRX5yzP6VMelhQNpxX9W6+b9uSWAACnTe4fk7SZGnL/qUQ 2xZh7x5LnmDhR6ld7VckbO0BJ4Lavw13hO1qhOWD0BXxKLPoO/dGzLSnsECB3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 742527E6E; Mon, 9 May 2022 11:00:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 249B0vi9006146; Mon, 9 May 2022 11:00:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 249B0vw6006145; Mon, 9 May 2022 11:00:57 GMT (envelope-from git) Date: Mon, 9 May 2022 11:00:57 GMT Message-Id: <202205091100.249B0vw6006145@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dirk Meyer Subject: git: d82f8cc4f0c6 - main - www/rubygem-fcgi: fix runtime error with ruby 3.0: Undefined symbol "rb_secure" List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dinoex X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d82f8cc4f0c6dae23e41880fe66e7b6df6c36e8b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652094057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ce7efKa++wUo2VoGmXWlbIHtJsTcGq5kwZJo/cP/PFQ=; b=UXwuzQWW3BKMjiwvrLzyQ7NkzA190jXW6uahdhPeGUntAXQhcLdawWU4gXqgCMBZBr4DWG TGmc+u6OWs1Ju4lKS4lP6gu72rDgrieyPpWRxcfWY1EsVq5mZSn1VJPdxvCSqmi0hLuUYw NFQw+XZKANbL66aYe57KgLdfna5yMrUPNBDWns9PZ57PIgCRYX8ABBAQcEXXBklGJ5RW8+ peIZzNqftmj7miQg+AkBEFFc1GPOcVczeGJAtxFZO4Wwg29I/b9nymTvyPnzEqmfQqVWvQ +1q7fXKGnEa7ooR+wKV0tuWMIQTopoJly0gJ7m5cmDSe127AObGVPoD4ZAsz5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652094057; a=rsa-sha256; cv=none; b=SwRRr2bWSB5xw183aesmikjMjUBMmGgaX0ZYM+1RGKusDTfrGfjIDLkftiZZ5s0vgoKn5I 4o1nNh24qM/CZz0D4Tl+4aZQqIfHIHGav+kn5KXWi9WizLGVBmLrsGuliBb6nT69Fx+vW/ Em7zRZXYhZx4BAg5jQG4gOL5vue499+V6EmZ8xhn1zIyzSFPBDidMqzEeV3N0LimU/2zTU hCFl5YAIpn9jiU56e5Ocjbxne4FRZJAL0Lzo3QctTf2AlFeGaLp74gJsHSupBTIdgYzJkC svBOdRyN1sFLw07Y0J0nBEjZfhDdsBgZTCJJxLYJ2r/omFEW/rAo1k0d+R/TMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dinoex: URL: https://cgit.FreeBSD.org/ports/commit/?id=d82f8cc4f0c6dae23e41880fe66e7b6df6c36e8b commit d82f8cc4f0c6dae23e41880fe66e7b6df6c36e8b Author: Dirk Meyer AuthorDate: 2022-05-09 11:00:38 +0000 Commit: Dirk Meyer CommitDate: 2022-05-09 11:00:38 +0000 www/rubygem-fcgi: fix runtime error with ruby 3.0: Undefined symbol "rb_secure" --- www/rubygem-fcgi/Makefile | 1 + www/rubygem-fcgi/files/patch-fcgi.c | 157 ++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) diff --git a/www/rubygem-fcgi/Makefile b/www/rubygem-fcgi/Makefile index d447afb83391..b9fee76765a1 100644 --- a/www/rubygem-fcgi/Makefile +++ b/www/rubygem-fcgi/Makefile @@ -1,5 +1,6 @@ PORTNAME= fcgi PORTVERSION= 0.9.2.1 +PORTREVISION= 1 CATEGORIES= www ruby MASTER_SITES= RG diff --git a/www/rubygem-fcgi/files/patch-fcgi.c b/www/rubygem-fcgi/files/patch-fcgi.c new file mode 100644 index 000000000000..defd67bf7a37 --- /dev/null +++ b/www/rubygem-fcgi/files/patch-fcgi.c @@ -0,0 +1,157 @@ +--- ext/fcgi/fcgi.c.orig 2022-05-09 10:44:18 UTC ++++ ext/fcgi/fcgi.c +@@ -131,8 +131,10 @@ static VALUE fcgi_s_accept(VALUE self) + while( *(pvalue++) != '=') size++; + key = rb_str_new(pkey, size); + value = rb_str_new2(pvalue); ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + OBJ_TAINT(key); + OBJ_TAINT(value); ++#endif + rb_hash_aset(data->env, key, value); + } + +@@ -262,7 +264,9 @@ static VALUE fcgi_stream_putc(VALUE self, VALUE ch) + FCGX_Stream *stream; + int c; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); ++#endif + Data_Get_Stream(self, stream); + if ((c = FCGX_PutChar(NUM2INT(ch), stream)) == EOF) + CHECK_STREAM_ERROR(stream); +@@ -274,7 +278,9 @@ static VALUE fcgi_stream_write(VALUE self, VALUE str) + FCGX_Stream *stream; + int len; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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 +413,11 @@ static VALUE fcgi_stream_ungetc(VALUE self, VALUE ch) + FCGX_Stream *stream; + int c; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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); +@@ -420,11 +428,13 @@ static VALUE fcgi_stream_gets(VALUE self) { + FCGX_Stream *stream; + char buff[BUFSIZ]; + VALUE str = rb_str_new(0,0); ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + OBJ_TAINT(str); + + 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 +459,11 @@ static VALUE fcgi_stream_read(int argc, VALUE *argv, V + char *buff; + int n; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) { + rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO"); + } ++#endif + + Data_Get_Stream(self, stream); + +@@ -464,7 +476,9 @@ static VALUE fcgi_stream_read(int argc, VALUE *argv, V + return Qnil; + } + str = rb_str_new(buff, n); ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + OBJ_TAINT(str); ++#endif + + while(!FCGX_HasSeenEOF(stream)) { + n = FCGX_GetStr(buff, 16384, stream); +@@ -488,7 +502,9 @@ static VALUE fcgi_stream_read(int argc, VALUE *argv, V + CHECK_STREAM_ERROR(stream); + if (n > 0) { + str = rb_str_new(buff, n); ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + OBJ_TAINT(str); ++#endif + free(buff); + return str; + } +@@ -502,9 +518,11 @@ static VALUE fcgi_stream_eof(VALUE self) + { + FCGX_Stream *stream; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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 +531,11 @@ static VALUE fcgi_stream_close(VALUE self) + { + FCGX_Stream *stream; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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 +552,41 @@ static VALUE fcgi_stream_closed(VALUE self) + + static VALUE fcgi_stream_binmode(VALUE self) + { ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + 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_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + if (rb_safe_level() >= 4 && !OBJ_TAINTED(self)) { + rb_raise(rb_eSecurityError, "Insecure: operation on untainted IO"); + } ++#endif + return Qfalse; + } +