FreeBSD Bugzilla – Attachment 205026 Details for
Bug 238536
net-im/fractal: unbreak with LibreSSL 2.9.1+
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fractal-4.0.0-libressl2.9.1
fractal-4.0.0-libressl2.9.1.patch (text/plain), 6.59 KB, created by
Charlie Li
on 2019-06-13 04:37:32 UTC
(
hide
)
Description:
fractal-4.0.0-libressl2.9.1
Filename:
MIME Type:
Creator:
Charlie Li
Created:
2019-06-13 04:37:32 UTC
Size:
6.59 KB
patch
obsolete
># HG changeset patch ># User Charlie Li <ml+freebsd@vishwin.info> ># Date 1556222783 14400 ># Thu Apr 25 16:06:23 2019 -0400 ># Node ID 6e3599d947cf72ce9e18d037c4b35385af14b6c2 ># Parent 853f002ac2ef0e40a48c989316c78261e856dbcd >net-im/fractal: fix build with LibreSSL 2.9.1 > >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl-sys_build_cfgs.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl-sys_build_cfgs.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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<u64>, 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<u64>, 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(); >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl-sys_build_main.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl-sys_build_main.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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. >+ >+ " >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl-sys_src_crypto.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl-sys_src_crypto.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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, >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl-sys_src_ssl.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl-sys_src_ssl.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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; >+ >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl_build.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl_build.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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"); >+ } >+ } >+ } >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl_src_ssl_mod.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl_src_ssl_mod.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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)) >+ } >diff -r 853f002ac2ef -r 6e3599d947cf net-im/fractal/files/patch-vendor_openssl_src_version.rs >--- /dev/null Thu Jan 01 00:00:00 1970 +0000 >+++ b/net-im/fractal/files/patch-vendor_openssl_src_version.rs Thu Apr 25 16:06:23 2019 -0400 >@@ -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,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238536
: 205026