From 060cb7f74d40ba7aed9374a212bbc73fc17af387252cfb614105c267c2ef9284 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 2 Oct 2024 11:13:41 +0000 Subject: [PATCH] - Actually for all distros to use luajit and lua 5.1 ABI modules for the additional modules - for non luajit enabled distros we also use lua 5.1 to build against as rspamd does not really support newer lua APIs https://github.com/rspamd/rspamd/issues/5163 OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=124 --- rspamd.changes | 10 ++++++++++ rspamd.spec | 20 +++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/rspamd.changes b/rspamd.changes index 3e2fc17..37fc754 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Oct 2 11:11:02 UTC 2024 - Marcus Rueckert + +- Actually for all distros to use luajit and lua 5.1 ABI modules + for the additional modules +- for non luajit enabled distros we also use lua 5.1 to build + against as rspamd does not really support newer lua APIs + + https://github.com/rspamd/rspamd/issues/5163 + ------------------------------------------------------------------- Wed Oct 2 10:28:56 UTC 2024 - Marcus Rueckert diff --git a/rspamd.spec b/rspamd.spec index 869cff5..aae2149 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -26,15 +26,15 @@ %bcond_with systemd %endif -%if 0%{?suse_version} == 1500 -%global lua_version 53 -%endif +%global lua_abi_version 51 %ifarch %{ix86} x86_64 %if 0%{?suse_version} > 1500 %bcond_without hyperscan %endif - %if (0%{?suse_version} >= 1315) + %if 0%{?suse_version} >= 1500 + %bcond_without luajit + %else %bcond_with luajit %endif %endif @@ -92,8 +92,10 @@ BuildRequires: libicu-devel %if %{with luajit} BuildRequires: luajit-devel %else -BuildRequires: lua%{?lua_version}-devel +BuildRequires: lua%{?lua_abi_version}-devel %endif +BuildRequires: lua%{?lua_abi_version}-lpeg +Requires: lua%{?lua_abi_version}-lpeg %if %{with openblas} BuildRequires: openblas-devel %endif @@ -121,12 +123,10 @@ BuildRequires: pkgconfig(systemd) %{?systemd_ordering} %endif BuildRequires: lapack-devel -BuildRequires: lua%{?lua_version}-lpeg BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(libxxhash) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(openblas) -Requires: lua%{?lua_version}-lpeg %if 0%{?with split_out_client} Requires: rspamd-client = %{version} %else @@ -173,6 +173,12 @@ This package holds the client tools (rspamc and rspamadm) %autosetup -p1 %build +%if %{with luajit} +if ! [ "%{lua_abi_version}" = "$(pkg-config --variable=abiver luajit | tr -d '.')" ] ; then + echo "the lua_abi_version define and the abi version of luajit do not match. please investigate. exiting." + exit 1 +fi +%endif %if 0%{?force_gcc_version} export CC="gcc-%{?force_gcc_version}" export CXX="g++-%{?force_gcc_version}"