From nobody Mon Nov 14 21:18:24 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 4NB2Gm6h5yz4fcxV; Mon, 14 Nov 2022 21:18:24 +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 4NB2Gm6872z3jt4; Mon, 14 Nov 2022 21:18:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668460704; 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=c86uX7+aDkRcVHQ5OVoJ8FJPn1ua5RRfgJtCkeBZxYg=; b=CiQ98ZxH0hEbsZQc16ZRpI6KpTXQbEgjQT1sgwkHxHAFW1iON9Vf8NkuBUbK+9MtFiCt6s QfkWhgjjwzx9+BwwMeBBt/RDTDJB0lHZ9IVVv+tpjFaDPZu0vZh678TpaMnm5DskyGVc83 XsHC1KS+3sc/+OPCOK2S1b0Q8whgNVqoRE73QQWJkCuMx1xtWdFjmMFQTGGWtBFbJUxsWd KD57/IPRCwgSn/uBSrzQzJMu88GTSgdFms0L09dkkzcg87XSbsgd+FGm/RGH4XWc1di7Py NOXUcV+PBkP+Mn08WIHcFEMcJwwGcZ5VlwzBENw0GIJ/SrVipJgVq3h/RufWXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668460704; 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=c86uX7+aDkRcVHQ5OVoJ8FJPn1ua5RRfgJtCkeBZxYg=; b=OagaR/jrcUpcXy0NBtzaYFk4uXUGnjXBpfti6PYFjF3jNtCzFOEeDZNESp0r7lmwcpI1HG wkzTjPXswtHqcr+VBtcr5OTo2rOARV5NjpvRC68eVECVFPnVmikUhD5fz8/0c28sjnnNW2 sRxaA6oAzHZ9OQS3o71Whaf07Ie265taX+vCJhgZsmL8bEeHBiQrKc/z/keWuwpOuo/X93 IjI+MxvkWCK54PTY/aHSfPjx+Z+MsnFnlckg5DWlOagR195GRH3caP8PCdPlfccXOiOMeE vrYvFMy31FFhCCDnobi+Vd0khd/ov/Zo9JAjNXOA1dGduWQiKtMw602TDiApag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668460704; a=rsa-sha256; cv=none; b=veapcc7hfjw420ELHi/BrX63bfpgijtlQAM0RCx3yX7xtNBsBiJfhGcvqfJ5WTYvvEwIVQ M4509srcTc2k7CuKieTLT/WlbmMllEXNwvtWCqhClwbJ1MvqZKFTSDwMC3Uh0PyFSGgCRp 0sKJOMN1fAdNpGlxdmKzqqav7Bu0VjEBxNNBZAVNn4JIN6XjPY9jWGDq3zpjRQ/9N2P1s1 5VJVbsVxJwaFakeblERC1rrsftnRBkZrSFbQqAI1ekSgjzY6TUris61IXwMFk2CAHXMPVz hmA/RCp/x9qZM6wyb19aWUXbQA92bX61mfky2ueu0RGV4/1ftRzHcvAz2k5uHQ== 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 4NB2Gm5Bq2zwdC; Mon, 14 Nov 2022 21:18:24 +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 2AELIOAR079708; Mon, 14 Nov 2022 21:18:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AELIO1H079707; Mon, 14 Nov 2022 21:18:24 GMT (envelope-from git) Date: Mon, 14 Nov 2022 21:18:24 GMT Message-Id: <202211142118.2AELIO1H079707@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vsevolod Stakhov Subject: git: 7a34813aa2b3 - main - mail/rspamd: Backport important fixes from the upstream 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: vsevolod X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a34813aa2b37410eba1716a17198e7325292249 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vsevolod: URL: https://cgit.FreeBSD.org/ports/commit/?id=7a34813aa2b37410eba1716a17198e7325292249 commit 7a34813aa2b37410eba1716a17198e7325292249 Author: Vsevolod Stakhov AuthorDate: 2022-11-14 21:17:10 +0000 Commit: Vsevolod Stakhov CommitDate: 2022-11-14 21:17:10 +0000 mail/rspamd: Backport important fixes from the upstream --- mail/rspamd/Makefile | 1 + .../files/patch-src_libserver_hyperscan_tools.cxx | 21 +++++++++++++++++++++ .../files/patch-src_libutil_cxx_file_util.cxx | 22 ++++++++++++++++++++++ mail/rspamd/files/pkg-message.in | 10 ++++++++++ 4 files changed, 54 insertions(+) diff --git a/mail/rspamd/Makefile b/mail/rspamd/Makefile index 2e86b69f48b9..a3810ab16f4e 100644 --- a/mail/rspamd/Makefile +++ b/mail/rspamd/Makefile @@ -1,5 +1,6 @@ PORTNAME= rspamd PORTVERSION= 3.4 +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= vsevolod@FreeBSD.org diff --git a/mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx b/mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx new file mode 100644 index 000000000000..72eb1173ae88 --- /dev/null +++ b/mail/rspamd/files/patch-src_libserver_hyperscan_tools.cxx @@ -0,0 +1,21 @@ +diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx +index 6187208a9..96366067d 100644 +--- src/libserver/hyperscan_tools.cxx ++++ src/libserver/hyperscan_tools.cxx +@@ -306,7 +306,15 @@ auto load_cached_hs_file(const char *fname, std::int64_t offset = 0) -> tl::expe + msg_debug_hyperscan_lambda("multipattern: create new database in %s; %Hz size", + tmpfile_pattern.data(), unserialized_size); + void *buf; +- posix_memalign(&buf, 16, unserialized_size); ++#ifdef HAVE_GETPAGESIZE ++ auto page_size = getpagesize(); ++#else ++ auto page_size = sysconf(_SC_PAGESIZE); ++#endif ++ if (page_size == -1) { ++ page_size = 4096; ++ } ++ posix_memalign(&buf, page_size, unserialized_size); + if (buf == nullptr) { + return tl::make_unexpected(error {"Cannot allocate memory", errno, error_category::CRITICAL }); + } diff --git a/mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx b/mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx new file mode 100644 index 000000000000..f7461da0c82b --- /dev/null +++ b/mail/rspamd/files/patch-src_libutil_cxx_file_util.cxx @@ -0,0 +1,22 @@ +diff --git a/src/libutil/cxx/file_util.cxx b/src/libutil/cxx/file_util.cxx +index e3b3a2605..4536fa97b 100644 +--- src/libutil/cxx/file_util.cxx ++++ src/libutil/cxx/file_util.cxx +@@ -198,7 +198,7 @@ auto raii_mmaped_file::mmap_shared(raii_file &&file, + } + /* Update stat on file to ensure it is up-to-date */ + file.update_stat(); +- map = mmap(nullptr, file.get_size() - offset, flags, MAP_SHARED, file.get_fd(), offset); ++ map = mmap(nullptr, (std::size_t)(file.get_size() - offset), flags, MAP_SHARED, file.get_fd(), offset); + + if (map == MAP_FAILED) { + return tl::make_unexpected(error { fmt::format("cannot mmap file {}: {}", +@@ -206,7 +206,7 @@ auto raii_mmaped_file::mmap_shared(raii_file &&file, + + } + +- return raii_mmaped_file{std::move(file), map, file.get_size() - offset}; ++ return raii_mmaped_file{std::move(file), map, (std::size_t)(file.get_size() - offset)}; + } + + auto raii_mmaped_file::mmap_shared(const char *fname, int open_flags, diff --git a/mail/rspamd/files/pkg-message.in b/mail/rspamd/files/pkg-message.in index 927f2a5b46ac..52b6ff711785 100644 --- a/mail/rspamd/files/pkg-message.in +++ b/mail/rspamd/files/pkg-message.in @@ -13,5 +13,15 @@ You can edit %%ETCDIR%%/rspamd.newsyslog.conf to change log file rotation configuration. EOM +}, +{ type: upgrade + maximum_version: 3.4 + minimum_version: 3.3 + message: <