diff options
Diffstat (limited to 'mail-filter/rspamd')
-rw-r--r-- | mail-filter/rspamd/Manifest | 3 | ||||
-rw-r--r-- | mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch | 28 | ||||
-rw-r--r-- | mail-filter/rspamd/rspamd-3.4-r1.ebuild (renamed from mail-filter/rspamd/rspamd-3.4.ebuild) | 13 |
3 files changed, 43 insertions, 1 deletions
diff --git a/mail-filter/rspamd/Manifest b/mail-filter/rspamd/Manifest index 99f51d188c37..7e8107e9c36c 100644 --- a/mail-filter/rspamd/Manifest +++ b/mail-filter/rspamd/Manifest @@ -5,6 +5,7 @@ AUX rspamd-2.7-unbundle-zstd.patch 4047 BLAKE2B 2a93a17980915a5dc12e20f89922d2e5 AUX rspamd-3.0-cmake-lua-version.patch 1444 BLAKE2B b44ada90d1d4d59f000ab75a5d28545902235c85ccab3408eefb8f034bec0c86f6a62678cc5632c7db61b19e7cc1afff2b92a8f1493c64fbe831b3eca3836322 SHA512 f382af60698dd23e69469d6dfaf3c18cef0f413b22918725aec5dd09ee3f8c339d3a6ce92f46ebca89690ce57cab3295ab3093b502af7bce4ce5576c7fd3de9a AUX rspamd-3.2-unbundle-lua.patch 1749 BLAKE2B 5cab7403c2a2db85e224fddb5ce13196e10eb0a1abb4bed85a7112b8864f9635e04ba763783811a337d6d9bd87ce68250c9201c0339bb596f95f322efaa6e733 SHA512 649a02af6682e1e76f4be677d61a93d5c78997bda6fd13982791744747c185f53d7a4261b24222bc0dd626319da0632828a590806ec7b305595297164e89407a AUX rspamd-3.3-remove-test-case.patch 1090 BLAKE2B 5bdd567f1a4edbea2a610ce0998ab1cae6647af4a3af36bdd1c90b6275407b8cf782089c9661ba8957d43dd31a9880cfd8b205fccac67d2121401ea9c7b2db1f SHA512 ad947b1f33b5de4d83d0ee1fbbbd51139d759e5758f9354dc45a604575764ecc0e08b362586b4bfa8ec35555cf5f622d7898e5be780f7b4efdbc3f38ced3a669 +AUX rspamd-3.4-hyperscan-page-alignment.patch 1016 BLAKE2B af100fe97df89624606d4f6cdb0d48bab922056c61a150f1b41ec955dea2f38e18a877cd0958f0e4db3ed51055d86ed18f197f0c471376cf0418bb67b18864c8 SHA512 d77f8513ff65c694ea729931eacc770faf65495e8eab9a4e326ae9ddb0a9fa3556145d2d280007d58408a44bc47ca3629627be6d5dd1ba45f27cda74deeda454 AUX rspamd-r1.logrotate 305 BLAKE2B 58e816e54fd0a7e977dd2f6dcf97617c188888ffea66769ef60ce799f980e2814221734fee7b47c93790a5bbfecbb2f315f93c84bec9dd29b0f80c15e1b9e349 SHA512 0515d31a890058194106d9b8960d77909914986e73619dede751be2efb9592a41f90f15599310b5d6d027c3a203df412c8379ade7df09ecdfd4dcf43bfff4fa7 AUX rspamd-r7.init 1357 BLAKE2B 90227e0980397a256e6136cac4a4a4d143130d82a211bfd4894d5f8deb85113e0b219e6453257d548ec3d80de24241e6ecfc2b0a4178cb344c8c6549d96e549b SHA512 89a079d32b7d8c5a037c7bb2ab6825624ce89ea4b25893bcf6f49befc0c7b924b51d48b30bf61c4b3ea5bc3ccbaba16664c7df52236debda0bdb58f1adf8867a AUX rspamd.conf 908 BLAKE2B 9d8c310c00990f47012e9d1710fbb7567ae5b0e92a411d3fb2696bfb32b70c31ceeaded873f06c759a471d534fb872656907e73ee095150fae384de4df6e9946 SHA512 753011de167af9261cc67676357aadf34d0b160d343a20d5efe8b3389e8a604775b7a6abbaad3174acae7df5579b52b4ba8a0a714419084befedfa96a3a8a9b1 @@ -14,6 +15,6 @@ DIST rspamd-3.3.tar.gz 5680874 BLAKE2B 2fbafabc0a59ca4ad1bbdc1b7ceb5b5bc281dc75d DIST rspamd-3.4.tar.gz 5689732 BLAKE2B 8d1b98205f51cfe834db3ed53b8be72ada834980380cba06c4470689d16ef4a6396190ae27044ae76a7b35df6afd3cdf551f9469d878ac69ec61ef6b86b46104 SHA512 fec8cb7b845bf25d02f1c32c82bf35ad9c65f3301a73f3ea611b6fcfa0ac1b75f75561c4c42f142f876ac3a78f96fd91d22d30c5b3600e4001e25f06bc693ccf EBUILD rspamd-2.7-r104.ebuild 2714 BLAKE2B 66f8af6dc6c41333c6adfc7109d18fb4afe3add890c7599488f411d7605ce88ae401a5d9460dd0c4fd732ccfcc8409ea38fb1ff05f666dafb2846d7dc043316c SHA512 3f90efea931ce5c42ceda477879124803ab6c07b8633480ec27c12869cc8645804b262b7a44db540cafb2f6045a44eeda58cfd994645ddc9739474339ca29f70 EBUILD rspamd-3.3.ebuild 3009 BLAKE2B 21d6b71e76aef770ad6220ae6dc149d7e8bed968d4d76d4a0ebbde8dfaa2de09a758dfe97272a0ec03b28aaaeebb8472609696f1fa308d788d210a664d5929ed SHA512 af382fa55eaa3078d4fedd7ed5cbc655d914591bdceb49362bce90462448b0c2528d496f813e23ce65631e3af1e84c9f9fc5510ee71edc31608d28d142e9e9b0 -EBUILD rspamd-3.4.ebuild 3007 BLAKE2B 8e4aed3dfafba9f01073c1c7631efcf48c0befaaf9eaca024515420087371964996bc71230e5132f0a302480584146ce95a4494eeb4ddeef38fd35a50dd43b18 SHA512 09d554e3c11f26a6fc496f4308f129889aa2d0d3b0dda9a0f7dcca68753d258029d1e0be8b3947c2d287a513bd68d4a15004333ad713787f127f24f60e00d1a4 +EBUILD rspamd-3.4-r1.ebuild 3584 BLAKE2B 1ccb37da419ca55a1f5ba7937ad15467a5465620e96d8a68e6f84e43735dfc98fc1c2cb8705f14f9952003dc33902bb60d9b47b244b9cc7b7fabc2e8db374228 SHA512 e7d24ab648d04fda1e051c8d08bbb499f1902e418e9a746dc2317fd1b39ddbb5637a19a468878bfa636507a0cbc9e813fba10eac105bc8990f5e77aa059082ad EBUILD rspamd-9999.ebuild 2962 BLAKE2B 1ce9fae978e5ddafa8f887f5499585fba244774af96391639ce46b039bfbcc0cc409d8bc29acf1757d3a11b34d07d67e8498b6b8d5b540ca215142fb2549bdbe SHA512 d8c65eeb8f5be736249b2f7fbd573f669ad1a66ae95a5324de7d952086d3d17d9fb1b9c68630c37e28b8fd4cb508dfc12a0e24f2461904614c3fff46083bd37f MISC metadata.xml 617 BLAKE2B ba8fa4a2dd3e0ae82670c7573d59efea267cb2daf3f2332d3c66d97ce8a96b2e1385af688ed9ebb734698fe3439adbc707dc1ab6be80e3651feb5fe07ed0ace5 SHA512 c3b55719e48afcb581eb9ff9bfcde69cb72cfab4341624fefb5e15d68424099d9b4834cc2979391d8681ed081ec1b2aa1eb764e11a9a635960abeedf98ba52dc diff --git a/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch b/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch new file mode 100644 index 000000000000..913f1f7ecd4d --- /dev/null +++ b/mail-filter/rspamd/files/rspamd-3.4-hyperscan-page-alignment.patch @@ -0,0 +1,28 @@ +Fix for hyperscan page alignment issues. + +Upstream-Issue: https://github.com/rspamd/rspamd/issues/4329 + +diff --git a/src/libserver/hyperscan_tools.cxx b/src/libserver/hyperscan_tools.cxx +index 6187208a9..96366067d 100644 +--- a/src/libserver/hyperscan_tools.cxx ++++ b/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 }); + } +-- +2.37.4 + diff --git a/mail-filter/rspamd/rspamd-3.4.ebuild b/mail-filter/rspamd/rspamd-3.4-r1.ebuild index cb1d4e71df63..fc1664f05a6d 100644 --- a/mail-filter/rspamd/rspamd-3.4.ebuild +++ b/mail-filter/rspamd/rspamd-3.4-r1.ebuild @@ -71,6 +71,7 @@ PATCHES=( "${FILESDIR}/${PN}-3.2-unbundle-lua.patch" "${FILESDIR}/${PN}-2.5-unbundle-snowball.patch" "${FILESDIR}/${PN}-3.3-remove-test-case.patch" + "${FILESDIR}/${PN}-3.4-hyperscan-page-alignment.patch" ) src_prepare() { @@ -133,4 +134,16 @@ src_install() { pkg_postinst() { tmpfiles_process "${PN}.conf" + + for ver in ${REPLACING_VERSIONS}; do + if ver_test "${ver}" -eq "3.4"; then + elog "rspamd-3.4 is known to segfault when it is updated from older version due" + elog "to a page-alignment of hyperscan .unser files. The issue is patched in this" + elog "ebuild revision rspamd-3.4-r1. All possibly broken .unser files will be" + elog "automaticaly removed. See https://github.com/rspamd/rspamd/issues/4329 for" + elog "more information." + + find "${EROOT}/var/lib/rspamd" -type f -name '*.unser' -delete + fi + done } |