From nobody Tue Oct 12 12:23:53 2021 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 C423817E1F38; Tue, 12 Oct 2021 12:23:54 +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 4HTFFk2wLlz3mWx; Tue, 12 Oct 2021 12:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 103C3149DB; Tue, 12 Oct 2021 12:23:54 +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 19CCNr0X082914; Tue, 12 Oct 2021 12:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19CCNr2d082913; Tue, 12 Oct 2021 12:23:53 GMT (envelope-from git) Date: Tue, 12 Oct 2021 12:23:53 GMT Message-Id: <202110121223.19CCNr2d082913@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ashish SHUKLA Subject: git: 94973bbbe379 - main - net-im/ejabberd: Fix for lang/erlang update to 24.x 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: ashish X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94973bbbe379378b11aa53d9a43e4cb807c4b466 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ashish: URL: https://cgit.FreeBSD.org/ports/commit/?id=94973bbbe379378b11aa53d9a43e4cb807c4b466 commit 94973bbbe379378b11aa53d9a43e4cb807c4b466 Author: Ashish SHUKLA AuthorDate: 2021-10-12 12:18:08 +0000 Commit: Ashish SHUKLA CommitDate: 2021-10-12 12:23:34 +0000 net-im/ejabberd: Fix for lang/erlang update to 24.x While here, also add the SQL files for other RDBMS supported by ejabberd PR: 259067 Reported by: Marko Cupać MFH: 2021Q4 --- net-im/ejabberd/Makefile | 2 + .../files/patch-deps_jose_src_jose__server.erl | 46 ++++++++++++++++++++++ net-im/ejabberd/pkg-plist | 6 +++ 3 files changed, 54 insertions(+) diff --git a/net-im/ejabberd/Makefile b/net-im/ejabberd/Makefile index 67e6d60f2baa..7038251c355d 100644 --- a/net-im/ejabberd/Makefile +++ b/net-im/ejabberd/Makefile @@ -1,5 +1,6 @@ PORTNAME= ejabberd PORTVERSION= 21.07 +PORTREVISION= 1 CATEGORIES= net-im MAINTAINER= ashish@FreeBSD.org @@ -194,5 +195,6 @@ post-install: ${STAGEDIR}${DATADIR} @${CHMOD} +x ${STAGEDIR}${PREFIX}/${EJABBERD_LIBDIR}/${PORTNAME}-${PORTVERSION}/lib/eimp-${EIMP_VER}/priv/bin/eimp @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${EJABBERD_LIBDIR}/${PORTNAME}-${PORTVERSION}/lib/eimp-${EIMP_VER}/priv/bin/eimp + @cd ${WRKSRC}/sql && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${EJABBERD_LIBDIR}/${PORTNAME}-${PORTVERSION}/priv/sql .include diff --git a/net-im/ejabberd/files/patch-deps_jose_src_jose__server.erl b/net-im/ejabberd/files/patch-deps_jose_src_jose__server.erl new file mode 100644 index 000000000000..be50a38e7244 --- /dev/null +++ b/net-im/ejabberd/files/patch-deps_jose_src_jose__server.erl @@ -0,0 +1,46 @@ +Source: https://github.com/potatosalad/erlang-jose/commit/833f81666a0f9fc31e7a3c2403d72e168a4a3209.patch + +--- deps/jose/src/jose_server.erl.orig 2018-12-31 15:47:40 UTC ++++ deps/jose/src/jose_server.erl +@@ -162,9 +162,7 @@ support_check() -> + + %% @private + check_ec_key_mode(_Fallback, Entries) -> +- ECPEMEntry = { +- 'ECPrivateKey', +- << ++ PEMBin = << + 48,119,2,1,1,4,32,104,152,88,12,19,82,251,156,171,31,222,207, + 0,76,115,88,210,229,36,106,137,192,81,153,154,254,226,38,247, + 70,226,157,160,10,6,8,42,134,72,206,61,3,1,7,161,68,3,66,0,4, +@@ -173,13 +171,23 @@ check_ec_key_mode(_Fallback, Entries) -> + 36,225,0,90,21,186,235,132,152,229,13,189,196,121,64,84,64, + 229,173,12,24,23,127,175,67,247,29,139,91 + >>, +- not_encrypted +- }, +- case public_key:pem_entry_decode(ECPEMEntry) of +- #'ECPrivateKey'{ privateKey = PrivateKey, publicKey = PublicKey } when is_list(PrivateKey) andalso is_tuple(PublicKey) -> +- [{ec_key_mode, list} | Entries]; +- #'ECPrivateKey'{ privateKey = PrivateKey, publicKey = PublicKey } when is_binary(PrivateKey) andalso is_binary(PublicKey) -> +- [{ec_key_mode, binary} | Entries] ++ PEMEntry = {'ECPrivateKey', PEMBin, not_encrypted}, ++ %% Erlang 24 changes 'ECPrivateKey' record in a way that makes record matching fail ++ %% when this module is compiled on Erlang 23 (or earlier) but runs on 24. ++ %% So we destructure tuples, as ugly as it may be. ++ %% ++ %% See erlang-jose#113 for details. ++ PrivateKey = case list_to_integer(erlang:system_info(otp_release)) >= 24 of ++ true -> ++ {'ECPrivateKey', _Version, PrivKey0, _Params, _PubKey0, _Attributes} = public_key:pem_entry_decode(PEMEntry), ++ PrivKey0; ++ false -> ++ {'ECPrivateKey', _Version, PrivKey0, _Params, _PubKey0} = public_key:pem_entry_decode(PEMEntry), ++ PrivKey0 ++ end, ++ case is_binary(PrivateKey) of ++ true -> [{ec_key_mode, binary} | Entries]; ++ _ -> [{ec_key_mode, list} | Entries] + end. + + %% @private diff --git a/net-im/ejabberd/pkg-plist b/net-im/ejabberd/pkg-plist index 14f8d2388840..dcee360dc44b 100644 --- a/net-im/ejabberd/pkg-plist +++ b/net-im/ejabberd/pkg-plist @@ -866,6 +866,12 @@ %%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/msgs/zh.msg %%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/lite.sql %%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/lite.new.sql +%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/mssql.sql +%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/mysql.new.sql +%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/mysql.old-to-new.sql +%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/mysql.sql +%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/pg.new.sql +%%EJABBERD_LIBDIR%%/%%PORTNAME%%-%%PORTVERSION%%/priv/sql/pg.sql sbin/%%PORTNAME%%ctl %%DATADIR%%/captcha.sh %%PORTDOCS%%%%DOCSDIR%%/COPYING