From 8a6ad1b32de85e110a5d83730f68660a2de8c026 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 12 Jan 2024 12:52:06 +0200 Subject: [PATCH] gnu: rust: Unbundle openssl. * gnu/packages/rust.scm (rust-bootstrap)[source]: In snippet also remove bundled openssl, jemalloc. (rust-1.55, rust-1.61, rust-1.69, rust-1.72, rust-1.73, rust-1.74) [source]: In snippet also remove bundled openssl. Change-Id: I6da91820942c36be17f106b426b82d8e068b751c --- gnu/packages/rust.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 4cf2d39f78..40fd40bcf6 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -160,7 +160,9 @@ (define-public rust-bootstrap (snippet '(begin (for-each delete-file-recursively - '("src/llvm-project")) + '("src/llvm-project" + "vendor/openssl-src/openssl" + "vendor/tikv-jemalloc-sys/jemalloc")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF (delete-file "vendor/vte/vim10m_match") @@ -168,7 +170,7 @@ (define-public rust-bootstrap ;; Also remove the bundled (mostly Windows) libraries. ;; find vendor -not -type d -exec file {} \+ | grep PE32 (for-each delete-file - (find-files "vendor" ".*\\.(a|dll|exe|lib)$")))) + (find-files "vendor" "\\.(a|dll|exe|lib)$")))) (patches (search-patches "rustc-1.54.0-src.patch")) (patch-flags '("-p0")))) ;default is -p1 (outputs '("out" "cargo")) @@ -365,6 +367,7 @@ (define-public rust-1.55 '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF @@ -373,7 +376,7 @@ (define-public rust-1.55 ;; Also remove the bundled (mostly Windows) libraries. ;; find vendor -not -type d -exec file {} \+ | grep PE32 (for-each delete-file - (find-files "vendor" ".*\\.(a|dll|exe|lib)$")) + (find-files "vendor" "\\.(a|dll|exe|lib)$")) ;; Add support for riscv64-linux. (substitute* "vendor/tikv-jemallocator/src/lib.rs" ((" target_arch = \"s390x\"," all) @@ -609,6 +612,7 @@ (define-public rust-1.61 '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF @@ -616,7 +620,7 @@ (define-public rust-1.61 (delete-file "vendor/vte/vim10m_table") ;; Also remove the bundled (mostly Windows) libraries. (for-each delete-file - (find-files "vendor" ".*\\.(a|dll|exe|lib)$"))))))))) + (find-files "vendor" "\\.(a|dll|exe|lib)$"))))))))) (define-public rust-1.62 (rust-bootstrapped-package @@ -693,6 +697,7 @@ (define-public rust-1.69 '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) ;; Also remove the bundled (mostly Windows) libraries. (for-each delete-file @@ -747,6 +752,7 @@ (define-public rust-1.72 '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF @@ -771,6 +777,7 @@ (define-public rust-1.73 '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF @@ -794,6 +801,7 @@ (define rust-1.74 '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF