From: "Petr Vaněk" <arkamar@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/
Date: Wed, 2 Oct 2024 17:44:48 +0000 (UTC) [thread overview]
Message-ID: <1727891031.a420be1dffb7d144cda2161519165a47d1c22d45.arkamar@gentoo> (raw)
commit: a420be1dffb7d144cda2161519165a47d1c22d45
Author: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 2 17:36:00 2024 +0000
Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Wed Oct 2 17:43:51 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a420be1d
mail-filter/rspamd: fix build issue with lua5-{3,4}
Backport patch, which fixes a build issue with Lua 5.3 and 5.4.
Issue: https://github.com/rspamd/rspamd/issues/5163
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>
.../rspamd/files/rspamd-3.10.0-libucl-type.patch | 36 ++++++++++++++++++++++
...spamd-3.10.0.ebuild => rspamd-3.10.0-r1.ebuild} | 3 ++
2 files changed, 39 insertions(+)
diff --git a/mail-filter/rspamd/files/rspamd-3.10.0-libucl-type.patch b/mail-filter/rspamd/files/rspamd-3.10.0-libucl-type.patch
new file mode 100644
index 000000000000..25d4c32d26ff
--- /dev/null
+++ b/mail-filter/rspamd/files/rspamd-3.10.0-libucl-type.patch
@@ -0,0 +1,36 @@
+From 3041484f859f3d8cc2275c5189280c31ff3ffeda Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Wed, 2 Oct 2024 15:01:07 +0200
+Subject: [PATCH] [Fix] Use correct type for keylen in lua_ucl_newindex
+
+The keylen variable used in lua_ucl_newindex function should use size_t
+type instead of lua_Integer, because all functions that use keylen
+expect it to be of size_t type. This mismatch leads to incompatible
+pointer types, and modern versions of GCC fail to compile the code.
+
+Fixes: 9e87597ceb05 ("[Project] Allow manipulations with opaque UCL objects")
+Issue: https://github.com/rspamd/rspamd/issues/5163
+PR: https://github.com/rspamd/rspamd/pull/5169
+
+diff --git a/contrib/libucl/lua_ucl.c b/contrib/libucl/lua_ucl.c
+index 19ac9cb127..473aefe0cf 100644
+--- a/contrib/libucl/lua_ucl.c
++++ b/contrib/libucl/lua_ucl.c
+@@ -1426,7 +1426,7 @@ lua_ucl_newindex(lua_State *L)
+
+ if (ucl_object_type(obj) == UCL_OBJECT) {
+ if (key_type == LUA_TSTRING) {
+- lua_Integer keylen;
++ size_t keylen;
+ const char *key = lua_tolstring(L, 2, &keylen);
+
+ ucl_object_t *value_obj = lua_ucl_object_get(L, 3);
+@@ -1539,7 +1539,7 @@ lua_ucl_newindex(lua_State *L)
+ obj->value.av = NULL;
+ obj->type = UCL_OBJECT;
+
+- lua_Integer keylen;
++ size_t keylen;
+ const char *key = lua_tolstring(L, 2, &keylen);
+
+ ucl_object_t *value_obj = lua_ucl_object_get(L, 3);
diff --git a/mail-filter/rspamd/rspamd-3.10.0.ebuild b/mail-filter/rspamd/rspamd-3.10.0-r1.ebuild
similarity index 97%
rename from mail-filter/rspamd/rspamd-3.10.0.ebuild
rename to mail-filter/rspamd/rspamd-3.10.0-r1.ebuild
index 45df6738554b..8fb906ba42cb 100644
--- a/mail-filter/rspamd/rspamd-3.10.0.ebuild
+++ b/mail-filter/rspamd/rspamd-3.10.0-r1.ebuild
@@ -75,6 +75,9 @@ PATCHES=(
# backward compatibility with <dev-libs/libfmt-11
"${FILESDIR}/${PN}-3.9.0-older-libfmt.patch"
+
+ # see https://github.com/rspamd/rspamd/issues/5163
+ "${FILESDIR}/${P}-libucl-type.patch"
)
src_prepare() {
next reply other threads:[~2024-10-02 17:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 17:44 Petr Vaněk [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-13 20:43 [gentoo-commits] repo/gentoo:master commit in: mail-filter/rspamd/, mail-filter/rspamd/files/ Petr Vaněk
2024-03-13 17:32 Petr Vaněk
2023-12-03 22:01 Petr Vaněk
2023-08-07 17:22 Sam James
2023-08-07 5:43 Sam James
2022-11-15 0:56 Sam James
2022-11-06 6:17 Sam James
2022-04-12 8:20 Sam James
2021-09-07 20:25 Sam James
2021-09-07 20:25 Sam James
2021-08-22 2:50 Sam James
2020-10-08 19:41 Sam James
2020-04-04 8:06 Joonas Niilola
2020-02-24 5:55 Joonas Niilola
2019-12-14 8:41 Joonas Niilola
2019-11-04 11:22 Dirkjan Ochtman
2018-03-11 14:07 Dirkjan Ochtman
2017-06-13 19:52 Dirkjan Ochtman
2016-09-10 14:56 Dirkjan Ochtman
2016-04-26 19:33 Dirkjan Ochtman
2016-01-13 16:30 Dirkjan Ochtman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1727891031.a420be1dffb7d144cda2161519165a47d1c22d45.arkamar@gentoo \
--to=arkamar@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox