Autor: anonym Datum: To: The Tails public development discussion list Betreff: Re: [Tails-dev] Debian 9: Build fails consistently,
name resolution fails sooner or later
Arnaud: >
>
> On 04/04/2017 12:45 PM, anonym wrote:
>> I don't know what you mean with "Tor download" -- the build system itself doesn't run or use tor.
>
> I was talking about the tor browser that is downloaded in
> `config/chroot_local-hooks/10-tbb`, through a series of `curl` commands.
> This part takes forever to complete. I didn't notice that it was cached
> as well.
>
>> Any way, the "offline" option is supposed to enable a true offline building mode, and if a build fails due to lack of Internet access, that is a bug. It relies on all interactions with the Internet being done with applications that respect the http_proxy environment variable (which points to apt-cacher-ng, which is configured to allow downloading and caching more than just .deb:s). Specifically, `wget` respects http_proxy, and apparently so do all the various mechanisms used to fetch firmwares and other files in the post-install scripts of all .deb:s Tails uses.
>
> Ok, I guess I just have to try it, I'll see how it goes and will let you
> know if anything bad happens.
>
>> If you know C, perhaps you'd want to look into implementing (optional) download retrying in apt-cacher-ng? That would, of course, be the best solution.
>
> I'm comfortable with C, but not comfortable at all with these network
> and proxy things ;) But it's nice that you point me in the right
> direction. At least I know where to look next.
[Sorry, it's apparently C++!]
An additional pointer would be to look at `source/dlconn.cc` and the logic around the `MAX_RETRY` constant and `nLostConTolerance` variable. I doubt being able to increase that value of `MAX_RETRY` is what we want, since it seems to be about global failures and not per file, but I think the code around it will give some insights on how to get per-file retries. But I might be way off, I barely looked at the logic, just variable names. :)
(OTOH I guess it'd be an interesting experiment, as a first step, for you to compile apt-cacher-ng with `MAX_RETRY` set to some crazy high value like 1000 or something, and see if that improves reliability for you.)