On 22/07/2018 18:19, Jonathan Chen wrote: > On a recent ports tree (r475116), lang/rust is failing on a synth build with: > > Building stage2 tool cargo (x86_64-unknown-freebsd) > running: > "/construction/xports/lang/rust/work/rustc-1.27.1-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" > "build" "--target" "x86_64-unk > nown-freebsd" "--release" "--frozen" "--manifest-path" > "/construction/xports/lang/rust/work/rustc-1.27.1-src/src/tools/cargo/Cargo.toml" > "-- > features" "" "--message-format" "json" > error: the listed checksum of > `/construction/xports/lang/rust/work/rustc-1.27.1-src/src/vendor/libgit2-sys/libgit2/src/streams/openssl.c` > ha > s changed: > When dumbbell@ committed my patch in PR 226955, he didn't apply the Makefile portion that changes the loop that regenerates the checksums. Refer to the full patch I posted in the PR; this should fix things.
The libgit2-sys crate included in lang/rust currently in the tree is an old version that includes an old version of libgit2, before patches fixing builds with LibreSSL 2.7 were applied. -- Charlie Li Can't think of a witty .sigline today… (This email address is for mailing list use only; replace local-part with vishwin for off-list communication)
diff --git lang/rust/Makefile lang/rust/Makefile index f3a855c72b0e..361c567c0440 100644 --- lang/rust/Makefile +++ lang/rust/Makefile @@ -156,7 +156,7 @@ post-patch: ${WRKSRC}/src/stage0.txt # After patching crates, we need to update their corresponding # `.cargo-checksum.json` to reflect the new checksums verified by Cargo. - @for dir in "${WRKSRC}/src/vendor/libc" "${WRKSRC}/src/vendor/openssl" "${WRKSRC}/src/vendor/openssl-sys"; do \ + @for dir in "${WRKSRC}/src/vendor/libc" "${WRKSRC}/src/vendor/libgit2-sys"; do \ if ! test -d "$$dir"; then \ continue; \ fi; \ diff --git lang/rust/files/patch-src_vendor_libgit2-sys_libgit2_src_streams_openssl.c lang/rust/files/patch-src_vendor_libgit2-sys_libgit2_src_streams_openssl.c new file mode 100644 index 000000000000..30b3c6bd6673 --- /dev/null +++ lang/rust/files/patch-src_vendor_libgit2-sys_libgit2_src_streams_openssl.c @@ -0,0 +1,12 @@ +--- src/vendor/libgit2-sys/libgit2/src/streams/openssl.c.orig 2018-05-07 18:50:07 UTC ++++ src/vendor/libgit2-sys/libgit2/src/streams/openssl.c +@@ -104,7 +104,8 @@ int git_openssl_stream_global_init(void) + ssl_opts |= SSL_OP_NO_COMPRESSION; + #endif + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + SSL_load_error_strings(); + OpenSSL_add_ssl_algorithms(); + #else diff --git lang/rust/files/patch-src_vendor_libgit2-sys_libgit2_src_streams_openssl.h lang/rust/files/patch-src_vendor_libgit2-sys_libgit2_src_streams_openssl.h new file mode 100644 index 000000000000..6e715ef874ab --- /dev/null +++ lang/rust/files/patch-src_vendor_libgit2-sys_libgit2_src_streams_openssl.h @@ -0,0 +1,12 @@ +--- src/vendor/libgit2-sys/libgit2/src/streams/openssl.h.orig 2018-05-07 18:50:07 UTC ++++ src/vendor/libgit2-sys/libgit2/src/streams/openssl.h +@@ -31,7 +31,8 @@ extern int git_openssl__set_cert_location(const char * + + + +-# if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER < 0x10100000L || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + + GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name) + {
signature.asc
Description: OpenPGP digital signature