From 11955792cb54232422b5f7ece15297ea4a848eee446d2070b3718b4867cc7a11 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Mon, 30 Sep 2024 20:36:01 +0000 Subject: [PATCH 1/5] - Update to 3.10.0 - fix building the binaries with PIE OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=120 --- rspamd-3.10.0.tar.gz | 3 ++ rspamd.changes | 73 ++++++++++++++++++++++++++++++++++++++++++++ rspamd.spec | 10 +++--- 3 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 rspamd-3.10.0.tar.gz diff --git a/rspamd-3.10.0.tar.gz b/rspamd-3.10.0.tar.gz new file mode 100644 index 0000000..cd34bff --- /dev/null +++ b/rspamd-3.10.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:528d7f8e2e6263378d043a41c4b1c5dbf1b3e54f3085619f68b04e283efa4a69 +size 6008518 diff --git a/rspamd.changes b/rspamd.changes index 57ccc19..4ab45a0 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,76 @@ +------------------------------------------------------------------- +Mon Sep 30 20:05:56 UTC 2024 - Marcus Rueckert + +- fix building the binaries with PIE + +------------------------------------------------------------------- +Mon Sep 30 19:40:24 UTC 2024 - Marcus Rueckert + +- Update to 3.10.0 + - [FIX] Arc regex to no longer match on dmarc= by + @JasonStephenson in #4960 + - [Conf] Add SenderScore RPBL return codes by @moisseev in #5077 + - Add name in statistic.conf by @dragoangel in #5079 + - [Minor] Improve errors reporting for lua_redis by @vstakhov in + #5086 + - [Feature] Allow to set negative group score limit via min_score + by @vstakhov in #5084 + - [Fix] Fix Redis scripts uploading when Redis is not ready by + @vstakhov in #5091 + - [Conf] Add SenderScore Reputationlist RBL by @moisseev in #5088 + - [Test] Add tests for milter_headers by @fatalbanana in #5083 + - [Project] Allow to change log tag from HTTP request by + @vstakhov in #5092 + - [Rework] Resolve rdns in a separate function by @vstakhov in + #5093 + - [Dep] Update doctest to 2.4.11 by @vstakhov in #5094 + - Pull Request for OpenSSL 3.0 support by @left-try in #5072 + - Remove NIST mode from cryptobox by @vstakhov in #5099 + - Fix keypairs encryption/decryption by @vstakhov in #5100 + - [Project] Allow manipulations with opaque UCL objects by + @vstakhov in #5104 + - Provide OpenSSL 3.0 support for lua_rsa by @left-try in #5101 + - Fix issue with broken HTTP message to learn endpoints by + @vstakhov in #5106 + - [Test] Improve grow_factor tests by @fatalbanana in #5110 + - Set expiration for history_redis to 5 days by default by + @dragoangel in #5115 + - Fix for issue #5089 - learning of the empty tasks by @vstakhov + in #5118 + - Update URIBL_RED/GREY scores by @slavkoja in #5119 + - [Fix] Preserve the previous behaviour of RDNS_* checks by + @vstakhov in #5121 + - [Test] Improve startup error handling by @fatalbanana in #5114 + - [Fix] Unify lua symbols registration by @vstakhov in #5125 + - [PATCH] ICAP: encode constructed path to be URL safe. by + @oliyks in #5111 + - [Rework] Change the logic of skipping symbols by @vstakhov in + #5126 + - Draft pull request for issue #5095 by @left-try in #5116 + - Rework fuzzy symbols by @vstakhov in #5127 + - [Fix] Another fix for Redis schema by @vstakhov in #5129 + - [Feature] Allow differen modes for fuzzy rules by @vstakhov in + #5131 + - Implement individual limits for fuzzy keys by @vstakhov in + #5135 + - [Fix] Rework DMARC grammar to correctly handle spaces in values + by @spacefreak86 in #5139 + - [Test] Upgrade linters by @moisseev in #5133 + - [Feature] DMARC: Implement reporting.only_domains setting by + @fatalbanana in #5142 + - Draft pull request for PR#5116 by @left-try in #5132 + - Detect CPU using __builtin_cpu_supports where it's possible by + @vstakhov in #5140 + - [Rework] Allow more flexible keypair encoding by @vstakhov in + #5144 + - Add more build targets by @vstakhov in #5153 + - Fixes for OpenSSL by @vstakhov in #5154 + - [Fix] Iterate over dynamic keys in fuzzy storage by @vstakhov + in #5156 + - [Rework] Remove control block support by @vstakhov in #5160 + - MIME UTF8 support by @vstakhov in #5056 + - [Fix] Fix DCC rep handling by @vstakhov in #5161 + ------------------------------------------------------------------- Sun Sep 29 23:24:57 UTC 2024 - Marcus Rueckert diff --git a/rspamd.spec b/rspamd.spec index 516ad7d..0c7540c 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -56,7 +56,7 @@ %endif Name: rspamd -Version: 3.9.1 +Version: 3.10.0 Release: 0 Summary: Spam filtering system License: Apache-2.0 @@ -189,9 +189,7 @@ export CXX="g++-%{?force_gcc_version}" %if 0%{suse_version} == 1315 -DCMAKE_USER_MAKE_RULES_OVERRIDE="" \ %endif - -DCMAKE_EXE_LINKER_FLAGS:STRING='' \ - -DCMAKE_MODULE_LINKER_FLAGS:STRING='' \ - -DCMAKE_SHARED_LINKER_FLAGS:STRING='' \ + -DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now -pie" \ -DRSPAMD_LIBDIR=%{_libdir}/rspamd \ -DCONFDIR=%{_sysconfdir}/rspamd \ -DMANDIR=%{_mandir} \ @@ -304,7 +302,7 @@ find /var/lib/rspamd/ -type f -name '*.unser' -delete -print ||: %service_add_pre %{name}.service %post -#systemd-tmpfiles --create /usr/lib/tmpfiles.d/%{name}.conf ||: +#systemd-tmpfiles --create /usr/lib/tmpfiles.d/%%{name}.conf ||: %service_add_post %{name}.service %endif @@ -617,11 +615,13 @@ find /var/lib/rspamd/ -type f -name '*.unser' -delete -print ||: %{_datadir}/rspamd/lualib/rspamadm/neural_test.lua %{_datadir}/rspamd/lualib/rspamadm/dkim_keygen.lua %{_datadir}/rspamd/lualib/rspamadm/fuzzy_ping.lua +%{_datadir}/rspamd/lualib/rspamadm/secretbox.lua %dir %{_datadir}/rspamd/lualib/plugins %{_datadir}/rspamd/lualib/plugins/dmarc.lua %{_datadir}/rspamd/lualib/plugins/neural.lua %{_datadir}/rspamd/lualib/plugins/rbl.lua +%{_datadir}/rspamd/lualib/plugins/ratelimit.lua %dir %{_datadir}/rspamd/lualib/redis_scripts/ %{_datadir}/rspamd/lualib/redis_scripts/neural_maybe_invalidate.lua From 167b6c329e3480d4cf4806b2c0c9c3258558a29f42c86b398571552daf934e4a Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 2 Oct 2024 09:52:08 +0000 Subject: [PATCH 2/5] cleanup OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=121 --- rspamd-3.9.1.tar.gz | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 rspamd-3.9.1.tar.gz diff --git a/rspamd-3.9.1.tar.gz b/rspamd-3.9.1.tar.gz deleted file mode 100644 index c3027ca..0000000 --- a/rspamd-3.9.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c0e714389586b39def4fb809b0bff6436a1d605394ea3a591faff6e98b1ac2f -size 5980094 From 27b83fd8cd440b4bd5efa5a167a6a7f9108e41864034fedb762e1735f656c077 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 2 Oct 2024 10:25:07 +0000 Subject: [PATCH 3/5] - Simplify lua handling OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=122 --- rspamd.changes | 5 +++++ rspamd.spec | 18 +++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/rspamd.changes b/rspamd.changes index 4ab45a0..717ec6a 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 2 09:59:49 UTC 2024 - Marcus Rueckert + +- Simplify lua handling + ------------------------------------------------------------------- Mon Sep 30 20:05:56 UTC 2024 - Marcus Rueckert diff --git a/rspamd.spec b/rspamd.spec index 0c7540c..c3002ce 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -26,12 +26,16 @@ %bcond_with systemd %endif +%if 0%{?suse_version} == 1500 +%global lua_version 53 +%endif + %ifarch %{ix86} x86_64 %if 0%{?suse_version} > 1500 %bcond_without hyperscan %endif %if (0%{?suse_version} >= 1315) - %bcond_with luajit + %bcond_with luajit %endif %endif @@ -88,7 +92,7 @@ BuildRequires: libicu-devel %if %{with luajit} BuildRequires: luajit-devel %else -BuildRequires: lua-devel +BuildRequires: lua%{?lua_version}-devel %endif %if %{with openblas} BuildRequires: openblas-devel @@ -121,15 +125,7 @@ BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(libxxhash) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(openblas) -%if 0%{?suse_version} >= 1550 -Requires: lua54-lpeg -%else -%if 0%{?suse_version} >= 1500 -Requires: lua53-lpeg -%else -Requires: lua51-LPeg -%endif -%endif +Requires: lua%{?lua_version}-lpeg %if 0%{?with split_out_client} Requires: rspamd-client = %{version} %else From 57b25ebcd6590c1ef3a710e0499bd2c9790edc41c08d65ec854da893de372bd9 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 2 Oct 2024 10:32:46 +0000 Subject: [PATCH 4/5] - restore the overriden CMAKE_SHARED_LINKER_FLAGS but only remove the --undefined option as rspamd doesnt have its dependencies between parts of the code correct OBS-URL: https://build.opensuse.org/package/show/server:mail/rspamd?expand=0&rev=123 --- rspamd.changes | 7 +++++++ rspamd.spec | 2 ++ 2 files changed, 9 insertions(+) diff --git a/rspamd.changes b/rspamd.changes index 717ec6a..3e2fc17 100644 --- a/rspamd.changes +++ b/rspamd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 2 10:28:56 UTC 2024 - Marcus Rueckert + +- restore the overriden CMAKE_SHARED_LINKER_FLAGS but only remove + the --undefined option as rspamd doesnt have its dependencies + between parts of the code correct + ------------------------------------------------------------------- Wed Oct 2 09:59:49 UTC 2024 - Marcus Rueckert diff --git a/rspamd.spec b/rspamd.spec index c3002ce..869cff5 100644 --- a/rspamd.spec +++ b/rspamd.spec @@ -121,6 +121,7 @@ BuildRequires: pkgconfig(systemd) %{?systemd_ordering} %endif BuildRequires: lapack-devel +BuildRequires: lua%{?lua_version}-lpeg BuildRequires: pkgconfig(libunwind) BuildRequires: pkgconfig(libxxhash) BuildRequires: pkgconfig(libzstd) @@ -185,6 +186,7 @@ export CXX="g++-%{?force_gcc_version}" %if 0%{suse_version} == 1315 -DCMAKE_USER_MAKE_RULES_OVERRIDE="" \ %endif + -DCMAKE_SHARED_LINKER_FLAGS='-flto=auto -Wl,--as-needed -Wl,-z,now' \ -DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now -pie" \ -DRSPAMD_LIBDIR=%{_libdir}/rspamd \ -DCONFDIR=%{_sysconfdir}/rspamd \ From 060cb7f74d40ba7aed9374a212bbc73fc17af387252cfb614105c267c2ef9284 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Wed, 2 Oct 2024 11:13:41 +0000 Subject: [PATCH 5/5] - 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}"