[tor-bugs] #22830 [Core Tor/Tor]: Problems with building with --enable-rust with RUST_DEPENDENCIES
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Jul 13 05:19:11 UTC 2017
#22830: Problems with building with --enable-rust with RUST_DEPENDENCIES
-----------------------------+----------------------------------
Reporter: isis | Owner: chelseakomlo
Type: defect | Status: needs_review
Priority: High | Milestone: Tor: unspecified
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: rust, tor-build | Actual Points:
Parent ID: | Points: 1
Reviewer: isis | Sponsor: SponsorZ
-----------------------------+----------------------------------
Comment (by alexcrichton):
Hello! I may not be following this issue 100%, but if this is largely
targeted at getting offline builds working I'd recommend pursuing #22907
first rather than munging with `CARGO_HOME` and various builds.
In general though Cargo provides the guarantee that if you do something
like `cargo fetch` then if you don't change `Cargo.toml` it'll never touch
the network. The `cargo fetch` step just fills in global
caches/indexes/whatnot.
What tools like `cargo vendor` do is provide the guarantee that you don't
even need to run `cargo fetch` and such. The vendor directory created is
sufficient to suffice for all of Cargo's networking needs. You can find
some more info about this online at http://doc.crates.io/specifying-
dependencies.html as well.
As a final note, if you're specifically configuring CI here I'd recommend
either the `--frozen` or `--locked` flags to Cargo. Cargo typically
automatically updates `Cargo.lock` whenever you update `Cargo.toml`, for
example if `Cargo.lock` is pinned to libc 0.2.24 and then you update the
manifest to `libc = "0.2.25"` then Cargo will automatically update the
lock file. This is undesirable, however, for CI b/c you want the lock file
updated for review, so the `--locked` flag to Cargo says "generate an
error if the lock file needs to be updated".
The `--frozen` flag is a superset of the `--locked` flag where it also
tells Cargo to generate an error if it otherwise would hit the network.
This is a way of saying "I assert that Cargo shouldn't touch the network"
and is often useful for debugging offline builds.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22830#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list