From nobody Mon May 09 10:28:04 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 1CE731AC0E5F; Mon, 9 May 2022 10:28:05 +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 4Kxcnd0Jplz3BpW; Mon, 9 May 2022 10:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652092085; 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=W0QoWZtXDWwwmXYZoRbadZ2/43W4CmGUYSqYcE0ovfg=; b=K8nRKm1yzXgxbns43f9weReBH3dEPDweea2688kLAy/4CJlft7sXoZAly+f9iVp9UREeSv 7BEL+URVbAjNCMZaCqhJc0M/RDa/mBDJAkOAbBlNz0D+CUHzXpFW/fRNJ5EgGAXAV95UpL Yqin24j8sJ79uxsVW9i8FpjzaH/sO2OHWHvlwyYULbFJ7DewzRc+I2UANfkuNcB84YmUld HV116A/+SR2ekFhz+CoWJnue4oZ7LjH2EP2rwq6QMjiqPVSZlp3QqsKWW8jZ52X/0yKgbN EwY6KANdgA8G1MrFRCWaG1BG8LDVfiSqL5/LJm4UAUCxbXik/lBV6q4TkfVJoA== 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 DC1F36CF8; Mon, 9 May 2022 10:28:04 +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 249AS4b5056843; Mon, 9 May 2022 10:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 249AS4OQ056842; Mon, 9 May 2022 10:28:04 GMT (envelope-from git) Date: Mon, 9 May 2022 10:28:04 GMT Message-Id: <202205091028.249AS4OQ056842@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: 892450efb305 - main - databases/rubygem-bdb1: 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: 892450efb3055d3e962acfa008c99e6580b61575 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652092085; 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=W0QoWZtXDWwwmXYZoRbadZ2/43W4CmGUYSqYcE0ovfg=; b=cgVQotHKLd5FA+g9YR+qclg28cjn1PcdZlTtP/i3EzQY6fi6sl695pYKNod6XOL2Y3/y2T jNIe+cSxqYMrPjvwpompVUyhHuaWU2FTGkJN4Ljk7tvY8z0Wi9t+QaDPG14iPn7FXYiwKW /jLGlRfphbndv3VI/3RD5lDFJtNh4JZPxpquL60r19DvniymdHgYA6adn/FvmWorRNfHJ4 23+AJg+9/LaVLXlsRWrQClfvYJnHz+hBVkcA8Ka/IXeC2fi7byCfi6DPIotoQKzFgk+xh6 jA5UTzClKvvhU5G5W9bnGUqEtmSika0V05JgSlMlP8juxHLQ3BkGuV/vy2Ypeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652092085; a=rsa-sha256; cv=none; b=xdTT9b1adpcNR+npSNAKy5KjaIuGcFMnQ9qZwxpP37D/U2pLwKkOZ/wnVDX0gc+WxCwLZ9 CDTOzBFm5xnvisDnlXFqbgjjEP9uTNaOJF7nvTccgfHr3PIx6GZ/Co3BrRdDb4+RMKZ4RB w1fO0InNhzqDubHmQ0MBFT4w5m8USpPseYFEyP4Tk7EV0PzLtyPEjrO5KudmnrK5YnFqhx jI6lCRlvuXVxM+P30o/vwzO6Z9frxRjc3uq9ni9UHExRM5SyQEEKtpXMGOb5cObYcmYzFf 1pgaJLgLc6ubZ7TAcZxOehSaCr2vBQ9CCYTCKXGNNtn1G3cjtDOAz5Z5iYRR7g== 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=892450efb3055d3e962acfa008c99e6580b61575 commit 892450efb3055d3e962acfa008c99e6580b61575 Author: Dirk Meyer AuthorDate: 2022-05-09 10:26:10 +0000 Commit: Dirk Meyer CommitDate: 2022-05-09 10:27:58 +0000 databases/rubygem-bdb1: fix runtime error with ruby 3.0: Undefined symbol "rb_secure" --- databases/rubygem-bdb1/Makefile | 2 +- databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c | 67 +++++++++++++++++++++- .../rubygem-bdb1/files/patch-ext_bdb1_recnum.c | 16 +++++- 3 files changed, 79 insertions(+), 6 deletions(-) diff --git a/databases/rubygem-bdb1/Makefile b/databases/rubygem-bdb1/Makefile index f3f770dd6d02..2743e608e2b3 100644 --- a/databases/rubygem-bdb1/Makefile +++ b/databases/rubygem-bdb1/Makefile @@ -1,6 +1,6 @@ PORTNAME= bdb1 PORTVERSION= 0.2.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases rubygems MASTER_SITES= RG diff --git a/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c b/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c index 64290a2c98bd..d039d2ebdbb8 100644 --- a/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c +++ b/databases/rubygem-bdb1/files/patch-ext_bdb1_bdb1.c @@ -1,6 +1,18 @@ ---- ext/bdb1/bdb1.c.orig 2016-01-18 21:34:35 UTC +--- ext/bdb1/bdb1.c.orig 2022-05-09 10:22:04 UTC +++ ext/bdb1/bdb1.c -@@ -752,15 +752,15 @@ bdb1_s_alloc(VALUE obj) +@@ -733,9 +733,11 @@ bdb1_close(VALUE obj) + VALUE opt; + bdb1_DB *dbst; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4) { + rb_raise(rb_eSecurityError, "Insecure: can't close the database"); + } ++#endif + Data_Get_Struct(obj, bdb1_DB, dbst); + bdb1_i_close(dbst); + return Qnil; +@@ -752,15 +754,15 @@ bdb1_s_alloc(VALUE obj) dbst->options |= BDB1_NOT_OPEN; cl = obj; while (cl) { @@ -19,3 +31,54 @@ dbst->type = DB_RECNO; break; } +@@ -878,7 +880,9 @@ bdb1_put(int argc, VALUE *argv, VALUE obj) + int ret, flags; + db_recno_t recno; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); ++#endif + GetDB(obj, dbst); + if (rb_scan_args(argc, argv, "21", &a, &b, &c) == 3) + flags = NUM2INT(c); +@@ -1071,7 +1075,9 @@ bdb1_del(VALUE obj, VALUE a) + db_recno_t recno; + volatile VALUE c = Qnil; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); ++#endif + GetDB(obj, dbst); + if (dbst->type == DB_HASH) { + rb_warning("delete can give strange result with DB_HASH"); +@@ -1112,7 +1118,9 @@ bdb1_delete_if(VALUE obj) + int ret, ret1, flags; + db_recno_t recno; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); ++#endif + GetDB(obj, dbst); + INIT_RECNO(dbst, key, recno); + DATA_ZERO(data); +@@ -1138,7 +1146,9 @@ bdb1_clear(VALUE obj) + int ret, value, flags; + db_recno_t recno; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); ++#endif + GetDB(obj, dbst); + INIT_RECNO(dbst, key, recno); + DATA_ZERO(data); +@@ -1536,8 +1546,10 @@ bdb1_sync(VALUE obj) + { + bdb1_DB *dbst; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4) + rb_raise(rb_eSecurityError, "Insecure: can't sync the database"); ++#endif + GetDB(obj, dbst); + bdb1_test_error(dbst->dbp->sync(dbst->dbp, 0)); + return Qtrue; diff --git a/databases/rubygem-bdb1/files/patch-ext_bdb1_recnum.c b/databases/rubygem-bdb1/files/patch-ext_bdb1_recnum.c index e9b7eb20fdcc..6f15ebe7c15b 100644 --- a/databases/rubygem-bdb1/files/patch-ext_bdb1_recnum.c +++ b/databases/rubygem-bdb1/files/patch-ext_bdb1_recnum.c @@ -1,6 +1,6 @@ ---- ext/bdb1/recnum.c.orig +--- ext/bdb1/recnum.c.orig 2022-05-09 10:22:04 UTC +++ ext/bdb1/recnum.c -@@ -17,7 +17,7 @@ +@@ -17,7 +17,7 @@ bdb1_recnum_init(int argc, VALUE *argv, VALUE obj) argc++; } rb_hash_aset(argv[argc - 1], array, INT2FIX(0)); @@ -8,4 +8,14 @@ + if (rb_hash_lookup2(argv[argc - 1], sarray, Qundef) != Qundef) { rb_hash_aset(argv[argc - 1], sarray, INT2FIX(0)); } - rb_hash_aset(argv[argc - 1], rb_str_new2("set_flags"), INT2FIX(DB_RENUMBER)); + return bdb1_init(argc, argv, obj); +@@ -134,7 +134,9 @@ bdb1_intern_shift_pop(VALUE obj, int depart, int len) + db_recno_t recno; + VALUE res; + ++#if defined(RUBY_SAFE_LEVEL_MAX) && RUBY_SAFE_LEVEL_MAX >= 4 + rb_secure(4); ++#endif + GetDB(obj, dbst); + INIT_RECNO(dbst, key, recno); + DATA_ZERO(data);