From 15dc2a986e85a0993c2ae408129f4a17cade4a73 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 6 Dec 2016 11:14:24 -0600 Subject: [PATCH 1/5] Remove Rust 1.10.0 / Cargo 0.11.0 (cherry picked from commit ac5d169623c67eaaaa22b37aeec8dd5509d7dc98) --- recipes-devtools/cargo/cargo_0.11.0.bb | 105 ----------------- ...0001-Never-update-the-registry-index.patch | 88 -------------- .../0001-disable-cargo-snapshot-fetch.patch | 27 ----- ...-avoid-explicitly-linking-in-openssl.patch | 75 ------------ ...emove-per-triple-deps-on-openssl-sys.patch | 67 ----------- ...01-libgit2-sys-avoid-blessed-triples.patch | 62 ---------- ...-avoid-explicitly-linking-in-openssl.patch | 70 ------------ .../0001-update-to-new-io-FileType-enum.patch | 63 ----------- recipes-devtools/rust/compiler-rt_1.10.0.bb | 39 ------- ...Add-config-for-musl-based-arm-builds.patch | 45 -------- ...lt-target.json-path-libdir-rust-targ.patch | 107 ------------------ ...e-RUSTFLAGS-to-override-target-libs-.patch | 73 ------------ ...4-mk-add-missing-CFG_LIBDIR_RELATIVE.patch | 27 ----- ...cal-workaround-for-NULL-__dso_handle.patch | 25 ---- ...mk-install-use-disable-rewrite-paths.patch | 30 ----- ...rriding-crate_hash-with-C-crate_hash.patch | 60 ---------- ...tform.mk-pass-C-crate_hash-to-builds.patch | 25 ---- ...note-interpretation-of-rustc-dylib-m.patch | 96 ---------------- ...o-disable-rewriting-of-install-paths.patch | 58 ---------- recipes-devtools/rust/libstd-rs_1.10.0.bb | 41 ------- recipes-devtools/rust/rust-cross_1.10.0.bb | 50 -------- recipes-devtools/rust/rust-llvm_1.10.0.bb | 2 - recipes-devtools/rust/rust-source-1.10.0.inc | 17 --- recipes-devtools/rust/rust_1.10.0.bb | 27 ----- 24 files changed, 1279 deletions(-) delete mode 100644 recipes-devtools/cargo/cargo_0.11.0.bb delete mode 100644 recipes-devtools/cargo/files/0001-Never-update-the-registry-index.patch delete mode 100644 recipes-devtools/cargo/files/0001-disable-cargo-snapshot-fetch.patch delete mode 100644 recipes-devtools/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.patch delete mode 100644 recipes-devtools/cargo/files/curl-rust/0002-remove-per-triple-deps-on-openssl-sys.patch delete mode 100644 recipes-devtools/cargo/files/git2-rs/0001-libgit2-sys-avoid-blessed-triples.patch delete mode 100644 recipes-devtools/cargo/files/ssh2-rs/0001-libssh2-sys-avoid-explicitly-linking-in-openssl.patch delete mode 100644 recipes-devtools/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch delete mode 100644 recipes-devtools/rust/compiler-rt_1.10.0.bb delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0001-Add-config-for-musl-based-arm-builds.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0002-Target-add-default-target.json-path-libdir-rust-targ.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0004-mk-add-missing-CFG_LIBDIR_RELATIVE.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0006-std-thread_local-workaround-for-NULL-__dso_handle.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0007-mk-install-use-disable-rewrite-paths.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch delete mode 100644 recipes-devtools/rust/files/rust-1.10.0/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch delete mode 100644 recipes-devtools/rust/files/rust-installer-1.10.0/0001-add-option-to-disable-rewriting-of-install-paths.patch delete mode 100644 recipes-devtools/rust/libstd-rs_1.10.0.bb delete mode 100644 recipes-devtools/rust/rust-cross_1.10.0.bb delete mode 100644 recipes-devtools/rust/rust-llvm_1.10.0.bb delete mode 100644 recipes-devtools/rust/rust-source-1.10.0.inc delete mode 100644 recipes-devtools/rust/rust_1.10.0.bb diff --git a/recipes-devtools/cargo/cargo_0.11.0.bb b/recipes-devtools/cargo/cargo_0.11.0.bb deleted file mode 100644 index df198d8..0000000 --- a/recipes-devtools/cargo/cargo_0.11.0.bb +++ /dev/null @@ -1,105 +0,0 @@ -require cargo-snapshot.inc -require cargo.inc - -SRC_URI += " \ - git://github.com/rust-lang/cargo.git;protocol=https;name=cargo \ - file://0001-disable-cargo-snapshot-fetch.patch \ - file://0001-Never-update-the-registry-index.patch \ - crate://crates.io/advapi32-sys/0.1.2 \ - crate://crates.io/bufstream/0.1.1 \ - crate://crates.io/crossbeam/0.2.8 \ - crate://crates.io/docopt/0.6.78 \ - crate://crates.io/env_logger/0.3.2 \ - crate://crates.io/filetime/0.1.10 \ - crate://crates.io/flate2/0.2.13 \ - crate://crates.io/fs2/0.2.3 \ - crate://crates.io/glob/0.2.11 \ - crate://crates.io/hamcrest/0.1.0 \ - crate://crates.io/kernel32-sys/0.2.1 \ - crate://crates.io/libc/0.2.8 \ - crate://crates.io/log/0.3.5 \ - crate://crates.io/num_cpus/0.2.11 \ - crate://crates.io/regex/0.1.58 \ - crate://crates.io/rustc-serialize/0.3.18 \ - crate://crates.io/tar/0.4.5 \ - crate://crates.io/tempdir/0.3.4 \ - crate://crates.io/term/0.4.4 \ - crate://crates.io/toml/0.1.28 \ - crate://crates.io/url/1.1.0 \ - crate://crates.io/winapi/0.2.6 \ - crate://crates.io/semver/0.2.3 \ - crate://crates.io/regex-syntax/0.3.0 \ - crate://crates.io/utf8-ranges/0.1.3 \ - crate://crates.io/gcc/0.3.26 \ - crate://crates.io/unicode-normalization/0.1.2 \ - crate://crates.io/libz-sys/1.0.2 \ - crate://crates.io/rand/0.3.14 \ - crate://crates.io/user32-sys/0.1.2 \ - crate://crates.io/idna/0.1.0 \ - crate://crates.io/strsim/0.3.0 \ - crate://crates.io/matches/0.1.2 \ - crate://crates.io/cmake/0.1.16 \ - crate://crates.io/gdi32-sys/0.1.1 \ - crate://crates.io/bitflags/0.1.1 \ - crate://crates.io/unicode-bidi/0.2.3 \ - crate://crates.io/pkg-config/0.3.8 \ - crate://crates.io/winapi-build/0.1.1 \ - crate://crates.io/memchr/0.1.10 \ - crate://crates.io/pnacl-build-helper/1.4.10 \ - crate://crates.io/nom/1.2.2 \ - crate://crates.io/num/0.1.31 \ - crate://crates.io/uuid/0.2.3 \ - crate://crates.io/aho-corasick/0.5.1 \ - crate://crates.io/libressl-pnacl-sys/2.1.6 \ - crate://crates.io/miniz-sys/0.1.7 \ - crate://crates.io/openssl-sys/0.7.8 \ - crate://crates.io/url/0.5.10 \ -" -# Compatible with Rust 1.10.0 -# https://static.rust-lang.org/dist/channel-rust-1.10.0.toml -SRCREV_cargo = "259324cd8f9bb6e1068a3a2b77685e90fda3e3b6" - -S = "${WORKDIR}/git" - -LIC_FILES_CHKSUM ="\ - file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \ - file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \ - file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \ -" - -## curl-rust -SRC_URI += "\ - git://github.com/carllerche/curl-rust.git;protocol=https;destsuffix=curl-rust;name=curl-rust \ - file://curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.patch;patchdir=../curl-rust \ - file://curl-rust/0002-remove-per-triple-deps-on-openssl-sys.patch;patchdir=../curl-rust \ -" - -# 0.2.19 / -sys 0.1.34 -SRCREV_curl-rust = "45b8cb56fbed45f828f96bdd8c286b2b3a8a26cb" - -SRCREV_FORMAT .= "_curl-rust" -EXTRA_OECARGO_PATHS += "${WORKDIR}/curl-rust" - -## ssh2-rs -SRC_URI += "\ - git://github.com/alexcrichton/ssh2-rs.git;protocol=https;name=ssh2-rs;destsuffix=ssh2-rs \ - file://ssh2-rs/0001-libssh2-sys-avoid-explicitly-linking-in-openssl.patch;patchdir=../ssh2-rs \ -" - -# 0.2.11 / -sys 0.1.37 -SRCREV_ssh2-rs = "ced77751cb780d0725a3411bd588c5a26ea79953" - -SRCREV_FORMAT .= "_ssh2-rs" -EXTRA_OECARGO_PATHS += "${WORKDIR}/ssh2-rs" - -## git2-rs -SRC_URI += "\ - git://github.com/alexcrichton/git2-rs.git;protocol=https;name=git2-rs;destsuffix=git2-rs \ - file://git2-rs/0001-libgit2-sys-avoid-blessed-triples.patch;patchdir=../git2-rs \ -" - -# 0.4.3 / -sys 0.4.2 -SRCREV_git2-rs = "cd14fc7801e70d3b26a4e7e5d94785af1f7e9e58" - -SRCREV_FORMAT .= "_git2-rs" -EXTRA_OECARGO_PATHS += "${WORKDIR}/git2-rs" diff --git a/recipes-devtools/cargo/files/0001-Never-update-the-registry-index.patch b/recipes-devtools/cargo/files/0001-Never-update-the-registry-index.patch deleted file mode 100644 index ac33a06..0000000 --- a/recipes-devtools/cargo/files/0001-Never-update-the-registry-index.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 27df8ab04275dfd715d1756fc517bb0323f1b210 Mon Sep 17 00:00:00 2001 -From: Steven Walter -Date: Fri, 2 Sep 2016 14:02:03 -0400 -Subject: [PATCH] Never update the registry index - -Bitbake will fetch the index for us so that we needn't do network IO -during a build ---- - src/cargo/ops/cargo_run.rs | 2 +- - src/cargo/sources/registry.rs | 34 +--------------------------------- - 2 files changed, 2 insertions(+), 34 deletions(-) - -diff --git a/src/cargo/ops/cargo_run.rs b/src/cargo/ops/cargo_run.rs -index 6764118..379b98b 100644 ---- a/src/cargo/ops/cargo_run.rs -+++ b/src/cargo/ops/cargo_run.rs -@@ -1,7 +1,7 @@ - use std::path::Path; - - use ops::{self, CompileFilter}; --use util::{self, CargoResult, process, ProcessError}; -+use util::{self, CargoResult, ProcessError}; - use core::Package; - - pub fn run(manifest_path: &Path, -diff --git a/src/cargo/sources/registry.rs b/src/cargo/sources/registry.rs -index 614d654..a0c7fe6 100644 ---- a/src/cargo/sources/registry.rs -+++ b/src/cargo/sources/registry.rs -@@ -166,7 +166,6 @@ use std::path::{PathBuf, Path}; - - use curl::http; - use flate2::read::GzDecoder; --use git2; - use rustc_serialize::hex::ToHex; - use rustc_serialize::json; - use tar::Archive; -@@ -174,7 +173,7 @@ use url::Url; - - use core::{Source, SourceId, PackageId, Package, Summary, Registry}; - use core::dependency::{Dependency, DependencyInner, Kind}; --use sources::{PathSource, git}; -+use sources::PathSource; - use util::{CargoResult, Config, internal, ChainError, ToUrl, human}; - use util::{hex, Sha256, paths, Filesystem, FileLock}; - use ops; -@@ -464,38 +463,7 @@ impl<'cfg> RegistrySource<'cfg> { - - /// Actually perform network operations to update the registry - fn do_update(&mut self) -> CargoResult<()> { -- if self.updated { -- return Ok(()) -- } -- try!(self.checkout_path.create_dir()); -- let lock = try!(self.checkout_path.open_rw(Path::new(INDEX_LOCK), -- self.config, -- "the registry index")); -- let path = lock.path().parent().unwrap(); -- -- try!(self.config.shell().status("Updating", -- format!("registry `{}`", self.source_id.url()))); -- let repo = try!(git2::Repository::open(path).or_else(|_| { -- let _ = lock.remove_siblings(); -- git2::Repository::init(path) -- })); -- -- // git fetch origin -- let url = self.source_id.url().to_string(); -- let refspec = "refs/heads/*:refs/remotes/origin/*"; -- -- try!(git::fetch(&repo, &url, refspec, &self.config).chain_error(|| { -- internal(format!("failed to fetch `{}`", url)) -- })); -- -- // git reset --hard origin/master -- let reference = "refs/remotes/origin/master"; -- let oid = try!(repo.refname_to_id(reference)); -- trace!("[{}] updating to rev {}", self.source_id, oid); -- let object = try!(repo.find_object(oid, None)); -- try!(repo.reset(&object, git2::ResetType::Hard, None)); - self.updated = true; -- self.cache.clear(); - Ok(()) - } - } --- -2.7.4 - diff --git a/recipes-devtools/cargo/files/0001-disable-cargo-snapshot-fetch.patch b/recipes-devtools/cargo/files/0001-disable-cargo-snapshot-fetch.patch deleted file mode 100644 index cce21ae..0000000 --- a/recipes-devtools/cargo/files/0001-disable-cargo-snapshot-fetch.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 7ae8ea6523c943cc819eadea011ce4f783e40764 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Wed, 3 Feb 2016 15:59:48 -0500 -Subject: [PATCH] disable cargo snapshot fetch - ---- - Makefile.in | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index fadcb4b..a8da630 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -103,10 +103,6 @@ test-unit-$(1): $$(CARGO) - endef - $(foreach target,$(CFG_TARGET),$(eval $(call CARGO_TARGET,$(target)))) - --$(TARGET_ROOT)/snapshot/bin/cargo$(X): $(S)src/snapshots.txt -- $(CFG_PYTHON) $(S)src/etc/dl-snapshot.py $(CFG_BUILD) -- touch $@ -- - - # === Tests - --- -2.8.2 - diff --git a/recipes-devtools/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.patch b/recipes-devtools/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.patch deleted file mode 100644 index 63287db..0000000 --- a/recipes-devtools/cargo/files/curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 8f82cc69e50e7c8e48a2e20b7061483a28bd0d7f Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Sat, 12 Dec 2015 22:36:26 -0500 -Subject: [PATCH 1/2] curl-sys: avoid explicitly linking in openssl - -linking libcurl with libssl is handled by pkg-config, not us -This also allows non-blessed triples to work. ---- - curl-sys/Cargo.toml | 38 -------------------------------------- - curl-sys/lib.rs | 2 -- - 2 files changed, 40 deletions(-) - -diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml -index 24bc4fa..dd56209 100644 ---- a/curl-sys/Cargo.toml -+++ b/curl-sys/Cargo.toml -@@ -19,42 +19,4 @@ path = "lib.rs" - [dependencies] - libz-sys = ">= 0" - libc = "0.2" -- --[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies] --openssl-sys = ">= 0" -- --# Unix platforms use OpenSSL for now to provide SSL functionality --[target.i686-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.i586-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.i686-linux-android.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-linux-musl.dependencies] --openssl-sys = ">= 0" --[target.arm-unknown-linux-gnueabihf.dependencies] --openssl-sys = ">= 0" --[target.armv7-unknown-linux-gnueabihf.dependencies] - openssl-sys = "0.7.0" --[target.arm-linux-androideabi.dependencies] --openssl-sys = ">= 0" --[target.aarch64-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.powerpc-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.powerpc64-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.powerpc64le-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.i686-unknown-freebsd.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-freebsd.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-bitrig.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-openbsd.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-dragonfly.dependencies] --openssl-sys = ">= 0" -diff --git a/curl-sys/lib.rs b/curl-sys/lib.rs -index 7990bd6..eb6c27a 100644 ---- a/curl-sys/lib.rs -+++ b/curl-sys/lib.rs -@@ -3,8 +3,6 @@ - extern crate libc; - #[cfg(not(target_env = "msvc"))] - extern crate libz_sys; --#[cfg(all(unix, not(target_os = "macos")))] --extern crate openssl_sys; - - use libc::{c_void, c_int, c_char, c_uint, c_long}; - --- -2.9.2 - diff --git a/recipes-devtools/cargo/files/curl-rust/0002-remove-per-triple-deps-on-openssl-sys.patch b/recipes-devtools/cargo/files/curl-rust/0002-remove-per-triple-deps-on-openssl-sys.patch deleted file mode 100644 index 1a455d9..0000000 --- a/recipes-devtools/cargo/files/curl-rust/0002-remove-per-triple-deps-on-openssl-sys.patch +++ /dev/null @@ -1,67 +0,0 @@ -From eb23b1b6f749102e3db92b73a5e55ec6ad688524 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Sat, 12 Dec 2015 22:40:33 -0500 -Subject: [PATCH 2/2] remove per triple deps on openssl-sys - ---- - Cargo.toml | 40 +--------------------------------------- - 1 file changed, 1 insertion(+), 39 deletions(-) - -diff --git a/Cargo.toml b/Cargo.toml -index 5f6cf87..0c87156 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -12,49 +12,11 @@ url = ">= 0.5, < 2.0" - log = "0.3.0" - libc = "0.2" - curl-sys = { path = "curl-sys", version = "0.1.0" } -+openssl-sys = "0.7.0" - - [dev-dependencies] - env_logger = "0.3.0" - --# Unix platforms use OpenSSL for now to provide SSL functionality --[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies] --openssl-sys = "0.7.0" -- --[target.i686-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.i586-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.i686-linux-android.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-linux-musl.dependencies] --openssl-sys = "0.7.0" --[target.arm-unknown-linux-gnueabihf.dependencies] --openssl-sys = "0.7.0" --[target.armv7-unknown-linux-gnueabihf.dependencies] --openssl-sys = "0.7.0" --[target.arm-linux-androideabi.dependencies] --openssl-sys = "0.7.0" --[target.aarch64-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.powerpc-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.powerpc64-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.powerpc64le-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.i686-unknown-freebsd.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-freebsd.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-bitrig.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-openbsd.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-dragonfly.dependencies] --openssl-sys = "0.7.0" -- - [[test]] - - name = "test" --- -2.9.2 - diff --git a/recipes-devtools/cargo/files/git2-rs/0001-libgit2-sys-avoid-blessed-triples.patch b/recipes-devtools/cargo/files/git2-rs/0001-libgit2-sys-avoid-blessed-triples.patch deleted file mode 100644 index 4a1b448..0000000 --- a/recipes-devtools/cargo/files/git2-rs/0001-libgit2-sys-avoid-blessed-triples.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 308fd350907fba13f68dcdb8e48040582466cae6 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Sat, 12 Dec 2015 22:53:37 -0500 -Subject: [PATCH] libgit2-sys: avoid blessed triples - ---- - libgit2-sys/Cargo.toml | 33 +-------------------------------- - 1 file changed, 1 insertion(+), 32 deletions(-) - -diff --git a/libgit2-sys/Cargo.toml b/libgit2-sys/Cargo.toml -index 2395314..29000ef 100644 ---- a/libgit2-sys/Cargo.toml -+++ b/libgit2-sys/Cargo.toml -@@ -17,44 +17,13 @@ path = "lib.rs" - libssh2-sys = { version = ">= 0", optional = true } - libc = "0.2" - libz-sys = ">= 0" -+openssl-sys = "0.7.0" - - [build-dependencies] - pkg-config = "0.3" - cmake = "0.1.2" - gcc = "0.3" - --[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies] --openssl-sys = "0.7.0" -- --[target.i686-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.i586-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-linux-musl.dependencies] --openssl-sys = "0.7.0" --[target.aarch64-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.powerpc64-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.powerpc64le-unknown-linux-gnu.dependencies] --openssl-sys = "0.7.0" --[target.arm-unknown-linux-gnueabihf.dependencies] --openssl-sys = "0.7.0" --[target.armv7-unknown-linux-gnueabihf.dependencies] --openssl-sys = "0.7.0" --[target.i686-unknown-freebsd.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-freebsd.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-bitrig.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-openbsd.dependencies] --openssl-sys = "0.7.0" --[target.x86_64-unknown-dragonfly.dependencies] --openssl-sys = "0.7.0" -- - [features] - ssh = ["libssh2-sys"] - https = [] --- -2.9.2 - diff --git a/recipes-devtools/cargo/files/ssh2-rs/0001-libssh2-sys-avoid-explicitly-linking-in-openssl.patch b/recipes-devtools/cargo/files/ssh2-rs/0001-libssh2-sys-avoid-explicitly-linking-in-openssl.patch deleted file mode 100644 index 4c2b1eb..0000000 --- a/recipes-devtools/cargo/files/ssh2-rs/0001-libssh2-sys-avoid-explicitly-linking-in-openssl.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 65f07216c2c7a341cf13c35ecc1a781d7a489511 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Sat, 12 Dec 2015 22:44:14 -0500 -Subject: [PATCH] libssh2-sys: avoid explicitly linking in openssl - ---- - libssh2-sys/Cargo.toml | 33 --------------------------------- - libssh2-sys/lib.rs | 2 -- - 2 files changed, 35 deletions(-) - -diff --git a/libssh2-sys/Cargo.toml b/libssh2-sys/Cargo.toml -index c4e006d..175be77 100644 ---- a/libssh2-sys/Cargo.toml -+++ b/libssh2-sys/Cargo.toml -@@ -19,39 +19,6 @@ libc = "0.2" - [target."cfg(unix)".dependencies] - openssl-sys = ">= 0" - --[target.i686-apple-darwin.dependencies] --openssl-sys = ">= 0" --[target.x86_64-apple-darwin.dependencies] --openssl-sys = ">= 0" --[target.i686-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.i586-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.aarch64-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.powerpc64-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.powerpc64le-unknown-linux-gnu.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-linux-musl.dependencies] --openssl-sys = ">= 0" --[target.arm-unknown-linux-gnueabihf.dependencies] --openssl-sys = ">= 0" --[target.armv7-unknown-linux-gnueabihf.dependencies] --openssl-sys = ">= 0" --[target.i686-unknown-freebsd.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-freebsd.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-dragonfly.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-bitrig.dependencies] --openssl-sys = ">= 0" --[target.x86_64-unknown-openbsd.dependencies] --openssl-sys = ">= 0" -- - [build-dependencies] - pkg-config = "0.3" - cmake = "0.1.2" -diff --git a/libssh2-sys/lib.rs b/libssh2-sys/lib.rs -index 02fd203..3ca1806 100644 ---- a/libssh2-sys/lib.rs -+++ b/libssh2-sys/lib.rs -@@ -4,8 +4,6 @@ - extern crate libc; - - extern crate libz_sys; --#[cfg(unix)] --extern crate openssl_sys; - - use libc::{c_int, size_t, c_void, c_char, c_long, c_uchar, c_uint, c_ulong}; - use libc::ssize_t; --- -2.8.2 - diff --git a/recipes-devtools/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch b/recipes-devtools/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch deleted file mode 100644 index 582d7db..0000000 --- a/recipes-devtools/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 3d850e1b1651a79085b994c12cdb78faa8271622 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ho=C3=A0ng=20=C4=90=E1=BB=A9c=20Hi=E1=BA=BFu?= - -Date: Mon, 1 Dec 2014 11:48:14 +0700 -Subject: [PATCH] update to new io::FileType enum - ---- - src/lib.rs | 32 ++++++++++++++++---------------- - 1 file changed, 16 insertions(+), 16 deletions(-) - -diff --git a/src/lib.rs b/src/lib.rs -index 5e13b84..3e24ff2 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -283,12 +283,12 @@ impl Archive { - octal(&mut header.dev_major, 0i); - - header.link[0] = match stat.kind { -- io::TypeFile => b'0', -- io::TypeDirectory => b'5', -- io::TypeNamedPipe => b'6', -- io::TypeBlockSpecial => b'4', -- io::TypeSymlink => b'2', -- io::TypeUnknown => b' ', -+ io::FileType::RegularFile => b'0', -+ io::FileType::Directory => b'5', -+ io::FileType::NamedPipe => b'6', -+ io::FileType::BlockSpecial => b'4', -+ io::FileType::Symlink => b'2', -+ io::FileType::Unknown => b' ', - }; - - // Final step, calculate the checksum -@@ -411,16 +411,16 @@ impl<'a, R> File<'a, R> { - /// Classify the type of file that this entry represents - pub fn classify(&self) -> io::FileType { - match (self.header.is_ustar(), self.header.link[0]) { -- (_, b'0') => io::TypeFile, -- (_, b'1') => io::TypeUnknown, // need a hard link enum? -- (_, b'2') => io::TypeSymlink, -- (false, _) => io::TypeUnknown, // not technically valid... -- -- (_, b'3') => io::TypeUnknown, // character special... -- (_, b'4') => io::TypeBlockSpecial, -- (_, b'5') => io::TypeDirectory, -- (_, b'6') => io::TypeNamedPipe, -- (_, _) => io::TypeUnknown, // not technically valid... -+ (_, b'0') => io::FileType::RegularFile, -+ (_, b'1') => io::FileType::Unknown, // need a hard link enum? -+ (_, b'2') => io::FileType::Symlink, -+ (false, _) => io::FileType::Unknown, // not technically valid... -+ -+ (_, b'3') => io::FileType::Unknown, // character special... -+ (_, b'4') => io::FileType::BlockSpecial, -+ (_, b'5') => io::FileType::Directory, -+ (_, b'6') => io::FileType::NamedPipe, -+ (_, _) => io::FileType::Unknown, // not technically valid... - } - } - --- -2.0.4 - diff --git a/recipes-devtools/rust/compiler-rt_1.10.0.bb b/recipes-devtools/rust/compiler-rt_1.10.0.bb deleted file mode 100644 index 3dd7def..0000000 --- a/recipes-devtools/rust/compiler-rt_1.10.0.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Rust compiler run-time" -HOMEPAGE = "http://www.rust-lang.org" -SECTION = "devel" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=27b14ab4ce08d04c3a9a5f0ed7997362" - -SRC_URI = "\ - https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \ - " - -require rust-source-${PV}.inc - -ALLOW_EMPTY_${PN} = "1" - -# dev and staticdev should NOT depend on the binary package -RDEPENDS_${PN}-dev = "" -INSANE_SKIP_${PN}-dev = "staticdev" - -S = "${WORKDIR}/rustc-${PV}/src/compiler-rt" - -do_compile () { - oe_runmake -C ${S} \ - ProjSrcRoot="${S}" \ - ProjObjRoot="${B}" \ - CC="${CC}" \ - AR="${AR}" \ - RANLIB="${RANLIB}" \ - CFLAGS="${CFLAGS}" \ - TargetTriple=${HOST_SYS} \ - triple-builtins -} - -do_install () { - mkdir -p ${D}${libdir} - cp triple/builtins/libcompiler_rt.a ${D}${libdir}/libcompiler-rt.a -} - -FILES_${PN}-dev = "" -FILES_${PN}-staticdev = "${libdir}/*.a" diff --git a/recipes-devtools/rust/files/rust-1.10.0/0001-Add-config-for-musl-based-arm-builds.patch b/recipes-devtools/rust/files/rust-1.10.0/0001-Add-config-for-musl-based-arm-builds.patch deleted file mode 100644 index d8459c0..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0001-Add-config-for-musl-based-arm-builds.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 69b65762ccdf459143fc273a39b0a0e0c6d8fe3e Mon Sep 17 00:00:00 2001 -From: Steven Walter -Date: Mon, 2 May 2016 19:57:46 -0400 -Subject: [PATCH 01/11] Add config for musl-based arm builds - ---- - mk/cfg/arm-unknown-linux-musleabi.mk | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) - create mode 100644 mk/cfg/arm-unknown-linux-musleabi.mk - -diff --git a/mk/cfg/arm-unknown-linux-musleabi.mk b/mk/cfg/arm-unknown-linux-musleabi.mk -new file mode 100644 -index 0000000..2485bd9 ---- /dev/null -+++ b/mk/cfg/arm-unknown-linux-musleabi.mk -@@ -0,0 +1,26 @@ -+# arm-unknown-linux-musleabi configuration -+CROSS_PREFIX_arm-unknown-linux-musleabi=arm-linux-musleabi- -+CC_arm-unknown-linux-musleabi=gcc -+CXX_arm-unknown-linux-musleabi=g++ -+CPP_arm-unknown-linux-musleabi=gcc -E -+AR_arm-unknown-linux-musleabi=ar -+CFG_LIB_NAME_arm-unknown-linux-musleabi=lib$(1).so -+CFG_STATIC_LIB_NAME_arm-unknown-linux-musleabi=lib$(1).a -+CFG_LIB_GLOB_arm-unknown-linux-musleabi=lib$(1)-*.so -+CFG_LIB_DSYM_GLOB_arm-unknown-linux-musleabi=lib$(1)-*.dylib.dSYM -+CFG_JEMALLOC_CFLAGS_arm-unknown-linux-musleabi := -D__arm__ $(CFLAGS) -+CFG_GCCISH_CFLAGS_arm-unknown-linux-musleabi := -Wall -g -fPIC -D__arm__ $(CFLAGS) -+CFG_GCCISH_CXXFLAGS_arm-unknown-linux-musleabi := -fno-rtti $(CXXFLAGS) -+CFG_GCCISH_LINK_FLAGS_arm-unknown-linux-musleabi := -shared -fPIC -g -+CFG_GCCISH_DEF_FLAG_arm-unknown-linux-musleabi := -Wl,--export-dynamic,--dynamic-list= -+CFG_LLC_FLAGS_arm-unknown-linux-musleabi := -+CFG_INSTALL_NAME_arm-unknown-linux-musleabi = -+CFG_EXE_SUFFIX_arm-unknown-linux-musleabi := -+CFG_WINDOWSY_arm-unknown-linux-musleabi := -+CFG_UNIXY_arm-unknown-linux-musleabi := 1 -+CFG_LDPATH_arm-unknown-linux-musleabi := -+CFG_RUN_arm-unknown-linux-musleabi=$(2) -+CFG_RUN_TARG_arm-unknown-linux-musleabi=$(call CFG_RUN_arm-unknown-linux-musleabi,,$(2)) -+RUSTC_FLAGS_arm-unknown-linux-musleabi := -+RUSTC_CROSS_FLAGS_arm-unknown-linux-musleabi := -+CFG_GNU_TRIPLE_arm-unknown-linux-musleabi := arm-unknown-linux-musleabi --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0002-Target-add-default-target.json-path-libdir-rust-targ.patch b/recipes-devtools/rust/files/rust-1.10.0/0002-Target-add-default-target.json-path-libdir-rust-targ.patch deleted file mode 100644 index eded81d..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0002-Target-add-default-target.json-path-libdir-rust-targ.patch +++ /dev/null @@ -1,107 +0,0 @@ -From 0535c75086a9c170d8d4d99b3030d9136ea6e2c7 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Tue, 18 Nov 2014 01:40:21 -0500 -Subject: [PATCH 02/11] Target: add default target.json path: - $libdir/rust/targets - ---- - src/librustc/session/config.rs | 6 +++--- - src/librustc/session/mod.rs | 8 ++++++-- - src/librustc_back/target/mod.rs | 13 +++++++++++-- - 3 files changed, 20 insertions(+), 7 deletions(-) - -diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs -index da5555d..6cd0ea9 100644 ---- a/src/librustc/session/config.rs -+++ b/src/librustc/session/config.rs -@@ -35,7 +35,7 @@ use getopts; - use std::collections::HashMap; - use std::env; - use std::fmt; --use std::path::PathBuf; -+use std::path::{Path, PathBuf}; - - pub struct Config { - pub target: Target, -@@ -787,8 +787,8 @@ pub fn build_configuration(sess: &Session) -> ast::CrateConfig { - v - } - --pub fn build_target_config(opts: &Options, sp: &Handler) -> Config { -- let target = match Target::search(&opts.target_triple) { -+pub fn build_target_config(sysroot: &Path, opts: &Options, sp: &Handler) -> Config { -+ let target = match Target::search(sysroot, &opts.target_triple[..]) { - Ok(t) => t, - Err(e) => { - panic!(sp.fatal(&format!("Error loading target specification: {}", e))); -diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs -index 907241d..d0e3743 100644 ---- a/src/librustc/session/mod.rs -+++ b/src/librustc/session/mod.rs -@@ -470,13 +470,17 @@ pub fn build_session_(sopts: config::Options, - codemap: Rc, - cstore: Rc CrateStore<'a>>) - -> Session { -- let host = match Target::search(config::host_triple()) { -+ let sysroot = match sopts.maybe_sysroot { -+ Some(ref x) => PathBuf::from(x), -+ None => filesearch::get_or_default_sysroot() -+ }; -+ let host = match Target::search(&sysroot, config::host_triple()) { - Ok(t) => t, - Err(e) => { - panic!(span_diagnostic.fatal(&format!("Error loading host specification: {}", e))); - } - }; -- let target_cfg = config::build_target_config(&sopts, &span_diagnostic); -+ let target_cfg = config::build_target_config(&sysroot, &sopts, &span_diagnostic); - let p_s = parse::ParseSess::with_span_handler(span_diagnostic, codemap); - let default_sysroot = match sopts.maybe_sysroot { - Some(_) => None, -diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs -index 2163a8a..38607f0 100644 ---- a/src/librustc_back/target/mod.rs -+++ b/src/librustc_back/target/mod.rs -@@ -48,6 +48,8 @@ use serialize::json::Json; - use std::default::Default; - use std::io::prelude::*; - use syntax::abi::Abi; -+use std::borrow::ToOwned; -+use std::path::Path; - - mod android_base; - mod apple_base; -@@ -477,12 +479,13 @@ impl Target { - /// - /// The error string could come from any of the APIs called, including - /// filesystem access and JSON decoding. -- pub fn search(target: &str) -> Result { -+ pub fn search(sysroot: &Path, target: &str) -> Result { - use std::env; - use std::ffi::OsString; - use std::fs::File; - use std::path::{Path, PathBuf}; - use serialize::json; -+ use std::iter::IntoIterator; - - fn load_file(path: &Path) -> Result { - let mut f = File::open(path).map_err(|e| e.to_string())?; -@@ -513,8 +516,14 @@ impl Target { - .unwrap_or(OsString::new()); - - // FIXME 16351: add a sane default search path? -+ let mut default_path = sysroot.to_owned(); -+ default_path.push(env!("CFG_LIBDIR_RELATIVE")); -+ default_path.push("rustlib"); - -- for dir in env::split_paths(&target_path) { -+ let paths = env::split_paths(&target_path) -+ .chain(Some(default_path).into_iter()); -+ -+ for dir in paths { - let p = dir.join(&path); - if p.is_file() { - return load_file(&p); --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch b/recipes-devtools/rust/files/rust-1.10.0/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch deleted file mode 100644 index 3eb103a..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 4290b8f28222824a558ac4471d26fe88b2889a5b Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Tue, 18 Nov 2014 14:52:56 -0500 -Subject: [PATCH 03/11] mk: for stage0, use RUSTFLAGS to override target libs - dir - -Setting HLIB specially for stage0 (and even more specially for windows) -also affects the location we place TLIB. To keep the TLIBs we build in -the place requested by configure, use '-L' and '--sysroot' to point -stage0-rustc at the appropriate location. ---- - mk/main.mk | 29 ++++++++++++----------------- - 1 file changed, 12 insertions(+), 17 deletions(-) - -diff --git a/mk/main.mk b/mk/main.mk -index c47020c..fcf1409 100644 ---- a/mk/main.mk -+++ b/mk/main.mk -@@ -403,32 +403,26 @@ define SREQ - HROOT$(1)_H_$(3) = $(3)/stage$(1) - HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin - --ifeq ($$(CFG_WINDOWSY_$(3)),1) --# On Windows we always store host runtime libraries in the 'bin' directory because --# there's no rpath. Target libraries go under $CFG_LIBDIR_RELATIVE (usually 'lib'). --HLIB_RELATIVE$(1)_H_$(3) = bin --TROOT$(1)_T_$(2)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)/rustlib/$(2) --# Remove the next 3 lines after a snapshot --ifeq ($(1),0) --RUSTFLAGS_STAGE0 += -L $$(TROOT$(1)_T_$(2)_H_$(3))/lib --endif -- --else -- --ifeq ($(1),0) --HLIB_RELATIVE$(1)_H_$(3) = lib --else - HLIB_RELATIVE$(1)_H_$(3) = $$(CFG_LIBDIR_RELATIVE) --endif -+ - TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2) - --endif - HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(HLIB_RELATIVE$(1)_H_$(3)) - - # Destinations of artifacts for target architectures - TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin - TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib - -+# Don't trust stage0, be explicit about libraries -+# TODO: rather than specifying sysroot, we really want to tell which libdir to -+# use (ie: the dir containing 'rustlib'). This would allow us to avoid -+# passing the '-L' options. -+ifeq ($(1),0) -+RUSTFLAGS_S_$(1)_T_$(2)_H_$(3) += --sysroot "$$(HROOT$(1)_H_$(3))" \ -+ -L "$$(TLIB$(1)_T_$(2)_H_$(3))" -+endif -+ -+ - # Preqrequisites for using the stageN compiler - ifeq ($(1),0) - HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) -@@ -536,6 +530,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \ - $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \ - --cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \ - $$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \ -+ $$(RUSTFLAGS_S_$(1)_T_$(2)_H_$(3)) \ - $$(RUSTC_FLAGS_$(2)) - - endef --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0004-mk-add-missing-CFG_LIBDIR_RELATIVE.patch b/recipes-devtools/rust/files/rust-1.10.0/0004-mk-add-missing-CFG_LIBDIR_RELATIVE.patch deleted file mode 100644 index 20f2084..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0004-mk-add-missing-CFG_LIBDIR_RELATIVE.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 06b8c4bc8f7056d604d8ef4d699273cc1dd39025 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Tue, 18 Nov 2014 13:48:14 -0500 -Subject: [PATCH 04/11] mk: add missing CFG_LIBDIR_RELATIVE - ---- - mk/grammar.mk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mk/grammar.mk b/mk/grammar.mk -index 0d527bd..926f247 100644 ---- a/mk/grammar.mk -+++ b/mk/grammar.mk -@@ -11,8 +11,8 @@ - BG = $(CFG_BUILD_DIR)/grammar/ - SG = $(S)src/grammar/ - B = $(CFG_BUILD_DIR)/$(CFG_BUILD)/stage2/ --L = $(B)lib/rustlib/$(CFG_BUILD)/lib --LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/ -+L = $(B)$(CFG_LIBDIR_RELATIVE)/rustlib/$(CFG_BUILD)/lib -+LD = $(CFG_BUILD)/stage2/$(CFG_LIBDIR_RELATIVE)/rustlib/$(CFG_BUILD)/lib/ - RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) - ifeq ($(CFG_OSTYPE),apple-darwin) - FLEX_LDFLAGS=-ll --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0006-std-thread_local-workaround-for-NULL-__dso_handle.patch b/recipes-devtools/rust/files/rust-1.10.0/0006-std-thread_local-workaround-for-NULL-__dso_handle.patch deleted file mode 100644 index 162404f..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0006-std-thread_local-workaround-for-NULL-__dso_handle.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f7441b3080088d8131d106c59c3543b22c9e8211 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Wed, 3 Dec 2014 19:15:19 -0500 -Subject: [PATCH 06/11] std/thread_local: workaround for NULL __dso_handle - ---- - src/libstd/thread/local.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs -index 6b54ec8..5b41b75 100644 ---- a/src/libstd/thread/local.rs -+++ b/src/libstd/thread/local.rs -@@ -346,7 +346,7 @@ pub mod elf { - #[linkage = "extern_weak"] - static __cxa_thread_atexit_impl: *const libc::c_void; - } -- if !__cxa_thread_atexit_impl.is_null() { -+ if !__cxa_thread_atexit_impl.is_null() && !__dso_handle.is_null() { - type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8), - arg: *mut u8, - dso_handle: *mut u8) -> libc::c_int; --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0007-mk-install-use-disable-rewrite-paths.patch b/recipes-devtools/rust/files/rust-1.10.0/0007-mk-install-use-disable-rewrite-paths.patch deleted file mode 100644 index a07d455..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0007-mk-install-use-disable-rewrite-paths.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a73a748cd73920380ae1f069be91ff833e99d003 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Mon, 2 Mar 2015 13:34:59 -0500 -Subject: [PATCH 07/11] mk/install: use disable-rewrite-paths - -This stops the install scripts from doing work we've already handled. - -Path rewriting is only useful for prepackaged binary installers. ---- - mk/install.mk | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/mk/install.mk b/mk/install.mk -index d2e5449..e67650b 100644 ---- a/mk/install.mk -+++ b/mk/install.mk -@@ -12,7 +12,9 @@ RUN_INSTALLER = cd tmp/empty_dir && \ - sh ../../tmp/dist/$(1)/install.sh \ - --prefix="$(DESTDIR)$(CFG_PREFIX)" \ - --libdir="$(DESTDIR)$(CFG_LIBDIR)" \ -- --mandir="$(DESTDIR)$(CFG_MANDIR)" -+ --mandir="$(DESTDIR)$(CFG_MANDIR)" \ -+ "$(MAYBE_DISABLE_VERIFY)" \ -+ --disable-rewrite-paths - - install: - ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER))) --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch b/recipes-devtools/rust/files/rust-1.10.0/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch deleted file mode 100644 index 858b440..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 042a5df36597c2c6c23900667ae1b4299279092f Mon Sep 17 00:00:00 2001 -From: Steven Walter -Date: Wed, 18 Nov 2015 08:33:26 -0500 -Subject: [PATCH 08/11] Allow overriding crate_hash with -C crate_hash - -The current crate hash is not stable from run-to-run. This causes -problems with bitbake; it needs a guarantee that every build with the -same input will generate compatible output, otherwise sstate won't work. -Using -C crate_hash, we can do that by using the bitbake input hash to -determine the crate hash; the bitbake input hash will be stable, but -still different for different rust recipes. ---- - src/librustc/session/config.rs | 2 ++ - src/librustc_trans/back/link.rs | 12 +++++++++++- - 2 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs -index 6cd0ea9..f90398d 100644 ---- a/src/librustc/session/config.rs -+++ b/src/librustc/session/config.rs -@@ -585,6 +585,8 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options, - "choose the code model to use (llc -code-model for details)"), - metadata: Vec = (Vec::new(), parse_list, - "metadata to mangle symbol names with"), -+ crate_hash: String = ("".to_string(), parse_string, -+ "override crate hash with given value"), - extra_filename: String = ("".to_string(), parse_string, - "extra data to put in each output filename"), - codegen_units: usize = (1, parse_uint, -diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs -index 222d447..e951476 100644 ---- a/src/librustc_trans/back/link.rs -+++ b/src/librustc_trans/back/link.rs -@@ -125,12 +125,22 @@ pub fn find_crate_name(sess: Option<&Session>, - - } - -+use std::hash::{Hasher, SipHasher}; -+use rustc::hir::svh::Svh; -+ - pub fn build_link_meta<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, - name: &str) - -> LinkMeta { -+ let crate_hash = if tcx.sess.opts.cg.crate_hash != "" { -+ let mut state = SipHasher::new(); -+ state.write(tcx.sess.opts.cg.crate_hash.as_bytes()); -+ Svh::new(state.finish()) -+ } else { -+ tcx.calculate_krate_hash() -+ }; - let r = LinkMeta { - crate_name: name.to_owned(), -- crate_hash: tcx.calculate_krate_hash(), -+ crate_hash: crate_hash, - }; - info!("{:?}", r); - return r; --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch b/recipes-devtools/rust/files/rust-1.10.0/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch deleted file mode 100644 index 10832d0..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 44ee7a68f44132ebe32ac486355945131c7a2b83 Mon Sep 17 00:00:00 2001 -From: Steven Walter -Date: Wed, 18 Nov 2015 08:41:17 -0500 -Subject: [PATCH 09/11] mk/platform.mk: pass -C crate_hash to builds - -bitbake recipe will export FORCE_CRATE_HASH ---- - mk/platform.mk | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/mk/platform.mk b/mk/platform.mk -index c264462..b959d59 100644 ---- a/mk/platform.mk -+++ b/mk/platform.mk -@@ -181,6 +181,7 @@ define CFG_MAKE_TOOLCHAIN - AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1)) - LINK_$(1)=$(CROSS_PREFIX_$(1))$(LINK_$(1)) - RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(LINK_$(1))) \ -+ -C crate_hash=$(FORCE_CRATE_HASH) \ - -C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1)) - - RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1)) --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-1.10.0/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch b/recipes-devtools/rust/files/rust-1.10.0/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch deleted file mode 100644 index be4fe58..0000000 --- a/recipes-devtools/rust/files/rust-1.10.0/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9c76c93de35fb45ed18e75827649e299d8c4e94e Mon Sep 17 00:00:00 2001 -From: Eduard Burtescu -Date: Sun, 14 Aug 2016 11:16:28 +0300 -Subject: [PATCH 11/11] Get rid of the .note interpretation of rustc dylib - metadata. - ---- - src/librustc_metadata/loader.rs | 41 ++++++++++++++++++----------------------- - src/librustc_trans/base.rs | 13 ++++++++++--- - 2 files changed, 28 insertions(+), 26 deletions(-) - -diff --git a/src/librustc_metadata/loader.rs b/src/librustc_metadata/loader.rs -index dc10391..9430b70 100644 ---- a/src/librustc_metadata/loader.rs -+++ b/src/librustc_metadata/loader.rs -@@ -875,34 +875,29 @@ fn get_metadata_section_imp(target: &Target, flavor: CrateFlavor, filename: &Pat - } - - pub fn meta_section_name(target: &Target) -> &'static str { -+ // Historical note: -+ // -+ // When using link.exe it was seen that the section name `.note.rustc` -+ // was getting shortened to `.note.ru`, and according to the PE and COFF -+ // specification: -+ // -+ // > Executable images do not use a string table and do not support -+ // > section names longer than 8 characters -+ // -+ // https://msdn.microsoft.com/en-us/library/windows/hardware/gg463119.aspx -+ // -+ // As a result, we choose a slightly shorter name! As to why -+ // `.note.rustc` works on MinGW, that's another good question... -+ - if target.options.is_like_osx { -- "__DATA,__note.rustc" -- } else if target.options.is_like_msvc { -- // When using link.exe it was seen that the section name `.note.rustc` -- // was getting shortened to `.note.ru`, and according to the PE and COFF -- // specification: -- // -- // > Executable images do not use a string table and do not support -- // > section names longer than 8 characters -- // -- // https://msdn.microsoft.com/en-us/library/windows/hardware/gg463119.aspx -- // -- // As a result, we choose a slightly shorter name! As to why -- // `.note.rustc` works on MinGW, that's another good question... -- ".rustc" -+ "__DATA,.rustc" - } else { -- ".note.rustc" -+ ".rustc" - } - } - --pub fn read_meta_section_name(target: &Target) -> &'static str { -- if target.options.is_like_osx { -- "__note.rustc" -- } else if target.options.is_like_msvc { -- ".rustc" -- } else { -- ".note.rustc" -- } -+pub fn read_meta_section_name(_target: &Target) -> &'static str { -+ ".rustc" - } - - // A diagnostic function for dumping crate metadata to an output stream -diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs -index d4f0786..93c9d1a 100644 ---- a/src/librustc_trans/base.rs -+++ b/src/librustc_trans/base.rs -@@ -2523,10 +2523,17 @@ pub fn write_metadata<'a, 'tcx>(cx: &SharedCrateContext<'a, 'tcx>, - }; - unsafe { - llvm::LLVMSetInitializer(llglobal, llconst); -- let name = -+ let section_name = - cx.tcx().sess.cstore.metadata_section_name(&cx.sess().target.target); -- let name = CString::new(name).unwrap(); -- llvm::LLVMSetSection(llglobal, name.as_ptr()) -+ let name = CString::new(section_name).unwrap(); -+ llvm::LLVMSetSection(llglobal, name.as_ptr()); -+ -+ // Also generate a .section directive to force no -+ // flags, at least for ELF outputs, so that the -+ // metadata doesn't get loaded into memory. -+ let directive = format!(".section {}", section_name); -+ let directive = CString::new(directive).unwrap(); -+ llvm::LLVMSetModuleInlineAsm(cx.metadata_llmod(), directive.as_ptr()) - } - return metadata; - } --- -2.7.4 - diff --git a/recipes-devtools/rust/files/rust-installer-1.10.0/0001-add-option-to-disable-rewriting-of-install-paths.patch b/recipes-devtools/rust/files/rust-installer-1.10.0/0001-add-option-to-disable-rewriting-of-install-paths.patch deleted file mode 100644 index 9471252..0000000 --- a/recipes-devtools/rust/files/rust-installer-1.10.0/0001-add-option-to-disable-rewriting-of-install-paths.patch +++ /dev/null @@ -1,58 +0,0 @@ -From c7daec775a917d9e3017bc35ea7d88cc9418f181 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Mon, 2 Mar 2015 13:27:49 -0500 -Subject: [PATCH] add option to disable rewriting of install paths - -This is intended for use by rust & cargo's `make install`, as in that -case: - - - these paths are typically built into the pre-install layout already - - attempting to do the replacement will be incorrect subdirectory - cases (ie: libdir=lib/foo) ---- - install-template.sh | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -diff --git a/install-template.sh b/install-template.sh -index 042b955..4ecf430 100644 ---- a/install-template.sh -+++ b/install-template.sh -@@ -618,16 +618,18 @@ install_components() { - # Decide the destination of the file - local _file_install_path="$_dest_prefix/$_file" - -- if echo "$_file" | grep "^lib/" > /dev/null -- then -- local _f="$(echo "$_file" | sed 's/^lib\///')" -- _file_install_path="$CFG_LIBDIR/$_f" -- fi -+ if [ -n "${CFG_REWRITE_PATHS-}" ]; then -+ if echo "$_file" | grep "^lib/" > /dev/null -+ then -+ local _f="$(echo "$_file" | sed 's/^lib\///')" -+ _file_install_path="$CFG_LIBDIR/$_f" -+ fi - -- if echo "$_file" | grep "^share/man/" > /dev/null -- then -- local _f="$(echo "$_file" | sed 's/^share\/man\///')" -- _file_install_path="$CFG_MANDIR/$_f" -+ if echo "$_file" | grep "^share/man/" > /dev/null -+ then -+ local _f="$(echo "$_file" | sed 's/^share\/man\///')" -+ _file_install_path="$CFG_MANDIR/$_f" -+ fi - fi - - # Make sure there's a directory for it -@@ -810,6 +812,7 @@ valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" - opt ldconfig 1 "run ldconfig after installation (Linux only)" - opt verify 1 "obsolete" - flag verbose "run with verbose output" -+opt rewrite-paths 1 "rewrite install paths for libdir & mandir" - - if [ $HELP -eq 1 ] - then --- -2.4.1 - diff --git a/recipes-devtools/rust/libstd-rs_1.10.0.bb b/recipes-devtools/rust/libstd-rs_1.10.0.bb deleted file mode 100644 index f37d8a7..0000000 --- a/recipes-devtools/rust/libstd-rs_1.10.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Rust standard libaries" -HOMEPAGE = "http://www.rust-lang.org" -SECTION = "devel" -LICENSE = "MIT | Apache-2.0" -LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8" - -SRC_URI = "\ - https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \ - " - -require rust-source-${PV}.inc - -S = "${WORKDIR}/rustc-${PV}" - -CARGO_INDEX_COMMIT = "6127fc24b0b6fe73fe4d339817fbf000b9a798a2" - -SRC_URI += "\ - crate://crates.io/gcc/0.3.26 \ - crate-index://crates.io/${CARGO_INDEX_COMMIT} \ -" - -DEPENDS += "compiler-rt (=${PV})" - -RUSTLIB_DEP = "" -inherit cargo - -# Needed so cargo can find libbacktrace -RUSTFLAGS += "-L ${STAGING_LIBDIR}" - -S = "${WORKDIR}/rustc-${PV}" - -do_compile_prepend () { - cd ${S}/src/rustc/std_shim - export CARGO_TARGET_DIR="${B}" - export RUSTC_BOOTSTRAP_KEY="${RS_KEY}" -} - -do_install () { - mkdir -p ${D}${rustlibdir} - cp ${B}/${TARGET_SYS}/release/deps/* ${D}${rustlibdir} -} diff --git a/recipes-devtools/rust/rust-cross_1.10.0.bb b/recipes-devtools/rust/rust-cross_1.10.0.bb deleted file mode 100644 index 67b6f3c..0000000 --- a/recipes-devtools/rust/rust-cross_1.10.0.bb +++ /dev/null @@ -1,50 +0,0 @@ -require rust.inc -inherit cross -require rust-source-${PV}.inc - -# Otherwise we'll depend on what we provide -INHIBIT_DEFAULT_RUST_DEPS = "1" - -# Unlike native (which nicely maps it's DEPENDS) cross wipes them out completely. -# Generally, we (and cross in general) need the same things that native needs, -# so it might make sense to take it's mapping. For now, though, we just mention -# the bits we need explicitly. -DEPENDS += "rust-llvm-native" -DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc" -DEPENDS += "rust-native" - -PROVIDES = "virtual/${TARGET_PREFIX}rust" -PN = "rust-cross-${TARGET_ARCH}" - -# In the cross compilation case, rustc doesn't seem to get the rpath quite -# right. It manages to include '../../lib/${TARGET_PREFIX}', but doesn't -# include the '../../lib' (ie: relative path from cross_bindir to normal -# libdir. As a result, we end up not being able to properly reference files in normal ${libdir}. -# Most of the time this happens to work fine as the systems libraries are -# subsituted, but sometimes a host system will lack a library, or the right -# version of a library (libtinfo was how I noticed this). -# -# FIXME: this should really be fixed in rust itself. -# FIXME: using hard-coded relative paths is wrong, we should ask bitbake for -# the relative path between 2 of it's vars. -HOST_POST_LINK_ARGS_append = " -Wl,-rpath=../../lib" -BUILD_POST_LINK_ARGS_append = " -Wl,-rpath=../../lib" - -# We need the same thing for the calls to the compiler when building the runtime crap -TARGET_CC_ARCH_append = " --sysroot=${STAGING_DIR_TARGET}" - -do_configure () { -} - -do_compile () { -} - -do_install () { - mkdir -p ${D}${prefix}/${base_libdir_native}/rustlib - cp ${WORKDIR}/targets/${TARGET_SYS}.json ${D}${prefix}/${base_libdir_native}/rustlib -} - -rust_cross_sysroot_preprocess() { - sysroot_stage_dir ${D}${prefix}/${base_libdir_native}/rustlib ${SYSROOT_DESTDIR}${prefix}/${base_libdir_native}/rustlib -} -SYSROOT_PREPROCESS_FUNCS += "rust_cross_sysroot_preprocess" diff --git a/recipes-devtools/rust/rust-llvm_1.10.0.bb b/recipes-devtools/rust/rust-llvm_1.10.0.bb deleted file mode 100644 index 0e72aff..0000000 --- a/recipes-devtools/rust/rust-llvm_1.10.0.bb +++ /dev/null @@ -1,2 +0,0 @@ -require rust-llvm.inc -require rust-source-${PV}.inc diff --git a/recipes-devtools/rust/rust-source-1.10.0.inc b/recipes-devtools/rust/rust-source-1.10.0.inc deleted file mode 100644 index 45a7792..0000000 --- a/recipes-devtools/rust/rust-source-1.10.0.inc +++ /dev/null @@ -1,17 +0,0 @@ -# Specifics for Rust 1.10.0 - -## snapshot info taken from rust/src/stage0.txt -## TODO: find a way to add additional SRC_URIs based on the contents of an -## earlier SRC_URI. -RS_VERSION = "1.9.0" -RS_KEY = "e8edd0fd" - -RUST_SNAPSHOT = "rustc-${RS_VERSION}-${RUST_BUILD_SYS}" - -# These are x86_64-unknown-linux-gnu hashes, how can we add more? -SRC_URI[rust-snapshot.md5sum] = "f1cf6d2fe15e4be18a08259f1540a4ae" -SRC_URI[rust-snapshot.sha256sum] = "d0704d10237c66c3efafa6f7e5570c59a1d3fe5c6d99487540f90ebb37cd84c4" - -SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db" -SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869" - diff --git a/recipes-devtools/rust/rust_1.10.0.bb b/recipes-devtools/rust/rust_1.10.0.bb deleted file mode 100644 index 621c60b..0000000 --- a/recipes-devtools/rust/rust_1.10.0.bb +++ /dev/null @@ -1,27 +0,0 @@ -require rust.inc -require rust-source-${PV}.inc - -# overriden due to difference between 1.10.0 and 1.12.1 -DATA_LAYOUT[aarch64] = "e-m:e-i64:64-i128:128-n32:64-S128" - -SRC_URI += " \ - file://rust-${PV}/0001-Add-config-for-musl-based-arm-builds.patch \ - file://rust-${PV}/0002-Target-add-default-target.json-path-libdir-rust-targ.patch \ - file://rust-${PV}/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch \ - file://rust-${PV}/0004-mk-add-missing-CFG_LIBDIR_RELATIVE.patch \ - file://rust-${PV}/0006-std-thread_local-workaround-for-NULL-__dso_handle.patch \ - file://rust-${PV}/0007-mk-install-use-disable-rewrite-paths.patch \ - file://rust-${PV}/0008-Allow-overriding-crate_hash-with-C-crate_hash.patch \ - file://rust-${PV}/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch \ - file://rust-${PV}/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch \ - file://rust-installer-${PV}/0001-add-option-to-disable-rewriting-of-install-paths.patch;patchdir=src/rust-installer \ - " - -DEPENDS += "rust-llvm (=${PV})" - -# Otherwise we'll depend on what we provide -INHIBIT_DEFAULT_RUST_DEPS_class-native = "1" -# We don't need to depend on gcc-native because yocto assumes it exists -PROVIDES_class-native = "virtual/${TARGET_PREFIX}rust" - -BBCLASSEXTEND = "native" From 7af0a177236cfc2b6fddd4fe372a665dc1ea091e Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 6 Dec 2016 11:17:53 -0600 Subject: [PATCH 2/5] drop the old fetch behavior for pre Cargo 0.13.0 This behavior is flakey and doesn't work from Cargo 0.13.0 and newer which aren't part of this repo anymore. (cherry picked from commit 339cc787ccd04ca5c2a26fc8d9f394540c5db6b5) --- classes/cargo.bbclass | 4 -- lib/crate.py | 110 +----------------------------------------- 2 files changed, 2 insertions(+), 112 deletions(-) diff --git a/classes/cargo.bbclass b/classes/cargo.bbclass index 045dfc1..61f1324 100644 --- a/classes/cargo.bbclass +++ b/classes/cargo.bbclass @@ -83,10 +83,6 @@ oe_cargo_fix_env () { EXTRA_OECARGO_PATHS ??= "" cargo_do_compile () { - # prevent cargo from trying to fetch down new data - mkdir -p "${WORKDIR}/cargo_home/registry/index/github.com-1ecc6299db9ec823" - touch "${WORKDIR}/cargo_home/registry/index/github.com-1ecc6299db9ec823/.cargo-index-lock" - oe_cargo_fix_env oe_cargo_build } diff --git a/lib/crate.py b/lib/crate.py index f26b272..024f9dc 100644 --- a/lib/crate.py +++ b/lib/crate.py @@ -35,21 +35,6 @@ class Crate(Wget): """Class to fetch crates via wget""" - def _cargo_path(self, rootdir, component): - # TODO: make this less brittle - # This can go away entirely once we can build a cargo that supports source-replacement - repo = "github.com-1ecc6299db9ec823" - return os.path.join(rootdir, "cargo_home", "registry", component, repo) - - def _cargo_src_path(self, rootdir): - return self._cargo_path(rootdir, "src") - - def _cargo_index_path(self, rootdir): - return self._cargo_path(rootdir, "index") - - def _cargo_cache_path(self, rootdir): - return self._cargo_path(rootdir, "cache") - def _cargo_bitbake_path(self, rootdir): return os.path.join(rootdir, "cargo_home", "bitbake") @@ -57,7 +42,7 @@ class Crate(Wget): """ Check to see if a given url is for this fetcher """ - return ud.type in ['crate', 'crate-index'] + return ud.type in ['crate'] def recommends_checksum(self, urldata): return False @@ -69,8 +54,6 @@ class Crate(Wget): if ud.type == 'crate': self._crate_urldata_init(ud, d) - elif ud.type == 'crate-index': - self._index_urldata_init(ud, d) super(Crate, self).urldata_init(ud, d) @@ -102,71 +85,15 @@ class Crate(Wget): logger.debug(2, "Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) - def _index_urldata_init(self, ud, d): - """ - Sets up the download for the cargo index - """ - - # URL syntax is: crate-index://REV - # break the URL apart by / - parts = ud.url.split('/') - if len(parts) != 4: - raise bb.fetch2.ParameterError("Invalid URL: Must be crate-index://HOST/REV", ud.url) - - # last field is the rev - rev = parts[3] - host = parts[2] - - if host == 'crates.io': - host = 'github.com/rust-lang/crates.io-index' - - ud.url = "https://%s/archive/%s.tar.gz" % (host, rev) - ud.parm['downloadfilename'] = 'cargo-index-%s.tar.gz' % rev - ud.parm['name'] = "index" - - logger.debug(2, "Fetching crate index %s" % ud.url) - def unpack(self, ud, rootdir, d): """ Uses the crate to build the necessary paths for cargo to utilize it """ - if ud.type == 'crate-index': - return self._index_unpack(ud, rootdir, d) - elif ud.type == 'crate': + if ud.type == 'crate': return self._crate_unpack(ud, rootdir, d) else: super(Crate, self).unpack(ud, rootdir, d) - def _index_unpack(self, ud, rootdir, d): - """ - Unpacks the index - """ - thefile = ud.localpath - - cargo_index = self._cargo_index_path(rootdir) - - cmd = "tar -xz --no-same-owner --strip-components 1 -f %s -C %s" % (thefile, cargo_index) - - # change to the rootdir to unpack but save the old working dir - save_cwd = os.getcwd() - os.chdir(rootdir) - - # ensure we've got these paths made - bb.utils.mkdirhier(cargo_index) - - # path it - path = d.getVar('PATH', True) - if path: - cmd = "PATH=\"%s\" %s" % (path, cmd) - bb.note("Unpacking %s to %s/" % (thefile, cargo_index)) - - ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True) - - os.chdir(save_cwd) - - if ret != 0: - raise UnpackError("Unpack command %s failed with return value %s" % (cmd, ret), ud.url) - def _crate_unpack(self, ud, rootdir, d): """ Unpacks a crate @@ -184,8 +111,6 @@ class Crate(Wget): if pn == ud.parm.get('name'): cmd = "tar -xz --no-same-owner -f %s" % thefile else: - self._crate_unpack_old_layout(ud, rootdir, d) - cargo_bitbake = self._cargo_bitbake_path(rootdir) cmd = "tar -xz --no-same-owner -f %s -C %s" % (thefile, cargo_bitbake) @@ -222,34 +147,3 @@ class Crate(Wget): mdpath = os.path.join(bbpath, cratepath, mdfile) with open(mdpath, "w") as f: json.dump(metadata, f) - - - def _crate_unpack_old_layout(self, ud, rootdir, d): - """ - Unpacks a crate in the old location that tried to emulate - the Cargo registry layout. - """ - thefile = ud.localpath - - cargo_src = self._cargo_src_path(rootdir) - cargo_cache = self._cargo_cache_path(rootdir) - - cmd = "tar -xz --no-same-owner -f %s -C %s" % (thefile, cargo_src) - - # ensure we've got these paths made - bb.utils.mkdirhier(cargo_cache) - bb.utils.mkdirhier(cargo_src) - - bb.note("Copying %s to %s/" % (thefile, cargo_cache)) - shutil.copy(thefile, cargo_cache) - - # path it - path = d.getVar('PATH', True) - if path: - cmd = "PATH=\"%s\" %s" % (path, cmd) - bb.note("Unpacking %s to %s/" % (thefile, os.getcwd())) - - ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True) - - if ret != 0: - raise UnpackError("Unpack command %s failed with return value %s" % (cmd, ret), ud.url) From b7b1b49752ac1e4d6eae9b4340459dbdb103c287 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 7 Dec 2016 08:48:44 -0600 Subject: [PATCH 3/5] rustfmt: update to use Cargo 0.13.0 fetching (cherry picked from commit 94aa1405e3a814d4cf5ad56548129ee5663aa84a) --- recipes-example/rustfmt/rustfmt_0.4.0.bb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/recipes-example/rustfmt/rustfmt_0.4.0.bb b/recipes-example/rustfmt/rustfmt_0.4.0.bb index af487ef..17f2350 100644 --- a/recipes-example/rustfmt/rustfmt_0.4.0.bb +++ b/recipes-example/rustfmt/rustfmt_0.4.0.bb @@ -1,7 +1,5 @@ inherit cargo -CARGO_INDEX_COMMIT = "3b3994e099281c394a6a66604d1af6c0920e4c31" - SRC_URI = " \ crate://crates.io/aho-corasick/0.5.1 \ crate://crates.io/bitflags/0.5.0 \ @@ -25,13 +23,7 @@ SRC_URI = " \ crate://crates.io/winapi/0.2.6 \ crate://crates.io/winapi-build/0.1.1 \ crate://crates.io/rustfmt/0.4.0 \ - crate-index://crates.io/${CARGO_INDEX_COMMIT} \ " -SRC_URI[md5sum] = "7fc46357c9c5e72a3a1ec3630c8c7a05" -SRC_URI[sha256sum] = "770c66dc845424a0c9a7f51b47d8de1e2605298da9b257ddde1d5be6fe01331f" -SRC_URI[index.md5sum] = "79f10f436dbf26737cc80445746f16b4" -SRC_URI[index.sha256sum] = "86114b93f1f51aaf0aec3af0751d214b351f4ff9839ba031315c1b19dcbb1913" - # rustfmt 0.5.0 #LIC_FILES_CHKSUM=" \ # file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \ From 2985fc9b12a4cab19511b4b416da461fbe9ab5c2 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 7 Dec 2016 15:13:18 -0600 Subject: [PATCH 4/5] libstd-rs: update to use Cargo 0.13.0 fetching (cherry picked from commit 04bd03be1eb18db2f03916226b60c96a4ec33a76) --- recipes-devtools/rust/libstd-rs_1.12.1.bb | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes-devtools/rust/libstd-rs_1.12.1.bb b/recipes-devtools/rust/libstd-rs_1.12.1.bb index 821f3cc..0f2f8dc 100644 --- a/recipes-devtools/rust/libstd-rs_1.12.1.bb +++ b/recipes-devtools/rust/libstd-rs_1.12.1.bb @@ -8,11 +8,8 @@ require rust-source-${PV}.inc S = "${WORKDIR}/rustc-${PV}" -CARGO_INDEX_COMMIT = "6127fc24b0b6fe73fe4d339817fbf000b9a798a2" - SRC_URI += "\ crate://crates.io/gcc/0.3.27 \ - crate-index://crates.io/${CARGO_INDEX_COMMIT} \ " DEPENDS += "compiler-rt (=${PV})" From 02de815dfa7806e58ec6a042dd57cb4f6aa2a65b Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 7 Dec 2016 15:13:57 -0600 Subject: [PATCH 5/5] cargo: update to use Cargo 0.13.0 fetching (cherry picked from commit 84af8005f320ec6f80e24f5b2c9d688d73807367) --- recipes-devtools/cargo/cargo.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/recipes-devtools/cargo/cargo.inc b/recipes-devtools/cargo/cargo.inc index 71f96e0..bccb751 100644 --- a/recipes-devtools/cargo/cargo.inc +++ b/recipes-devtools/cargo/cargo.inc @@ -8,11 +8,8 @@ LICENSE = "MIT | Apache-2.0" DEPENDS = "openssl zlib libgit2 curl ca-certificates libssh2" -CARGO_INDEX_COMMIT = "6127fc24b0b6fe73fe4d339817fbf000b9a798a2" - SRC_URI = "\ http://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${CARGO_SNAPSHOT} \ - crate-index://crates.io/${CARGO_INDEX_COMMIT} \ " B = "${S}"