Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677302 - dev-lang/rust-1.32.0: update crates to support libressl 2.8.2 - > This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 through 2.8.1, but a different version of OpenSSL was found. The build is now aborting due to this version mi
Summary: dev-lang/rust-1.32.0: update crates to support libressl 2.8.2 - > This crate ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords: PullRequest
: 678312 678786 (view as bug list)
Depends on:
Blocks: libressl-2.8.0
  Show dependency tree
 
Reported: 2019-02-05 10:41 UTC by William
Modified: 2019-03-04 09:42 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Manually add all libreSSL 2.8.X (X>1) functionality to openssl-sys 0.9.38 (libre132.patch,7.90 KB, patch)
2019-02-14 01:33 UTC, pagorman
Details | Diff
build.log (build.log,475.93 KB, text/plain)
2019-02-16 15:27 UTC, Stefan Strogin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description William 2019-02-05 10:41:09 UTC
Hi all,

currently rust won't build with libressl 2.8.2:

> This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 through 2.8.1, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch.

openssl-sys 0.9.38 should be updated to 0.10.16.
Comment 1 pagorman 2019-02-14 01:33:32 UTC
Created attachment 565240 [details, diff]
Manually add all libreSSL 2.8.X (X>1) functionality to openssl-sys 0.9.38

as the upstream repo for rust only allows-for/bundles-in openssl-sys-0.9.38, we take advantage of the existing LibreSSL-2.8.1 functionality. We just patch it to apply to a more broad 2.8.X functionality.

I'm posting this with Firefox-65.0.0-r1, which utilizes Rust built with this patch, running LibreSSL 2.8.3 - but 2.8.2 should function similarly. Firefox-65.0.0 simply failed to build all around - a BIG thanks to the guys who gave us THAT update!!!
Comment 2 William 2019-02-15 12:05:56 UTC
The patch works, thanks.
Comment 3 Stefan Strogin gentoo-dev 2019-02-16 15:27:14 UTC
Created attachment 565554 [details]
build.log

emerge -pqv '=dev-lang/rust-1.32.0::gentoo'                  
[ebuild   R   ] dev-lang/rust-1.32.0  USE="libressl -clippy -debug -doc -rls -rustfmt -system-llvm -wasm" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore"
Comment 5 Stefan Strogin gentoo-dev 2019-02-16 16:23:03 UTC
> openssl-sys 0.9.38 should be updated to 0.10.16.

'openssl-sys' from 0.9.38 to 0.9.40, and 'openssl' from 0.10.13 to 0.10.16.
They are like two different crates but from the same repository, and use the same code:
https://crates.io/crates/openssl
https://crates.io/crates/openssl-sys
Comment 6 Stefan Strogin gentoo-dev 2019-02-16 16:34:00 UTC
...But I think changing the crate versions in Cargo.lock will break offline builds, so the right way is to backport the patches for openssl[-sys]. Is it?
Comment 7 Alec Ari 2019-02-17 01:20:54 UTC
It would make a lot of sense to include this patch as well:

https://github.com/sfackler/rust-openssl/commit/4256cfbf19ecaed4a0d1acd1bfbaff46b698e912

So you're better off just bumping openssl-sys to v0.9.39 and openssl to v0.10.14.

See my thread here:

https://forums.gentoo.org/viewtopic-t-1093078.html

P.S., how do you update that cargo-checksum.json file without running sha256sum by hand and modifying directly?

Thanks!

Alec
Comment 8 Stefan Strogin gentoo-dev 2019-02-17 08:48:59 UTC
> It would make a lot of sense to include this patch as well

Maybe, but the patch for unpublishing functions is not relevant to this bug, as far as I can see. If you really want to backport it, perhaps it will be appropriate to create a new bug report for the Rust team.

> P.S., how do you update that cargo-checksum.json file without running sha256sum by hand and modifying directly?

Unfortunately I don't know. I suppose that some `cargo something` command should do this, but I'm not familiar with Rust.
Comment 9 William 2019-02-18 12:42:35 UTC
I think I used the following in the past: 
cargo update -p openssl-src
or this to update everything:
cargo update

and then you can make a patch and it ends up looking like this ugly thing: https://github.com/Wonko7/w7-overlay/blob/master/dev-util/cargo/0001-updated-crates.patch
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2019-02-19 00:54:33 UTC
*** Bug 678312 has been marked as a duplicate of this bug. ***
Comment 11 Larry the Git Cow gentoo-dev 2019-02-19 01:24:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b23da5d1844b4477efd028daec9a665562f773d3

commit b23da5d1844b4477efd028daec9a665562f773d3
Author:     Stefan Strogin <stefan.strogin@gmail.com>
AuthorDate: 2019-02-17 06:18:17 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-02-19 01:23:27 +0000

    dev-lang/rust: add patch to support LibreSSL 2.8.x and 2.9.0
    
    Based on the patches from the upstream:
    https://github.com/sfackler/rust-openssl/commit/9fd7584a84168655cb27e03b7e19a9847b88e77f
    https://github.com/sfackler/rust-openssl/commit/af4488357c9b3e003b883e89c16aaa675ad0c6ac
    
    Closes: https://bugs.gentoo.org/677302
    Package-Manager: Portage-2.3.60, Repoman-2.3.12
    Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/11085
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-lang/rust/files/1.32.0-libressl.patch | 30 ++++++++++++++++++++++++++++++
 dev-lang/rust/rust-1.32.0.ebuild          |  3 +++
 2 files changed, 33 insertions(+)
Comment 12 ernsteiswuerfel archtester 2019-03-04 09:42:24 UTC
*** Bug 678786 has been marked as a duplicate of this bug. ***