From 26d0a1ebc7532632e100fd6f8b0c6344648d1612 Mon Sep 17 00:00:00 2001 From: Kevin Puetz Date: Wed, 22 Jun 2022 03:44:14 -0500 Subject: [PATCH] (#11215) serf: Update to support Visual Studio 2022 and openssl 3.x * serf: Update to support Visual Studio 2022 0003-1.3.9-scons-msvc.patch - update patch for msvc-2022 version 14.3 * serf: bump zlib * serf: update to openssl/3.0.3 0005-1.3.9-serf-openssl-3.x.patch add new patch replacing ERR_GET_FUNC with ERR_GET_REASON (ERR_GET_FUNC was removed in openssl 3.x) patch adapted from debian 1.3.9-11, see debian bug #1006572 Co-authored-by: James McCoy Co-authored-by: Srivatsala Kotakonda Co-authored-by: James McCoy --- recipes/serf/all/conandata.yml | 2 ++ recipes/serf/all/conanfile.py | 6 ++-- .../all/patches/0003-1.3.9-scons-msvc.patch | 2 +- .../patches/0005-1.3.9-serf-openssl-3.x.patch | 30 +++++++++++++++++++ 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 recipes/serf/all/patches/0005-1.3.9-serf-openssl-3.x.patch diff --git a/recipes/serf/all/conandata.yml b/recipes/serf/all/conandata.yml index 23c5beea46..10d6d086a2 100644 --- a/recipes/serf/all/conandata.yml +++ b/recipes/serf/all/conandata.yml @@ -15,3 +15,5 @@ patches: base_path: "source_subfolder" - patch_file: "patches/0004-1.3.9-scons-python-spaces.patch" base_path: "source_subfolder" + - patch_file: "patches/0005-1.3.9-serf-openssl-3.x.patch" + base_path: "source_subfolder" diff --git a/recipes/serf/all/conanfile.py b/recipes/serf/all/conanfile.py index d019570a84..389e7ad59c 100644 --- a/recipes/serf/all/conanfile.py +++ b/recipes/serf/all/conanfile.py @@ -40,11 +40,11 @@ class SerfConan(ConanFile): def requirements(self): self.requires("apr-util/1.6.1") - self.requires("zlib/1.2.11") - self.requires("openssl/1.1.1g") + self.requires("zlib/1.2.12") + self.requires("openssl/3.0.3") def build_requirements(self): - self.build_requires("scons/3.1.2") + self.build_requires("scons/4.3.0") def source(self): tools.get(**self.conan_data["sources"][self.version]) diff --git a/recipes/serf/all/patches/0003-1.3.9-scons-msvc.patch b/recipes/serf/all/patches/0003-1.3.9-scons-msvc.patch index f9a4e7ae19..30fc0c95af 100644 --- a/recipes/serf/all/patches/0003-1.3.9-scons-msvc.patch +++ b/recipes/serf/all/patches/0003-1.3.9-scons-msvc.patch @@ -5,7 +5,7 @@ "Visual C++ to use for building (E.g. 11.0, 9.0)", None, - allowed_values=('14.0', '12.0', -+ allowed_values=('14.2', "14.1", '14.0', '12.0', ++ allowed_values=('14.3', '14.2', '14.1', '14.0', '12.0', '11.0', '10.0', '9.0', '8.0', '6.0') ), diff --git a/recipes/serf/all/patches/0005-1.3.9-serf-openssl-3.x.patch b/recipes/serf/all/patches/0005-1.3.9-serf-openssl-3.x.patch new file mode 100644 index 0000000000..d270347c9b --- /dev/null +++ b/recipes/serf/all/patches/0005-1.3.9-serf-openssl-3.x.patch @@ -0,0 +1,30 @@ +Subject: Fix build with OpenSSL 3 +Author: James McCoy +Origin: https://salsa.debian.org/jamessan/serf/-/blob/500faae58ca4a8f84c2c4a485c81ed4867be57a6/debian/patches/openssl-3.x +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006572 + +Remove use of ERR_GET_FUNC when it's not defined, as is the case with OpenSSL >= 3. + +See https://www.openssl.org/news/cl30.txt + + * The ERR_GET_FUNC() function was removed. With the loss of meaningful + function codes, this function can only cause problems for calling + applications. + +--- buckets/ssl_buckets.c ++++ buckets/ssl_buckets.c +@@ -1325,9 +1325,14 @@ static int ssl_need_client_cert(SSL *ssl, X509 **cert, EVP_PKEY **pkey) + return 0; + } + else { ++#ifdef ERR_GET_FUNC + printf("OpenSSL cert error: %d %d %d\n", ERR_GET_LIB(err), + ERR_GET_FUNC(err), + ERR_GET_REASON(err)); ++#else ++ printf("OpenSSL cert error: %d %d\n", ERR_GET_LIB(err), ++ ERR_GET_REASON(err)); ++#endif + PKCS12_free(p12); + bio_meth_free(biom); + }