diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42981a3f..ed2b6620 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -617,7 +617,8 @@ Check [#66](https://github.com/AcademySoftwareFoundation/aswf-docker/pull/66) fo aswfdocker release -t IMAGE -g baseos-gl-conan -v 4 -v 5 -v 6 --target baseos-gl-conan --docker-org aswf -m "RELEASE_NOTES!" # Common packages -aswfdocker release -t PACKAGE -g common -v 4 -v 5 -v 6 --target ninja --target cmake --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g common -v 4 -v 5 -v 6 --target openssl --docker-org aswf -m "RELEASE_NOTES!" +aswfdocker release -t PACKAGE -g common -v 4 -v 5 -v 6 --target ninja -target cmake --docker-org aswf -m "RELEASE_NOTES!" aswfdocker release -t PACKAGE -g common -v 4-clang16 -v 4-clang17 -v 5-clang18 -v 5-clang19 -v 6-clang19 -v 6-clang20 --target clang --docker-org aswf -m "RELEASE_NOTES!" # Wait for clang builds to finish (from 2 to 3 hours!) diff --git a/packages/conan/recipes/cmake/conanfile.py b/packages/conan/recipes/cmake/conanfile.py index fce25729..02d24f83 100644 --- a/packages/conan/recipes/cmake/conanfile.py +++ b/packages/conan/recipes/cmake/conanfile.py @@ -19,6 +19,7 @@ required_conan_version = ">=1.51.0" + class CMakeConan(ConanFile): name = "cmake" package_type = "application" @@ -34,7 +35,7 @@ class CMakeConan(ConanFile): "bootstrap": [True, False], } default_options = { - "with_openssl": False, # ASWF: Avoid bringing in OpenSSL dependency + "with_openssl": True, "bootstrap": False, } @@ -119,6 +120,8 @@ def generate(self): if self.options.with_openssl: openssl = self.dependencies["openssl"] tc.variables["OPENSSL_USE_STATIC_LIBS"] = not openssl.options.shared + # Point CMake to the OpenSSL system location + tc.variables["OPENSSL_ROOT_DIR"] = "/usr" if cross_building(self): tc.variables["HAVE_POLL_FINE_EXITCODE"] = '' tc.variables["HAVE_POLL_FINE_EXITCODE__TRYRUN_OUTPUT"] = '' @@ -130,10 +133,9 @@ def generate(self): tc.generate() tc = CMakeDeps(self) # CMake try_compile failure: https://github.com/conan-io/conan-center-index/pull/16073#discussion_r1110037534 - tc.set_property("openssl", "cmake_find_mode", "module") + tc.set_property("openssl", "cmake_find_mode", "none") tc.generate() - def build(self): if self.options.bootstrap: toolchain_file_content = json.loads(load(self, os.path.join(self.generators_folder, "bootstrap_args"))) diff --git a/packages/conan/recipes/openssl/conanfile.py b/packages/conan/recipes/openssl/conanfile.py index 05ec2296..c1e897a3 100644 --- a/packages/conan/recipes/openssl/conanfile.py +++ b/packages/conan/recipes/openssl/conanfile.py @@ -2,11 +2,13 @@ # SPDX-License-Identifier: MIT from conan import ConanFile +from conan.tools.files import load +import re + class SystemOpenSSLConan(ConanFile): name = "openssl" - version = "system" - + settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -14,10 +16,31 @@ class SystemOpenSSLConan(ConanFile): default_options = { "shared": True, } - + + def set_version(self): + content = load(self, "/usr/lib64/pkgconfig/openssl.pc") + match = re.search(r"^Version:\s*(.+)$", content, re.MULTILINE) + self.version = match.group(1).strip() + def package_info(self): - self.cpp_info.includedirs = [] - self.cpp_info.system_libs = ["ssl", "crypto"] - + self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "OpenSSL") - self.cpp_info.set_property("cmake_target_name", "OpenSSL::OpenSSL") + self.cpp_info.set_property("pkg_config_name", "openssl") + + # Point to system OpenSSL + self.cpp_info.includedirs = ["/usr/include"] + self.cpp_info.libdirs = ["/usr/lib64"] + + # Component: Crypto + self.cpp_info.components["Crypto"].set_property("cmake_target_name", "OpenSSL::Crypto") + self.cpp_info.components["Crypto"].libs = ["crypto"] + self.cpp_info.components["Crypto"].includedirs = ["/usr/include"] + self.cpp_info.components["Crypto"].libdirs = ["/usr/lib64"] + self.cpp_info.components["Crypto"].system_libs = ["dl", "pthread"] + + # Component: SSL + self.cpp_info.components["SSL"].set_property("cmake_target_name", "OpenSSL::SSL") + self.cpp_info.components["SSL"].libs = ["ssl"] + self.cpp_info.components["SSL"].includedirs = ["/usr/include"] + self.cpp_info.components["SSL"].libdirs = ["/usr/lib64"] + self.cpp_info.components["SSL"].requires = ["Crypto"] diff --git a/packages/conan/settings/profiles_aswf/ci_common4 b/packages/conan/settings/profiles_aswf/ci_common4 index c8ead50d..f53908e9 100644 --- a/packages/conan/settings/profiles_aswf/ci_common4 +++ b/packages/conan/settings/profiles_aswf/ci_common4 @@ -11,6 +11,7 @@ build_type=Release *:shared=True [tool_requires] [replace_requires] +openssl/*: openssl/1.1.1k@aswf/ci_common4 [replace_tool_requires] cmake/*: cmake/3.31.7@aswf/ci_common4 ninja/*: ninja/1.13.1@aswf/ci_common4 diff --git a/packages/conan/settings/profiles_aswf/ci_common5 b/packages/conan/settings/profiles_aswf/ci_common5 index e796b030..9051faa3 100644 --- a/packages/conan/settings/profiles_aswf/ci_common5 +++ b/packages/conan/settings/profiles_aswf/ci_common5 @@ -11,6 +11,7 @@ build_type=Release *:shared=True [tool_requires] [replace_requires] +openssl/*: openssl/1.1.1k@aswf/ci_common5 [replace_tool_requires] cmake/*: cmake/3.31.7@aswf/ci_common5 ninja/*: ninja/1.13.1@aswf/ci_common5 diff --git a/packages/conan/settings/profiles_aswf/ci_common6 b/packages/conan/settings/profiles_aswf/ci_common6 index e8eb0a40..edc958b8 100644 --- a/packages/conan/settings/profiles_aswf/ci_common6 +++ b/packages/conan/settings/profiles_aswf/ci_common6 @@ -11,6 +11,7 @@ build_type=Release *:shared=True [tool_requires] [replace_requires] +openssl/*: openssl/1.1.1k@aswf/ci_common6 [replace_tool_requires] cmake/*: cmake/4.0.2@aswf/ci_common6 ninja/*: ninja/1.13.1@aswf/ci_common6 diff --git a/packages/conan/settings/profiles_aswf/vfx2024 b/packages/conan/settings/profiles_aswf/vfx2024 index 9a4f5836..deba99aa 100644 --- a/packages/conan/settings/profiles_aswf/vfx2024 +++ b/packages/conan/settings/profiles_aswf/vfx2024 @@ -80,7 +80,7 @@ openfx/*: openfx/1.5s@aswf/vfx2024 opengl/*: opengl/system@aswf/vfx2024 openjpeg/*: openjpeg/2.4.0@aswf/vfx2024 openjph/*: openjph/0.24.5@aswf/vfx2024 -openssl/*: openssl/system@aswf/vfx2024 +openssl/*: openssl/1.1.1k@aswf/vfx2024 opensubdiv/*: opensubdiv/3.6.1@aswf/vfx2024 openusd/*: openusd/24.08@aswf/vfx2024 openvdb/*: openvdb/11.0.0@aswf/vfx2024 diff --git a/packages/conan/settings/profiles_aswf/vfx2025 b/packages/conan/settings/profiles_aswf/vfx2025 index f9d89b15..ba6a5eba 100644 --- a/packages/conan/settings/profiles_aswf/vfx2025 +++ b/packages/conan/settings/profiles_aswf/vfx2025 @@ -80,7 +80,7 @@ openfx/*: openfx/1.5s@aswf/vfx2025 opengl/*: opengl/system@aswf/vfx2025 openjpeg/*: openjpeg/2.4.0@aswf/vfx2025 openjph/*: openjph/0.24.5@aswf/vfx2025 -openssl/*: openssl/system@aswf/vfx2025 +openssl/*: openssl/1.1.1k@aswf/vfx2025 opensubdiv/*: opensubdiv/3.6.1@aswf/vfx2025 openusd/*: openusd/25.05.01@aswf/vfx2025 openvdb/*: openvdb/12.1.1@aswf/vfx2025 diff --git a/packages/conan/settings/profiles_aswf/vfx2026 b/packages/conan/settings/profiles_aswf/vfx2026 index b6535357..51af59bf 100644 --- a/packages/conan/settings/profiles_aswf/vfx2026 +++ b/packages/conan/settings/profiles_aswf/vfx2026 @@ -82,7 +82,7 @@ openfx/*: openfx/1.5s@aswf/vfx2026 opengl/*: opengl/system@aswf/vfx2026 openjpeg/*: openjpeg/2.4.0@aswf/vfx2026 openjph/*: openjph/0.24.5@aswf/vfx2026 -openssl/*: openssl/system@aswf/vfx2026 +openssl/*: openssl/1.1.1k@aswf/vfx2026 opensubdiv/*: opensubdiv/3.7.0@aswf/vfx2026 openusd/*: openusd/26.03@aswf/vfx2026 openvdb/*: openvdb/13.0.0@aswf/vfx2026 diff --git a/packages/conan/settings/profiles_aswftesting/ci_common4 b/packages/conan/settings/profiles_aswftesting/ci_common4 index 852997c8..d42bb9ba 100644 --- a/packages/conan/settings/profiles_aswftesting/ci_common4 +++ b/packages/conan/settings/profiles_aswftesting/ci_common4 @@ -11,6 +11,7 @@ build_type=Release *:shared=True [tool_requires] [replace_requires] +openssl/*: openssl/1.1.1k@aswftesting/ci_common4 [replace_tool_requires] cmake/*: cmake/3.31.7@aswftesting/ci_common4 ninja/*: ninja/1.13.1@aswftesting/ci_common4 diff --git a/packages/conan/settings/profiles_aswftesting/ci_common5 b/packages/conan/settings/profiles_aswftesting/ci_common5 index e6f80be2..bb71fb80 100644 --- a/packages/conan/settings/profiles_aswftesting/ci_common5 +++ b/packages/conan/settings/profiles_aswftesting/ci_common5 @@ -11,6 +11,7 @@ build_type=Release *:shared=True [tool_requires] [replace_requires] +openssl/*: openssl/1.1.1k@aswftesting/ci_common5 [replace_tool_requires] cmake/*: cmake/3.31.7@aswftesting/ci_common5 ninja/*: ninja/1.13.1@aswftesting/ci_common5 diff --git a/packages/conan/settings/profiles_aswftesting/ci_common6 b/packages/conan/settings/profiles_aswftesting/ci_common6 index 314714be..1ec1ecb2 100644 --- a/packages/conan/settings/profiles_aswftesting/ci_common6 +++ b/packages/conan/settings/profiles_aswftesting/ci_common6 @@ -11,6 +11,7 @@ build_type=Release *:shared=True [tool_requires] [replace_requires] +openssl/*: openssl/1.1.1k@aswftesting/ci_common6 [replace_tool_requires] cmake/*: cmake/4.0.2@aswftesting/ci_common6 ninja/*: ninja/1.13.1@aswftesting/ci_common6 diff --git a/packages/conan/settings/profiles_aswftesting/vfx2024 b/packages/conan/settings/profiles_aswftesting/vfx2024 index cd7f5028..bd2dd406 100644 --- a/packages/conan/settings/profiles_aswftesting/vfx2024 +++ b/packages/conan/settings/profiles_aswftesting/vfx2024 @@ -80,7 +80,7 @@ openfx/*: openfx/1.5s@aswftesting/vfx2024 opengl/*: opengl/system@aswftesting/vfx2024 openjpeg/*: openjpeg/2.4.0@aswftesting/vfx2024 openjph/*: openjph/0.24.5@aswftesting/vfx2024 -openssl/*: openssl/system@aswftesting/vfx2024 +openssl/*: openssl/1.1.1k@aswftesting/vfx2024 opensubdiv/*: opensubdiv/3.6.1@aswftesting/vfx2024 openusd/*: openusd/24.08@aswftesting/vfx2024 openvdb/*: openvdb/11.0.0@aswftesting/vfx2024 diff --git a/packages/conan/settings/profiles_aswftesting/vfx2025 b/packages/conan/settings/profiles_aswftesting/vfx2025 index c505bef1..743b2b9a 100644 --- a/packages/conan/settings/profiles_aswftesting/vfx2025 +++ b/packages/conan/settings/profiles_aswftesting/vfx2025 @@ -80,7 +80,7 @@ openfx/*: openfx/1.5s@aswftesting/vfx2025 opengl/*: opengl/system@aswftesting/vfx2025 openjpeg/*: openjpeg/2.4.0@aswftesting/vfx2025 openjph/*: openjph/0.24.5@aswftesting/vfx2025 -openssl/*: openssl/system@aswftesting/vfx2025 +openssl/*: openssl/1.1.1k@aswftesting/vfx2025 opensubdiv/*: opensubdiv/3.6.1@aswftesting/vfx2025 openusd/*: openusd/25.05.01@aswftesting/vfx2025 openvdb/*: openvdb/12.1.1@aswftesting/vfx2025 diff --git a/packages/conan/settings/profiles_aswftesting/vfx2026 b/packages/conan/settings/profiles_aswftesting/vfx2026 index 36f37b17..bed4898c 100644 --- a/packages/conan/settings/profiles_aswftesting/vfx2026 +++ b/packages/conan/settings/profiles_aswftesting/vfx2026 @@ -82,7 +82,7 @@ openfx/*: openfx/1.5s@aswftesting/vfx2026 opengl/*: opengl/system@aswftesting/vfx2026 openjpeg/*: openjpeg/2.4.0@aswftesting/vfx2026 openjph/*: openjph/0.24.5@aswftesting/vfx2026 -openssl/*: openssl/system@aswftesting/vfx2026 +openssl/*: openssl/1.1.1k@aswftesting/vfx2026 opensubdiv/*: opensubdiv/3.7.0@aswftesting/vfx2026 openusd/*: openusd/26.03@aswftesting/vfx2026 openvdb/*: openvdb/13.0.0@aswftesting/vfx2026 diff --git a/python/aswfdocker/builder.py b/python/aswfdocker/builder.py index 5445064e..a5f0b20b 100644 --- a/python/aswfdocker/builder.py +++ b/python/aswfdocker/builder.py @@ -109,9 +109,9 @@ def make_bake_dict( + "_VERSION" ), "ASWF_CONAN_HOME": constants.ASWF_CONAN_HOME, - "ASWF_CONAN_BUILD_MISSING": "--build=missing" - if build_missing - else "", + "ASWF_CONAN_BUILD_MISSING": ( + "--build=missing" if build_missing else "" + ), "ASWF_CONAN_NO_REMOTE": "--no-remote" if no_remote else "", "ASWF_CONAN_PUSH": "TRUE" if self.push else "", } diff --git a/python/aswfdocker/cli/aswfdocker.py b/python/aswfdocker/cli/aswfdocker.py index b2c09dc9..8932ca8d 100644 --- a/python/aswfdocker/cli/aswfdocker.py +++ b/python/aswfdocker/cli/aswfdocker.py @@ -270,9 +270,11 @@ def getdockerorg(build_info): def getdockerpush(build_info): """Prints if the images should be pushed according to the current repo uri and branch name""" click.echo( - "true" - if utils.get_docker_push(build_info.repo_uri, build_info.source_branch) - else "false", + ( + "true" + if utils.get_docker_push(build_info.repo_uri, build_info.source_branch) + else "false" + ), nl=False, ) diff --git a/python/aswfdocker/data/versions.yaml b/python/aswfdocker/data/versions.yaml index cfa73d92..abd50dca 100644 --- a/python/aswfdocker/data/versions.yaml +++ b/python/aswfdocker/data/versions.yaml @@ -158,6 +158,7 @@ versions: ASWF_CMAKE_VERSION: "3.31.7" ASWF_NINJA_VERSION: "1.13.1" ASWF_SONAR_VERSION: "8.0.1.6346" + ASWF_OPENSSL_VERSION: "1.1.1k" ASWF_YQ_VERSION: "4.45.2" ASWF_BASEOS_DISTRO: "rockylinux8" ASWF_BASEOS_IMAGE: "nvidia/cuda" @@ -191,6 +192,7 @@ versions: ASWF_GLVND_VERSION: "1.7.0" ASWF_CCACHE_VERSION: "4.9.1" ASWF_CMAKE_VERSION: "3.31.7" + ASWF_OPENSSL_VERSION: "1.1.1k" ASWF_NINJA_VERSION: "1.13.1" ASWF_SONAR_VERSION: "8.0.1.6346" ASWF_YQ_VERSION: "4.45.2" @@ -227,6 +229,7 @@ versions: ASWF_GLVND_VERSION: "1.7.0" ASWF_CCACHE_VERSION: "4.11.3" ASWF_CMAKE_VERSION: "4.0.2" + ASWF_OPENSSL_VERSION: "1.1.1k" ASWF_NINJA_VERSION: "1.13.1" ASWF_SONAR_VERSION: "8.0.1.6346" ASWF_YQ_VERSION: "4.45.4" @@ -542,7 +545,6 @@ versions: ASWF_OPENCL_ICD_LOADER_VERSION: "system" ASWF_OPENGL_VERSION: "system" ASWF_OPENJPEG_VERSION: "2.4.0" - ASWF_OPENSSL_VERSION: "system" ASWF_OPUS_VERSION: "system" ASWF_PCRE2_VERSION: "system" ASWF_PULSEAUDIO_VERSION: "system" @@ -678,7 +680,6 @@ versions: ASWF_OPENCL_ICD_LOADER_VERSION: "system" ASWF_OPENGL_VERSION: "system" ASWF_OPENJPEG_VERSION: "2.4.0" - ASWF_OPENSSL_VERSION: "system" ASWF_OPUS_VERSION: "system" ASWF_PCRE2_VERSION: "system" ASWF_PULSEAUDIO_VERSION: "system" @@ -815,7 +816,6 @@ versions: ASWF_OPENCL_ICD_LOADER_VERSION: "system" ASWF_OPENGL_VERSION: "system" ASWF_OPENJPEG_VERSION: "2.4.0" - ASWF_OPENSSL_VERSION: "system" ASWF_OPUS_VERSION: "system" ASWF_PCRE2_VERSION: "system" ASWF_PULSEAUDIO_VERSION: "system" @@ -950,6 +950,10 @@ ci-packages: - "4.6" - "5.5" - "6.3" + openssl: + - "4.5" + - "5.4" + - "6.2" cpython: - "2019.2" - "2020.2" @@ -1427,10 +1431,6 @@ ci-packages: - "2024.6" - "2025.5" - "2026.3" - openssl: - - "2024.6" - - "2025.5" - - "2026.3" opus: - "2024.6" - "2025.5" @@ -1698,6 +1698,8 @@ ci-images: groups: package: + common-wrappers: + - openssl common: - clang - cmake @@ -1714,7 +1716,6 @@ groups: - opencl-headers - opencl-icd-loader - opengl - - openssl - pcre2 - sqlite3 - tcl diff --git a/python/aswfdocker/tests/test_utils.py b/python/aswfdocker/tests/test_utils.py index 5f928bac..b48584a9 100644 --- a/python/aswfdocker/tests/test_utils.py +++ b/python/aswfdocker/tests/test_utils.py @@ -155,11 +155,11 @@ def test_cli_packages(self): pkgs = result.output.split("\n") self.assertGreater(len(pkgs), 20) clang_version = list( - index.Index().iter_versions(constants.ImageType.PACKAGE, "clang") + index.Index().iter_versions(constants.ImageType.PACKAGE, "openssl") )[0] self.assertEqual( pkgs[0], - f"common/ci-package-clang:{clang_version}", + f"common-wrappers/ci-package-openssl:{clang_version}", ) def test_cli_images(self):