diff --git a/1001-Override-the-pkg-config-settings-and-forcibly-utiliz.patch b/1001-Override-the-pkg-config-settings-and-forcibly-utiliz.patch deleted file mode 100644 index 8623eac84795348af9166c80033e50bc3835b91a..0000000000000000000000000000000000000000 --- a/1001-Override-the-pkg-config-settings-and-forcibly-utiliz.patch +++ /dev/null @@ -1,186 +0,0 @@ -From f8b19ed2d6e3e3c6b00a0a04bb28aaf730dacfe5 Mon Sep 17 00:00:00 2001 -From: Guanjun -Date: Wed, 17 Jul 2024 14:30:27 +0800 -Subject: [PATCH 1/1] Override the pkg-config settings and forcibly utilize - OpenSSL 3.x versions during the compilation process - -Signed-off-by: Guanjun ---- - configure | 46 ++++++++++++++++++++++++++++++++++++++-------- - configure.ac | 28 ++++++++++++++++++++++------ - 2 files changed, 60 insertions(+), 14 deletions(-) - -diff --git a/configure b/configure -index 4b9c00c..ead94ad 100755 ---- a/configure -+++ b/configure -@@ -713,6 +713,7 @@ with_qat_sw_crypto_mb_install_dir - with_qat_hw_install_dir - with_openssl_dir - with_openssl_install_dir -+with_openssl3_include_dir - with_qat_hw_dir - enable_qat_mem_warnings - enable_qat_mem_debug -@@ -918,6 +919,7 @@ enable_qat_warnings - enable_qat_mem_debug - enable_qat_mem_warnings - with_qat_hw_dir -+enable_with_openssl3_include_dir - with_openssl_install_dir - with_openssl_dir - with_qat_hw_install_dir -@@ -1626,6 +1628,8 @@ Optional Features: - --enable-qat_mem_debug Enable Memory Driver Debug Messages - --enable-qat_mem_warnings - Enable Memory Driver Warning Messages -+ --with-openssl3_include_dir -+ Explicitly favor OpenSSL 3.x usage - --enable-qat_hw_contig_mem - This should be specified to force the Engine to use - the qat_contig_mem component supplied within the QAT -@@ -17106,6 +17110,13 @@ fi - - - -+# Check whether --enable-with_openssl3_include_dir was given. -+if test "${enable_with_openssl3_include_dir+set}" = set; then : -+ enableval=$enable_with_openssl3_include_dir; -+fi -+ -+ -+ - # Other non mandatory parameters - - # Check whether --with-openssl_install_dir was given. -@@ -17628,13 +17639,30 @@ $as_echo "$as_me: Build QAT Engine against OpenSSL 3.0" >&6;} - libdir="`pkg-config --variable=enginesdir libcrypto`" - fi - fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: Install engine/provider in the system OpenSSL Path" >&5 --$as_echo "$as_me: Install engine/provider in the system OpenSSL Path" >&6;} -- includes_openssl="-I`pkg-config --variable=includedir libcrypto`" - -- OPENSSL_LIB="-lcrypto" -+ if test "x$with_openssl3_include_dir" = "xyes" -+ then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: Install engine/provider in the system OpenSSL 3.x Path" >&5 -+$as_echo "$as_me: Install engine/provider in the system OpenSSL 3.x Path" >&6;} -+ cflags_openssl_3="-DQAT_OPENSSL_3 -DOPENSSL_SUPPRESS_DEPRECATED -Wl,-rpath,/usr/lib64/openssl3/" -+ -+ includes_openssl="-I`pkg-config --variable=includedir libcrypto`/openssl3/" -+ -+ OPENSSL_LIB="-l:libcrypto.so.3" -+ -+ with_ld_opt="-l:libcrypto.so.3" - -+ libdir="`pkg-config --variable=enginesdir libcrypto`/../engines-3/" - -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: Install engine/provider in the system OpenSSL 1.x Path" >&5 -+$as_echo "$as_me: Install engine/provider in the system OpenSSL 1.x Path" >&6;} -+ includes_openssl="-I`pkg-config --variable=includedir libcrypto`" -+ -+ OPENSSL_LIB="-lcrypto" -+ -+ -+ fi - fi - if test "x$cflags_openssl_3" != "x"; then - QAT_OPENSSL_3_TRUE= -@@ -18413,7 +18441,7 @@ if test "x$cflags_qat_hw_intree" != "x" - then - DRIVER="qat" - -- USDM="usdm" -+ USDM="udma" - - else - DRIVER="qat_s" -@@ -18433,7 +18461,7 @@ then - then - with_qat_hw_install_dir="\$(with_qat_hw_dir)/build" - fi -- QAT_HW_DRIVER_LIB="-L\$(with_qat_hw_install_dir) -l\$(DRIVER)" -+ QAT_HW_DRIVER_LIB="-Wl,-rpath,\$(with_qat_hw_install_dir) -L\$(with_qat_hw_install_dir) -l\$(DRIVER)" - - fi - fi -@@ -18451,7 +18479,7 @@ then - then - with_qat_hw_usdm_dir="\$(with_qat_hw_dir)/quickassist/utilities/libusdm_drv" - fi -- QAT_HW_MEM_LIB="-l\$(USDM)" -+ QAT_HW_MEM_LIB="-Wl,-rpath,\$(with_qat_hw_usdm_dir) -L\$(with_qat_hw_usdm_dir) -l\$(USDM)" - - includes_qat_hw_usdm="-I\$(with_qat_hw_usdm_dir)" - -@@ -20309,7 +20337,9 @@ $as_echo X/"$am_mf" | - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - as_fn_error $? "Something went wrong bootstrapping makefile fragments -- for automatic dependency tracking. Try re-running configure with the -+ for automatic dependency tracking. If GNU make was not used, consider -+ re-running the configure script with MAKE=\"gmake\" (or whatever is -+ necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). - See \`config.log' for more details" "$LINENO" 5; } -diff --git a/configure.ac b/configure.ac -index 09cdeb0..b5a26fc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -205,6 +205,11 @@ AC_ARG_WITH(qat_hw_dir, - [qat_hw_dir_prefix="/usr"]) - AC_SUBST(with_qat_hw_dir) - -+AC_ARG_ENABLE(with_openssl3_include_dir, -+ AS_HELP_STRING([--with-openssl3_include_dir], -+ [Explicitly favor OpenSSL 3.x usage])) -+AC_SUBST(with_openssl3_include_dir) -+ - # Other non mandatory parameters - AC_ARG_WITH(openssl_install_dir, - AS_HELP_STRING([--with-openssl_install_dir], -@@ -405,10 +410,21 @@ else - libdir="`pkg-config --variable=enginesdir libcrypto`" - fi - fi -- AC_MSG_NOTICE([Install engine/provider in the system OpenSSL Path]) -- AC_SUBST([includes_openssl], ["-I`pkg-config --variable=includedir libcrypto`"]) -- AC_SUBST([OPENSSL_LIB], ["-lcrypto"]) -- AC_SUBST([libdir]) -+ -+ if test "x$with_openssl3_include_dir" = "xyes" -+ then -+ AC_MSG_NOTICE([Install engine/provider in the system OpenSSL 3.x Path]) -+ AC_SUBST([cflags_openssl_3], ["-DQAT_OPENSSL_3 -DOPENSSL_SUPPRESS_DEPRECATED -Wl,-rpath,/usr/lib64/openssl3/"]) -+ AC_SUBST([includes_openssl], ["-I`pkg-config --variable=includedir libcrypto`/openssl3/"]) -+ AC_SUBST([OPENSSL_LIB], ["-l:libcrypto.so.3"]) -+ AC_SUBST([with_ld_opt], ["-l:libcrypto.so.3"]) -+ AC_SUBST([libdir], ["`pkg-config --variable=enginesdir libcrypto`/../engines-3/"]) -+ else -+ AC_MSG_NOTICE([Install engine/provider in the system OpenSSL 1.x Path]) -+ AC_SUBST([includes_openssl], ["-I`pkg-config --variable=includedir libcrypto`"]) -+ AC_SUBST([OPENSSL_LIB], ["-lcrypto"]) -+ AC_SUBST([libdir]) -+ fi - fi - AM_CONDITIONAL([QAT_OPENSSL_3], [test "x$cflags_openssl_3" != "x"]) - AM_CONDITIONAL([QAT_PROVIDER], [test "x$enable_qat_provider" = "xyes"]) -@@ -741,10 +757,10 @@ fi - if test "x$cflags_qat_hw_intree" != "x" - then - AC_SUBST([DRIVER], ["qat"]) -- AC_SUBST([USDM], ["usdm"]) -+ AC_SUBST([USDM], ["udma"]) - else - AC_SUBST([DRIVER], ["qat_s"]) -- AC_SUBST([USDM], ["usdm_drv_s"]) -+ AC_SUBST([USDM], ["udma"]) - fi - - if test "x$cflags_qat_hw" != "x" --- -2.43.5 - diff --git a/qatengine.spec b/qatengine.spec index 9494593482dbe9603920bff85eb56ac5718290d4..9a79df7c8211eada2d8969e50a699c797235764c 100644 --- a/qatengine.spec +++ b/qatengine.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 %global enginesdir %(pkg-config --variable=enginesdir libcrypto) %global githubname QAT_Engine @@ -10,15 +10,9 @@ License: BSD and OpenSSL URL: https://github.com/intel/%{githubname} Source0: https://github.com/intel/%{githubname}/archive/v%{version}/v%{version}.tar.gz Patch1000: 1000-add-amd-CPU-for-qat_sw.patch -Patch1001: 1001-Override-the-pkg-config-settings-and-forcibly-utiliz.patch -BuildRequires: gcc make pkg-config autoconf automake libtool openssl-devel openssl3-devel -BuildRequires: intel-ipp-crypto-mb-devel intel-QAT20-devel udma-devel -BuildRequires: intel-ipsec-mb-devel == 1.3.0 - -Requires: intel-ipsec-mb == 1.3.0 -Requires: intel-ipp-crypto-mb == 1.0.6 -Requires: intel-QAT20 udma openssl3 zlib pcre2 +BuildRequires: gcc make pkg-config autoconf automake libtool openssl-devel +BuildRequires: intel-ipp-crypto-mb-devel intel-ipsec-mb-devel intel-QAT20-devel udma-devel ExclusiveArch: x86_64 @@ -45,22 +39,24 @@ The %{name}-doc package contains documentation files for %{name}. %autosetup -n %{githubname}-%{version} -p1 %build -# Built based on adapted OpenSSL 3.x -%configure --with-qat_hw_dir=/usr/include/qat --with-openssl3_include_dir --enable-qat_sw +%configure --with-qat_hw_dir=/usr/include/qat --enable-qat_sw %make_build %install %make_install -rm -rf %{buildroot}/%{_libdir}/engines-3/qatengine.la +rm -rf %{buildroot}/%{_libdir}/engines-1.1/qatengine.la %files %license LICENSE* -%{enginesdir}/../engines-3/%{name}.so +%{enginesdir}/%{name}.so %files doc %doc README.md docs* %changelog +* Thu Jan 23 2025 Guanjun - 1.2.0-4 +- Openssl 3.x doesn't support tls v1.0 & v1.1, revert the former patch. + * Tue Jul 23 2024 Guanjun - 1.2.0-3 - Override the pkg-config settings and forcibly utilize OpenSSL 3.x versions during the compilation process