From 21dbeb30d6c4d42ff7644b44c40a728075955b80 Mon Sep 17 00:00:00 2001 From: crackedmind Date: Fri, 24 Apr 2020 12:13:49 +0500 Subject: [PATCH 1/5] [openssl] Update version to 1.1.1g --- ports/openssl-unix/CONTROL | 2 +- ports/openssl-unix/portfile.cmake | 4 ++-- ports/openssl-uwp/CONTROL | 4 ++-- ports/openssl-uwp/EnableUWPSupport.patch | 9 +++++---- ports/openssl-uwp/portfile.cmake | 4 ++-- ports/openssl-windows/CONTROL | 4 ++-- ports/openssl-windows/portfile.cmake | 4 ++-- ports/openssl/CONTROL | 4 ++-- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/ports/openssl-unix/CONTROL b/ports/openssl-unix/CONTROL index 0e1d8b8f6e24ef..a28775cc22e7a5 100644 --- a/ports/openssl-unix/CONTROL +++ b/ports/openssl-unix/CONTROL @@ -1,4 +1,4 @@ Source: openssl-unix -Version: 1.1.1d-4 +Version: 1.1.1g Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. Supports: !(windows|uwp) diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index d6e825e473814b..d3e084c8edf1d1 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -11,12 +11,12 @@ endif() vcpkg_find_acquire_program(PERL) -set(OPENSSL_VERSION 1.1.1d) +set(OPENSSL_VERSION 1.1.1g) vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 + SHA512 01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab ) vcpkg_extract_source_archive_ex( diff --git a/ports/openssl-uwp/CONTROL b/ports/openssl-uwp/CONTROL index 7e7650fc22f04d..ccb3fb1e9dcd42 100644 --- a/ports/openssl-uwp/CONTROL +++ b/ports/openssl-uwp/CONTROL @@ -1,4 +1,4 @@ Source: openssl-uwp -Version: 1.1.1d-1 +Version: 1.1.1g Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. -Supports: uwp \ No newline at end of file +Supports: uwp diff --git a/ports/openssl-uwp/EnableUWPSupport.patch b/ports/openssl-uwp/EnableUWPSupport.patch index 8ec26a6de21fdc..d534b9b4a67e02 100644 --- a/ports/openssl-uwp/EnableUWPSupport.patch +++ b/ports/openssl-uwp/EnableUWPSupport.patch @@ -26,10 +26,10 @@ index 3c4299d264..99fcb1f713 100644 inherit_from => [ "VC-noCE-common", asm("x86_asm"), - sub { $disabled{shared} ? () : "uplink_common" } ], + sub { $disabled{uplink} ? () : "uplink_common" } ], - CFLAGS => add("/WX"), AS => sub { vc_win32_info()->{AS} }, ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, -@@ -1375,7 +1375,7 @@ my %targets = ( + asoutflag => sub { vc_win32_info()->{asoutflag} }, +@@ -1374,7 +1374,7 @@ my %targets = ( #### MinGW "mingw" => { inherit_from => [ "BASE_unix", asm("x86_asm"), @@ -139,7 +139,7 @@ index 5a699836f3..de45f1e299 100755 #! /usr/bin/env perl +#! /usr/bin/env perl # -*- mode: perl; -*- - # Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. + # Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. # @@ -407,6 +408,7 @@ my @disablables = ( "ubsan", @@ -149,12 +149,13 @@ index 5a699836f3..de45f1e299 100755 "whirlpool", "weak-ssl-ciphers", "zlib", -@@ -479,7 +481,7 @@ my @disable_cascades = ( +@@ -491,8 +493,8 @@ my @disable_cascades = ( # Without position independent code, there can be no shared libraries or DSOs "pic" => [ "shared" ], - "shared" => [ "dynamic-engine" ], + "shared" => [ "dynamic-engine", "uplink" ], + "dso" => [ "dynamic-engine" ], "engine" => [ "afalgeng", "devcryptoeng" ], # no-autoalginit is only useful when building non-shared diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index 8e97a6bf7c1df9..c91f06ed21c600 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -28,12 +28,12 @@ get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") -set(OPENSSL_VERSION 1.1.1d) +set(OPENSSL_VERSION 1.1.1g) vcpkg_download_distfile(ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 + SHA512 01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab ) vcpkg_extract_source_archive_ex( diff --git a/ports/openssl-windows/CONTROL b/ports/openssl-windows/CONTROL index 12b559d5fc3c78..e9ea27a427846b 100644 --- a/ports/openssl-windows/CONTROL +++ b/ports/openssl-windows/CONTROL @@ -1,4 +1,4 @@ Source: openssl-windows -Version: 1.1.1d-2 +Version: 1.1.1g Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. -Supports: windows \ No newline at end of file +Supports: windows diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index a40532ec4873da..2ba2b91551029c 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -8,7 +8,7 @@ endif() vcpkg_find_acquire_program(PERL) -set(OPENSSL_VERSION 1.1.1d) +set(OPENSSL_VERSION 1.1.1g) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") @@ -16,7 +16,7 @@ set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") vcpkg_download_distfile(ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7 + SHA512 01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab ) vcpkg_extract_source_archive_ex( diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 7c62094b679f9c..4591141bf8f5ac 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,5 +1,5 @@ Source: openssl -Version: 1.1.1d +Version: 1.1.1g Homepage: https://www.openssl.org Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. -Build-Depends: openssl-windows (!uwp&windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows) \ No newline at end of file +Build-Depends: openssl-windows (!uwp&windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows) From a8e9c49c213ce268a634c60b65e51e33913ab3b4 Mon Sep 17 00:00:00 2001 From: crackedmind Date: Fri, 24 Apr 2020 12:14:25 +0500 Subject: [PATCH 2/5] [openssl] Disable build tests --- ports/openssl-unix/CMakeLists.txt | 1 + ports/openssl-uwp/portfile.cmake | 1 + ports/openssl-windows/portfile.cmake | 1 + 3 files changed, 3 insertions(+) diff --git a/ports/openssl-unix/CMakeLists.txt b/ports/openssl-unix/CMakeLists.txt index b141a9126caddd..7857058f0a0dd2 100644 --- a/ports/openssl-unix/CMakeLists.txt +++ b/ports/openssl-unix/CMakeLists.txt @@ -118,6 +118,7 @@ add_custom_command( no-cast no-seed no-md2 + no-tests ${PLATFORM} "--prefix=${CMAKE_INSTALL_PREFIX}" "--openssldir=/etc/ssl" diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index c91f06ed21c600..5cec3fd939b839 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -56,6 +56,7 @@ set(CONFIGURE_COMMAND ${PERL} Configure no-ssl2 no-asm no-uplink + no-tests -utf-8 shared ) diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index 2ba2b91551029c..86dbe4b7987e24 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -39,6 +39,7 @@ set(CONFIGURE_COMMAND ${PERL} Configure enable-static-engine enable-capieng no-ssl2 + no-tests -utf-8 ${OPENSSL_SHARED} ) From f195d4f290d87e65b7aa1834d5a7eae55b19d1ca Mon Sep 17 00:00:00 2001 From: crackedmind Date: Fri, 24 Apr 2020 12:55:07 +0500 Subject: [PATCH 3/5] [openssl-unix][openssl-uwp] use vcpkg_fail_port_install --- ports/openssl-unix/portfile.cmake | 4 +--- ports/openssl-uwp/portfile.cmake | 17 ++--------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index d3e084c8edf1d1..42d3f61ee93c7e 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -1,6 +1,4 @@ -if(VCPKG_TARGET_IS_WINDOWS) - message(FATAL_ERROR "This port is only for openssl on Unix-like systems") -endif() +vcpkg_fail_port_install(MESSAGE "${PORT} is only for openssl on Unix-like systems" ON_TARGET "UWP" "Windows") if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index 5cec3fd939b839..f243130f6eb549 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -1,6 +1,5 @@ -if (NOT VCPKG_TARGET_IS_UWP) - message(FATAL_ERROR "${PORT} only supports UWP") -endif() +vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Universal Platform" ON_TARGET "Linux" "OSX") + if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") @@ -10,18 +9,6 @@ endif() vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(UWP_PLATFORM "arm") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(UWP_PLATFORM "arm64") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(UWP_PLATFORM "x64") -elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(UWP_PLATFORM "Win32") -else () - message(FATAL_ERROR "Unsupported architecture") -endif() - vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(JOM) get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) From 764b619db9c9c13323176f34fd3cd529907ccdbd Mon Sep 17 00:00:00 2001 From: Septarius <1136966+Septarius@users.noreply.github.com> Date: Wed, 10 Jun 2020 22:08:30 -0600 Subject: [PATCH 4/5] [openssl] Applying PR #11003 Suggestions The suggested changes from PR #11003 Along with one additional to remove the deprecated vcpkg_test_cmake from openssl-uwp\portfile.cmake as well. --- ports/openssl-unix/portfile.cmake | 2 +- ports/openssl-uwp/portfile.cmake | 7 +++---- ports/openssl-windows/portfile.cmake | 6 ++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ports/openssl-unix/portfile.cmake b/ports/openssl-unix/portfile.cmake index 42d3f61ee93c7e..633cef70d2a2d0 100644 --- a/ports/openssl-unix/portfile.cmake +++ b/ports/openssl-unix/portfile.cmake @@ -56,7 +56,7 @@ foreach(HEADER ${HEADERS}) endforeach() file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) -file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl-unix RENAME copyright) +file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl) diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index f243130f6eb549..b56ab10e65a818 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -13,7 +13,8 @@ vcpkg_find_acquire_program(PERL) vcpkg_find_acquire_program(JOM) get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}") +vcpkg_add_to_path("${PERL_EXE_PATH}") +vcpkg_add_to_path("${JOM_EXE_PATH}") set(OPENSSL_VERSION 1.1.1g) @@ -32,7 +33,7 @@ vcpkg_extract_source_archive_ex( vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") +vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") vcpkg_find_acquire_program(JOM) @@ -177,5 +178,3 @@ vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) diff --git a/ports/openssl-windows/portfile.cmake b/ports/openssl-windows/portfile.cmake index 86dbe4b7987e24..a802c84c509a8c 100644 --- a/ports/openssl-windows/portfile.cmake +++ b/ports/openssl-windows/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_find_acquire_program(PERL) set(OPENSSL_VERSION 1.1.1g) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") +vcpkg_add_to_path("${PERL_EXE_PATH}") vcpkg_download_distfile(ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" @@ -26,7 +26,7 @@ vcpkg_extract_source_archive_ex( vcpkg_find_acquire_program(NASM) get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") +vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") vcpkg_find_acquire_program(JOM) @@ -182,5 +182,3 @@ vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE) From 12d5eb679cb7c19e89b29670d02598c003d68cea Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:39:04 +0800 Subject: [PATCH 5/5] Update ports/openssl-uwp/portfile.cmake --- ports/openssl-uwp/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index b56ab10e65a818..d8e2301de9f0b5 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -1,6 +1,5 @@ vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Universal Platform" ON_TARGET "Linux" "OSX") - if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") message(WARNING "Can't build openssl if libressl is installed. Please remove libressl, and try install openssl again if you need it. Build will continue but there might be problems since libressl is only a subset of openssl") set(VCPKG_POLICY_EMPTY_PACKAGE enabled)