From nobody Fri Jun 21 01:56:38 2024 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 4W50pG3SXJz5PCp5; Fri, 21 Jun 2024 01:56:38 +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 4W50pG1QdSz4YC8; Fri, 21 Jun 2024 01:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718934998; 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=xHTtTW5DBLh5XCE+BpZDk0IZgH4bhSdFL6mWHrwPVqQ=; b=nlXdN/XTBdKlIc7Yk+liJFi8cBrs+mOUCkcQRE6rkpBzRqAJ9KwPhuYOjKHeIoXobLLzcK Vstv7q+MKy4ilfMrdo3E9MREwMHbx56Qwqu+cK815hlfjSD8c1XnVYElHrwXruI/Gl8mmg D+9drvNxqePYAB7mNphJx+cledzB1r9LIbZ2Pt8bRuYjtS3UsbsmE8JJxKmZnb9acpk3MF nK0IcbABuarjZtSfC6W9RmDfpldilwR7OCq52GaDM9LMWwzAh7krmVHVL+uPezUNwa7s8p H2l6E6a7yN0OiWTtjHPImP4/KxIsvQlbQ39BvblF6pdmOdcgTtPNTN40ruWIxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718934998; a=rsa-sha256; cv=none; b=vtDOercJMwgm4TIRDKuE2hGtAbyE4zzeE4UouGzsnfvz1zY7KOA9lnkDrSsXRwU7Ccs8yy anc0JVD5KQeuSrya3YGjZIGzb4Ar2ZtRKk8e+vXqRLmJAa1VttbIoA6ttwaQ7QbPBIuEUI tRifcr2tFY5qVCzQ353zMFkL8P3YG5nicvyLopSK+ySQIESkCVw5QzUDfhLbPWtH6iFOs1 97bjSYS1qaDml6mGa3wW/aB1ipKGCY+Lg1xlwLo1JBLekpeLyiEfBRImLNL5EHdTHA+dTD lNRIickBnaE+JGjSdosEjO3LehwCH0JFeiLc9IiEyrVKOfnDQq7oxQaG6lCRPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718934998; 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=xHTtTW5DBLh5XCE+BpZDk0IZgH4bhSdFL6mWHrwPVqQ=; b=gxHd86L4CC5c+NhdMZLr1m2EJz8/leBQOSqA/Jtchrv3SSKWGFu8q0CKIc1BykAsPP656X BkpE+3ZYR5bxPZiX2mFADm6eytQtpbAyMY1LCS+tKsAd2VXs0lMjH1a+KwQsAvy7ghBCr3 YSmsrXJYCI81gwhejTuesT0YTuNWmFYAwDUApdwQxWux+YhPqex6ZzwfRbLY+CmBT1JN7p WcjZhI1REXDfg/vNa3uC6dtkYqvs30TtjpwhsAA2Yqnr2a7WNjfX20g48aMY3kKRcTzYcv 6gOkRYgmphrWJXIgnSkG6xR67bDKf6nC2nKiW5zMqV7KjOjYpxopgWshOBk4bQ== 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 4W50pG12HXzpxv; Fri, 21 Jun 2024 01:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45L1ucW4077770; Fri, 21 Jun 2024 01:56:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45L1uciQ077767; Fri, 21 Jun 2024 01:56:38 GMT (envelope-from git) Date: Fri, 21 Jun 2024 01:56:38 GMT Message-Id: <202406210156.45L1uciQ077767@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: 5ff2ef7d70f8 - main - mail/opendkim-devel: Add patch to fix bug related to Lua 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ff2ef7d70f8411449f3fe5b0f12da8597dce7d3 Auto-Submitted: auto-generated The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=5ff2ef7d70f8411449f3fe5b0f12da8597dce7d3 commit 5ff2ef7d70f8411449f3fe5b0f12da8597dce7d3 Author: Yasuhiro Kimura AuthorDate: 2024-06-21 01:56:06 +0000 Commit: Yasuhiro Kimura CommitDate: 2024-06-21 01:56:06 +0000 mail/opendkim-devel: Add patch to fix bug related to Lua PR: 279811 Reported by: Yasuhito FUTATSUKI Obtained from: https://github.com/trusteddomainproject/OpenDKIM/pull/201 --- mail/opendkim-devel/Makefile | 1 + mail/opendkim-devel/files/patch-lua_pop | 86 +++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/mail/opendkim-devel/Makefile b/mail/opendkim-devel/Makefile index 338b4141d3d1..9053f3e023aa 100644 --- a/mail/opendkim-devel/Makefile +++ b/mail/opendkim-devel/Makefile @@ -2,6 +2,7 @@ PORTNAME= opendkim DISTVERSIONPREFIX= rel-opendkim- DISTVERSION= 2.11.0-Beta2-48 DISTVERSIONSUFFIX= -g551ab382 +PORTREVISION= 1 CATEGORIES= mail security PKGNAMESUFFIX= -devel diff --git a/mail/opendkim-devel/files/patch-lua_pop b/mail/opendkim-devel/files/patch-lua_pop new file mode 100644 index 000000000000..129d05d62e6d --- /dev/null +++ b/mail/opendkim-devel/files/patch-lua_pop @@ -0,0 +1,86 @@ +From 57b86d35381ed9bfb7e4be4e6512fb64163dd725 Mon Sep 17 00:00:00 2001 +From: FUTATSUKI Yasuhito +Date: Tue, 27 Feb 2024 14:41:59 +0900 +Subject: [PATCH] Lua: Fix stack level after register odkim functions. + +When luaL_setfuncs() is replaced by luaL_newlib() + lua_setglobal() +in commit 74b3374feee34fba14a0e15f89f049cbe4a3dafd, the commit did +not take account that lua_setglobal() pops a value from the stack. + +Thus, following lua pop(l, 1) tries to pop from empty stack in +Lua >= 5.2, especially in Lua 5.4, it causes abort(). + +This fix it. + +* miltertest/miltertest.c (main): + Don't pop after lua_setglobal() in Lua >= 5.2 + +* opendkim/opendkim-lua.c + (dkimf_lua_setup_hook, dkimf_lua_screen_hook, + dkimf_lua_stats_hook, dkimf_lua_final_hook): As above. +--- + miltertest/miltertest.c | 2 +- + opendkim/opendkim-lua.c | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git miltertest/miltertest.c miltertest/miltertest.c +index b4a345f7..339cfa91 100644 +--- miltertest/miltertest.c ++++ miltertest/miltertest.c +@@ -4014,8 +4014,8 @@ main(int argc, char **argv) + lua_setglobal(l, "mt"); + #else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "mt", mt_library); +-#endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); ++#endif /* LUA_VERSION_NUM >= 502 */ + + /* register constants */ + lua_pushnumber(l, MT_HDRINSERT); +diff --git opendkim/opendkim-lua.c opendkim/opendkim-lua.c +index 3786aa4b..c1a67f90 100644 +--- opendkim/opendkim-lua.c ++++ opendkim/opendkim-lua.c +@@ -490,8 +490,8 @@ dkimf_lua_setup_hook(void *ctx, const char *script, size_t scriptlen, + lua_setglobal(l, "odkim"); + # else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_setup); +-# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); ++# endif /* LUA_VERSION_NUM >= 502 */ + + /* + ** Register constants. +@@ -649,8 +649,8 @@ dkimf_lua_screen_hook(void *ctx, const char *script, size_t scriptlen, + lua_setglobal(l, "odkim"); + # else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_screen); +-# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); ++# endif /* LUA_VERSION_NUM >= 502 */ + + /* + ** Register constants. +@@ -798,8 +798,8 @@ dkimf_lua_stats_hook(void *ctx, const char *script, size_t scriptlen, + lua_setglobal(l, "odkim"); + # else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_stats); +-# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); ++# endif /* LUA_VERSION_NUM >= 502 */ + + /* + ** Register constants. +@@ -1039,8 +1039,8 @@ dkimf_lua_final_hook(void *ctx, const char *script, size_t scriptlen, + lua_setglobal(l, "odkim"); + # else /* LUA_VERSION_NUM >= 502 */ + luaL_register(l, "odkim", dkimf_lua_lib_final); +-# endif /* LUA_VERSION_NUM >= 502 */ + lua_pop(l, 1); ++# endif /* LUA_VERSION_NUM >= 502 */ + + /* + ** Register constants. +-- +2.45.2 +