From owner-svn-ports-head@freebsd.org Sun Jun 30 20:03:08 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91C4E15DDD24; Sun, 30 Jun 2019 20:03:08 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 357C76D05B; Sun, 30 Jun 2019 20:03:08 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02AD125CC; Sun, 30 Jun 2019 20:03:08 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5UK37wl004599; Sun, 30 Jun 2019 20:03:07 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5UK364O004593; Sun, 30 Jun 2019 20:03:06 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201906302003.x5UK364O004593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Sun, 30 Jun 2019 20:03:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r505465 - head/net-im/fractal/files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: head/net-im/fractal/files X-SVN-Commit-Revision: 505465 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 357C76D05B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jun 2019 20:03:08 -0000 Author: swills Date: Sun Jun 30 20:03:06 2019 New Revision: 505465 URL: https://svnweb.freebsd.org/changeset/ports/505465 Log: net-im/fractal: unbreak with LibreSSL 2.9.1+ PR: 238536 Submitted by: Charlie Li Approved by: maintainer timeout (greg@unrelenting.technology, >2 weeks) Added: head/net-im/fractal/files/patch-vendor_openssl-sys_build_cfgs.rs (contents, props changed) head/net-im/fractal/files/patch-vendor_openssl-sys_build_main.rs (contents, props changed) head/net-im/fractal/files/patch-vendor_openssl-sys_src_crypto.rs (contents, props changed) head/net-im/fractal/files/patch-vendor_openssl-sys_src_ssl.rs (contents, props changed) head/net-im/fractal/files/patch-vendor_openssl_build.rs (contents, props changed) head/net-im/fractal/files/patch-vendor_openssl_src_ssl_mod.rs (contents, props changed) head/net-im/fractal/files/patch-vendor_openssl_src_version.rs (contents, props changed) Added: head/net-im/fractal/files/patch-vendor_openssl-sys_build_cfgs.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl-sys_build_cfgs.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,22 @@ +--- vendor/openssl-sys/build/cfgs.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl-sys/build/cfgs.rs +@@ -13,6 +13,9 @@ pub fn get(openssl_version: Option, libressl_vers + if libressl_version >= 0x2_07_00_00_0 { + cfgs.push("libressl270"); + } ++ if libressl_version >= 0x2_07_01_00_0 { ++ cfgs.push("libressl271"); ++ } + if libressl_version >= 0x2_07_03_00_0 { + cfgs.push("libressl273"); + } +@@ -21,6 +24,9 @@ pub fn get(openssl_version: Option, libressl_vers + } + if libressl_version >= 0x2_08_01_00_0 { + cfgs.push("libressl281"); ++ } ++ if libressl_version >= 0x2_09_01_00_0 { ++ cfgs.push("libressl291"); + } + } else { + let openssl_version = openssl_version.unwrap(); Added: head/net-im/fractal/files/patch-vendor_openssl-sys_build_main.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl-sys_build_main.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,19 @@ +--- vendor/openssl-sys/build/main.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl-sys/build/main.rs +@@ -505,6 +505,7 @@ See rust-openssl README for more information: + (8, 1) => ('8', '1'), + (8, _) => ('8', 'x'), + (9, 0) => ('9', '0'), ++ (9, _) => ('9', 'x'), + _ => version_error(), + }; + +@@ -545,7 +546,7 @@ fn version_error() -> ! { + " + + This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 +-through 2.9.0, but a different version of OpenSSL was found. The build is now aborting ++through 2.9.x, but a different version of OpenSSL was found. The build is now aborting + due to this version mismatch. + + " Added: head/net-im/fractal/files/patch-vendor_openssl-sys_src_crypto.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl-sys_src_crypto.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,26 @@ +--- vendor/openssl-sys/src/crypto.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl-sys/src/crypto.rs +@@ -15,7 +15,13 @@ cfg_if! { + if #[cfg(ossl110)] { + pub const CRYPTO_EX_INDEX_SSL: c_int = 0; + pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1; +- ++ } else if #[cfg(libressl)] { ++ pub const CRYPTO_EX_INDEX_SSL: c_int = 1; ++ pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 2; ++ } ++} ++cfg_if! { ++ if #[cfg(any(ossl110, libressl271))] { + extern "C" { + pub fn OpenSSL_version_num() -> c_ulong; + pub fn OpenSSL_version(key: c_int) -> *const c_char; +@@ -64,7 +70,7 @@ pub type CRYPTO_EX_free = unsafe extern "C" fn( + argp: *mut c_void, + ); + extern "C" { +- #[cfg(ossl110)] ++ #[cfg(any(ossl110, libressl))] + pub fn CRYPTO_get_ex_new_index( + class_index: c_int, + argl: c_long, Added: head/net-im/fractal/files/patch-vendor_openssl-sys_src_ssl.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl-sys_src_ssl.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,11 @@ +--- vendor/openssl-sys/src/ssl.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl-sys/src/ssl.rs +@@ -1032,7 +1032,7 @@ extern "C" { + } + + cfg_if! { +- if #[cfg(ossl110)] { ++ if #[cfg(any(ossl110, libressl291))] { + extern "C" { + pub fn TLS_method() -> *const SSL_METHOD; + Added: head/net-im/fractal/files/patch-vendor_openssl_build.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl_build.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,23 @@ +--- vendor/openssl/build.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl/build.rs +@@ -46,12 +46,20 @@ fn main() { + println!("cargo:rustc-cfg=libressl270"); + } + ++ if version >= 0x2_07_01_00_0 { ++ println!("cargo:rustc-cfg=libressl271"); ++ } ++ + if version >= 0x2_07_03_00_0 { + println!("cargo:rustc-cfg=libressl273"); + } + + if version >= 0x2_08_00_00_0 { + println!("cargo:rustc-cfg=libressl280"); ++ } ++ ++ if version >= 0x2_09_01_00_0 { ++ println!("cargo:rustc-cfg=libressl291"); + } + } + } Added: head/net-im/fractal/files/patch-vendor_openssl_src_ssl_mod.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl_src_ssl_mod.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,28 @@ +--- vendor/openssl/src/ssl/mod.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl/src/ssl/mod.rs +@@ -3690,9 +3690,14 @@ cfg_if! { + } + + cfg_if! { +- if #[cfg(ossl110)] { ++ if #[cfg(any(ossl110, libressl291))] { + use ffi::{TLS_method, DTLS_method}; +- ++ } else { ++ use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method}; ++ } ++} ++cfg_if! { ++ if #[cfg(ossl110)] { + unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int { + ffi::CRYPTO_get_ex_new_index( + ffi::CRYPTO_EX_INDEX_SSL_CTX, +@@ -3715,8 +3720,6 @@ cfg_if! { + ) + } + } else { +- use ffi::{SSLv23_method as TLS_method, DTLSv1_method as DTLS_method}; +- + unsafe fn get_new_idx(f: ffi::CRYPTO_EX_free) -> c_int { + ffi::SSL_CTX_get_ex_new_index(0, ptr::null_mut(), None, None, Some(f)) + } Added: head/net-im/fractal/files/patch-vendor_openssl_src_version.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-im/fractal/files/patch-vendor_openssl_src_version.rs Sun Jun 30 20:03:06 2019 (r505465) @@ -0,0 +1,11 @@ +--- vendor/openssl/src/version.rs.orig 2018-12-22 10:43:42 UTC ++++ vendor/openssl/src/version.rs +@@ -14,7 +14,7 @@ + use std::ffi::CStr; + + cfg_if! { +- if #[cfg(ossl110)] { ++ if #[cfg(any(ossl110, libressl271))] { + use ffi::{ + OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON, OPENSSL_PLATFORM, OPENSSL_DIR, + OpenSSL_version_num, OpenSSL_version,