Compare commits

..

No commits in common. "16585a6d23eb8b2c2c5af50ee5d78669c2ebe611" and "d6df1b00a4cdc2ba1241bffdd01d5b31819c1962" have entirely different histories.

6 changed files with 10585 additions and 180 deletions

View File

@ -0,0 +1,25 @@
From f92e690190b51eb6bada384174887501f4c3f43f Mon Sep 17 00:00:00 2001
From: wang_yue111 <648774160@qq.com>
Date: Sat, 24 Jul 2021 10:21:03 +0800
Subject: [PATCH] fix build error on X86
---
cmake/build_wrapper.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/build_wrapper.sh b/cmake/build_wrapper.sh
index 1962813..895610c 100755
--- a/cmake/build_wrapper.sh
+++ b/cmake/build_wrapper.sh
@@ -17,7 +17,7 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXXX)
LIBC_SO=$("$@" --print-file-name=libc.so.6)
cp ${KEEPSYMS_IN} ${KEEPSYMS}
# get all symbols from libc and turn them into patterns
-nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ ]*\).*/^\1$/' >> ${KEEPSYMS}
+nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS}
# build the object
"$@"
# rename the symbols in the object
--
2.23.0

View File

@ -1,37 +0,0 @@
From f6f765b3c022cbf01c86dac7f9875cf18e9f9980 Mon Sep 17 00:00:00 2001
From: sdlzx <hdu_sdlzx@163.com>
Date: Wed, 6 Oct 2021 10:25:36 +0800
Subject: [PATCH] Fix hyperscan build error
The command "gcc -Q --help=target" outputs nothing during obs build,
so we manually set "GNUCC_ARCH" to "native" to avoid string manipulation errors.
Signed-off-by: sdlzx <hdu_sdlzx@163.com>
---
CMakeLists.txt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5f8fb4..5cf41ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -197,9 +197,13 @@ else()
execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS}
OUTPUT_VARIABLE _GCC_OUTPUT)
string(FIND "${_GCC_OUTPUT}" "march" POS)
- string(SUBSTRING "${_GCC_OUTPUT}" ${POS} -1 _GCC_OUTPUT)
- string(REGEX REPLACE "march=[ \t]*([^ \n]*)[ \n].*" "\\1"
- GNUCC_ARCH "${_GCC_OUTPUT}")
+ if (POS EQUAL -1)
+ set (GNUCC_ARCH "native")
+ else()
+ string(SUBSTRING "${_GCC_OUTPUT}" ${POS} -1 _GCC_OUTPUT)
+ string(REGEX REPLACE "march=[ \t]*([^ \n]*)[ \n].*" "\\1"
+ GNUCC_ARCH "${_GCC_OUTPUT}")
+ endif()
# test the parsed flag
set (EXEC_ARGS ${CC_ARG1} -E - -mtune=${GNUCC_ARCH})
--
2.31.1

BIN
hyperscan-5.2.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
Name: hyperscan
Version: 5.4.2
Release: 1
Version: 5.2.1
Release: 3
Summary: High-performance regular expression matching library
License: BSD
@ -8,7 +8,7 @@ URL: https://www.hyperscan.io/
Source0: https://github.com/intel/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: hyperscan-aarch64-support.patch
Patch1: Fix-hyperscan-gcc10.patch
Patch1: Fix-build-errot-on-x86_64.patch
BuildRequires: gcc-c++
BuildRequires: boost-devel
@ -51,15 +51,7 @@ This package provides the libraries, include files and other resources
needed for developing Hyperscan applications.
%prep
%setup -q -n %{name}-%{version}
cd %{_builddir}/%{name}-%{version}
mv src/util/simd_utils.h src/util/simd_x86.h
sed -i 's/SIMD_UTILS/SIMD_X86/' src/util/simd_x86.h
sed -i 's/_mm_set_epi32/set32x4/' src/util/state_compress.c
sed -i 's/_mm_set_epi64x/set64x2/' src/util/state_compress.c
sed -i 's/_mm_srli_si128/rshiftbyte_m128/' src/util/state_compress.c
cd -
%autopatch -p1
%autosetup -n %{name}-%{version} -p1
%build
%cmake -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_AND_SHARED:BOOL=OFF .
@ -68,9 +60,6 @@ cd -
%install
%make_install
%check
./bin/unit-hyperscan
%files
%doc %{_defaultdocdir}/%{name}/examples/README.md
%doc %{_defaultdocdir}/%{name}/examples/*.cc
@ -85,21 +74,6 @@ cd -
%{_includedir}/hs/
%changelog
* Fri Sep 01 2023 wangkai <13474090681@163.com> - 5.4.2-1
- Update to 5.4.2 for fix CVE-2023-28711
* Thu Apr 20 2023 wangkai <13474090681@163.com> - 5.4.0-3
- Fix CVE-2022-29486
* Thu Oct 20 2022 Liu Zixian <liuzixian4@huawei.com> - 5.4.0-2
- Sync upstream bugfix and enable regression test
* Wed Oct 06 2021 sdlzx <hdu_sdlzx@163.com> - 5.4.0-1
- Update to 5.4.0
* Wed Aug 04 2021 wangyong <wangyong187@huawei.com> - 5.2.1-4
- Fix build error caused by GCC upgrade to GCC-10
* Sat Jul 24 2021 wangyue <wangyue92@huawei.com> - 5.2.1-3
- Fix build error on X86