[tor-bugs] #27091 [Core Tor/Tor]: Configure jenkins with CARGO_HOME in a writeable directory

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Aug 13 21:32:45 UTC 2018


#27091: Configure jenkins with CARGO_HOME in a writeable directory
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_information
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  032-backport, 033-backport,          |  Actual Points:
  034-backport                                   |
Parent ID:  #24629                               |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by Hello71):

 Replying to [comment:2 teor]:
 > We should do whatever other Rust packages do.

 As I said in #26038, "I think most C+Rust projects still use the global
 cache. I tried searching GitHub
 (​https://github.com/search?q=%22CARGO_HOME%22+extension%3Aam&type=Code).
 I found that tor is the only project that does not. for users who do not
 care, using the global cache will save download time and bandwidth on
 repeat builds, and for those who do care, my patch prints a warning so
 they will know. (maybe it should be downgraded to NOTICE?)". (fwiw, I
 checked librsvg just now and found that they override CARGO_HOME only for
 gitlab-ci builds)

 > If there's no clear answer, I suggest that we make the build directory
 CARGO_HOME if:
 > * CARGO_HOME is unset or not writeable, and
 > * HOME is unset or not writeable

 I think this sounds acceptable, but indicates a broken build environment.
 I know Gentoo sets HOME to a private temporary directory for each package
 build. I believe all of the presently used standardized Debian build
 scripts do so as well.

 Replying to [comment:4 catalyst]:
 > If we build in offline mode, does cargo need to write to `CARGO_HOME` or
 `HOME` at all?

 Not as far as I know. I believe Cargo presently stores only configuration,
 registry information, and package source in CARGO_HOME. The first one is
 manually created by the user (another solid reason to not override
 CARGO_HOME now that I think about it), and the other two are vendored.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27091#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list