aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Bellamy <dunk@denkimushi.com>2021-11-07 14:04:13 +0000
committerMilan P. Stanić <mps@arvanta.net>2021-11-28 11:19:35 +0000
commit03874744d630b61405479a0fbd31a19283a156b5 (patch)
treecc9281ea6244a6f31d9e69bab59870578da7e798
parent663fa3d7addccdb78a441147df41bfb0a236f1ba (diff)
downloadaports-03874744d630b61405479a0fbd31a19283a156b5.tar.gz
aports-03874744d630b61405479a0fbd31a19283a156b5.tar.bz2
aports-03874744d630b61405479a0fbd31a19283a156b5.tar.xz
community/rspamd: add upstream i386 patch
* enable complete test for i386 * take over Maintainer
-rw-r--r--community/rspamd/APKBUILD15
-rw-r--r--community/rspamd/i386-3.patch22
-rw-r--r--community/rspamd/i386-upstream.patch50
-rw-r--r--community/rspamd/i386.patch45
-rw-r--r--community/rspamd/revert.patch13
5 files changed, 126 insertions, 19 deletions
diff --git a/community/rspamd/APKBUILD b/community/rspamd/APKBUILD
index 1403c36c25..befac4eff6 100644
--- a/community/rspamd/APKBUILD
+++ b/community/rspamd/APKBUILD
@@ -1,12 +1,12 @@
-# Maintainer: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Nathan Angelacos <nangel@alpinelinux.org>
# Contributor: TBK <alpine@jjtc.eu>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
+# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=rspamd
pkgver=3.1
-pkgrel=0
+pkgrel=1
pkgdesc="Fast, free and open-source spam filtering system"
url="https://rspamd.com/"
# riscv64 blocked by luajit
@@ -51,7 +51,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/rspamd/rspamd/archive/$pkgve
30-conf-split-workers.patch
20-default-configs.patch
10-control_socket.patch
- revert.patch
+ i386.patch
+ i386-upstream.patch
+ i386-3.patch
"
case "$CARCH" in
@@ -89,9 +91,8 @@ build() {
check() {
cd build
case "$CARCH" in
- x86_64|x86|s390x|armv7)
+ x86_64|s390x|armv7)
# x86_64 has illegal instruction on builder
- # x86 dumps core after hyperscan check
# s390x has require nil value error
# armv7 has bus error
./test/rspamd-test-cxx ;;
@@ -189,5 +190,7 @@ a2003ef0c9d64a44480f59302864a2dfedcbe3a0047fcbb655408bc8aae9014b6ad0ddc6b64d4abe
a8aefee649bf6630339d1d3f2bb20c25ca70b21a8eaa92951e926d0fd4525f1d4ac4cc7ea66ac2b15323cf02c93c759ddf7181502f0d71b21384ced9d88c008e 30-conf-split-workers.patch
8801e3af59886847c25c87ca2f231cd9ededf35f376f9920967e72696fb017b1a4312f3a49017b52f65556bfe5c9f74a80405643afa32bb2906c38d39c5e1818 20-default-configs.patch
6f828601ce460f2fd3b1c430974b719e36b0aa5600bd7074683fd646d99a4e76da35840b54c50416a9ae6d87babe39c5d463fc2ec05814e164a96d16f5da18b7 10-control_socket.patch
-5eb5e07626bfab577e51e1c36b04cd24aae82879b803263e8e43d5ad5aa52cf1fc33133ea2ee47c1786615b550799906b6573c75a76c07d9fcb0632a52b178a5 revert.patch
+18e41a5f2a31f2041d2748aac6d0c825f4db98bb308a35a4bdf69f77a12a372b35dedd4c5c25b7e79c2031664f06fc66b0d127baf924027976ad5c520067fc61 i386.patch
+881c762cbc5992937fc8423af701f947a99a134b18a1adf6b8c525dc4f5c661c61c0c01e0fb0da5a793e19b4bffe6b085d929b928e7f88317604dbfdd136dcc2 i386-upstream.patch
+b5b8b5bad2f9ed93d4789d9f8f46dd4cb87eb142b7fb9fbdd0fb679c8fba30d7d370dc6da03a0bd64adcd73d0576218df00e5697e53d528db544566af414a3e7 i386-3.patch
"
diff --git a/community/rspamd/i386-3.patch b/community/rspamd/i386-3.patch
new file mode 100644
index 0000000000..11bcc11d5a
--- /dev/null
+++ b/community/rspamd/i386-3.patch
@@ -0,0 +1,22 @@
+merged as: https://github.com/rspamd/rspamd/commit/9766a457eb860b2eeb5e3e37ff86e82e89fe8c8d
+
+--- a/src/libcryptobox/cryptobox.c
++++ b/src/libcryptobox/cryptobox.c
+@@ -118,7 +118,7 @@
+ }
+
+ switch (instr) {
+-#ifdef HAVE_SSE2
++#if defined HAVE_SSE2 && defined (__x86_64__)
+ case CPUID_SSE2:
+ __asm__ volatile ("psubb %xmm0, %xmm0");
+ break;
+@@ -146,7 +146,7 @@
+ __asm__ volatile ("pcmpeqq %xmm0, %xmm0");
+ break;
+ #endif
+-#ifdef HAVE_SSE42
++#if defined HAVE_SSE42 && defined(__x86_64__)
+ case CPUID_SSE42:
+ __asm__ volatile ("pushq %rax\n"
+ "xorq %rax, %rax\n"
diff --git a/community/rspamd/i386-upstream.patch b/community/rspamd/i386-upstream.patch
new file mode 100644
index 0000000000..2d41ecc1a2
--- /dev/null
+++ b/community/rspamd/i386-upstream.patch
@@ -0,0 +1,50 @@
+From eee7acb309bae98e17c19b53bbd72cc9b798c281 Mon Sep 17 00:00:00 2001
+From: Vsevolod Stakhov <vsevolod@highsecure.ru>
+Date: Mon, 8 Nov 2021 08:41:26 +0000
+Subject: [PATCH] [Minor] Limit x86_64 assembly to x86_64
+
+Issue: #3967
+---
+ src/libcryptobox/chacha20/chacha.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/libcryptobox/chacha20/chacha.c b/src/libcryptobox/chacha20/chacha.c
+index e4543d3b81..653c614d99 100644
+--- a/src/libcryptobox/chacha20/chacha.c
++++ b/src/libcryptobox/chacha20/chacha.c
+@@ -52,15 +52,15 @@ typedef struct chacha_impl_t {
+ #define CHACHA_IMPL(cpuflags, desc, ext) \
+ {(cpuflags), desc, chacha_##ext, xchacha_##ext, chacha_blocks_##ext, hchacha_##ext}
+
+-#if defined(HAVE_AVX2)
++#if defined(HAVE_AVX2) && defined(__x86_64__)
+ CHACHA_DECLARE(avx2)
+ #define CHACHA_AVX2 CHACHA_IMPL(CPUID_AVX2, "avx2", avx2)
+ #endif
+-#if defined(HAVE_AVX)
++#if defined(HAVE_AVX) && defined(__x86_64__)
+ CHACHA_DECLARE(avx)
+ #define CHACHA_AVX CHACHA_IMPL(CPUID_AVX, "avx", avx)
+ #endif
+-#if defined(HAVE_SSE2)
++#if defined(HAVE_SSE2) && defined(__x86_64__)
+ CHACHA_DECLARE(sse2)
+ #define CHACHA_SSE2 CHACHA_IMPL(CPUID_SSE2, "sse2", sse2)
+ #endif
+@@ -70,13 +70,13 @@ CHACHA_DECLARE(ref)
+
+ static const chacha_impl_t chacha_list[] = {
+ CHACHA_GENERIC,
+-#if defined(CHACHA_AVX2)
++#if defined(CHACHA_AVX2) && defined(__x86_64__)
+ CHACHA_AVX2,
+ #endif
+-#if defined(CHACHA_AVX)
++#if defined(CHACHA_AVX) && defined(__x86_64__)
+ CHACHA_AVX,
+ #endif
+-#if defined(CHACHA_SSE2)
++#if defined(CHACHA_SSE2) && defined(__x86_64__)
+ CHACHA_SSE2
+ #endif
+ };
diff --git a/community/rspamd/i386.patch b/community/rspamd/i386.patch
new file mode 100644
index 0000000000..0d60aaac00
--- /dev/null
+++ b/community/rspamd/i386.patch
@@ -0,0 +1,45 @@
+From f6dc828c3d8c015779eea7fb662198c6d58def14 Mon Sep 17 00:00:00 2001
+From: Vsevolod Stakhov <vsevolod@highsecure.ru>
+Date: Sat, 6 Nov 2021 12:16:28 +0000
+Subject: [PATCH] [Fix] Restrict x86_64 assembly to x86_64
+
+Issue: #3934
+---
+ src/libcryptobox/CMakeLists.txt | 19 +++++++++++++------
+ 1 file changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/src/libcryptobox/CMakeLists.txt b/src/libcryptobox/CMakeLists.txt
+index 272701b535..a7f86650c2 100644
+--- a/src/libcryptobox/CMakeLists.txt
++++ b/src/libcryptobox/CMakeLists.txt
+@@ -5,17 +5,24 @@ SET(BASE64SRC ${CMAKE_CURRENT_SOURCE_DIR}/base64/ref.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/base64/base64.c)
+
+ IF(HAVE_AVX2)
+- SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx2.S)
++ IF ("${ARCH}" STREQUAL "x86_64")
++ SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx2.S)
++ MESSAGE(STATUS "Cryptobox: AVX2 support is added (chacha20)")
++ ENDIF()
+ SET(BASE64SRC ${BASE64SRC} ${CMAKE_CURRENT_SOURCE_DIR}/base64/avx2.c)
+- MESSAGE(STATUS "Cryptobox: AVX2 support is added (chacha20, avx2)")
++ MESSAGE(STATUS "Cryptobox: AVX2 support is added (base64)")
+ ENDIF(HAVE_AVX2)
+ IF(HAVE_AVX)
+- SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx.S)
+- MESSAGE(STATUS "Cryptobox: AVX support is added (chacha20)")
++ IF ("${ARCH}" STREQUAL "x86_64")
++ SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/avx.S)
++ MESSAGE(STATUS "Cryptobox: AVX support is added (chacha20)")
++ ENDIF()
+ ENDIF(HAVE_AVX)
+ IF(HAVE_SSE2)
+- SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/sse2.S)
+- MESSAGE(STATUS "Cryptobox: SSE2 support is added (chacha20)")
++ IF ("${ARCH}" STREQUAL "x86_64")
++ SET(CHACHASRC ${CHACHASRC} ${CMAKE_CURRENT_SOURCE_DIR}/chacha20/sse2.S)
++ MESSAGE(STATUS "Cryptobox: SSE2 support is added (chacha20)")
++ ENDIF()
+ ENDIF(HAVE_SSE2)
+ IF(HAVE_SSE42)
+ SET(BASE64SRC ${BASE64SRC} ${CMAKE_CURRENT_SOURCE_DIR}/base64/sse42.c)
diff --git a/community/rspamd/revert.patch b/community/rspamd/revert.patch
deleted file mode 100644
index 576335c519..0000000000
--- a/community/rspamd/revert.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-revert commit https://github.com/rspamd/rspamd/commit/0d12bff1becdc78bbeacb61643eb9b722b6d394e
-
---- a/cmake/ArchDep.cmake
-+++ b/cmake/ArchDep.cmake
-@@ -17,7 +17,7 @@
- ASM_OP(HAVE_DOLLARMACRO "dollar macro convention")
-
- # For now we support only x86_64/i386 architecture with optimizations
--IF("${ARCH}" STREQUAL "x86_64" OR "${ARCH}" STREQUAL "i386")
-+IF("${ARCH}" STREQUAL "x86_64")
- IF(NOT HAVE_SLASHMACRO AND NOT HAVE_DOLLARMACRO)
- MESSAGE(FATAL_ERROR "Your assembler cannot compile macros, please check your CMakeFiles/CMakeError.log")
- ENDIF()