This commit adds a test called `shebang`, which checks if all shebangs
in scripts use relative paths through `#/usr/bin/env`, rather than
absolute paths, such as `#/bin/bash`.
See 833b10575b.
This is a fair amount of manual work to keep in sync. I would like to
disable this, at least as a mandatory check, for now.
Fixes#601 (the request for it to become non-blocking).
The underlying issue is #581 and remains open.
Co-authored-by: trinity-1686a <trinity@deuxfleurs.fr>
This logic is a bit tricky, so I've tried to document it and add
fairly good tests. The silver lining is that the external API for
all of this logic will make it invisible and hidden.
There are some cases where I added functions that I think might
eventually get lowered into MdConsensus: But I don't want to lower
too much right now, since the convention for our netdoc accessors is
that they are fairly unsophisticated, and they show you the document
as it is.
Closes#686
These are deliberately unsophisticated accessors, in that they return Option<>
rather than filling in missing values with the documented
fallbacks. It seems better to leave a way to distinguish the absent
case in the API.
This commit replaces all occurrences of `llvm-tools-preview` with
`llvm-tools`, because it became a stable feature with Rust 1.60, thereby
making the `-preview` prefix obsolete. Beside this, `llvm-tools-preview`
is a redirection to the latter one anyway.
However, it does not work the other way around. At the moment, it is not
possible to execute the `maint/coverage` script on a NixOS system,
because the rustup component list only includes `llvm-tools`, but not
`llvm-tools-preview`, thereby making this change necessary.
Clippy now complains about `let _ = (expr_producing_a_future);`,
which is probably smart, since maybe you wanted to await that future
and ignore the result. So it seems that the right way to get rid of
an unwanted Receiver is now to drop it explicitly.
Closes#749
This warning kind of snuck up on us! (See #748) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes#748.
This required rewriting some of our error handling code in
command-line processing, since the toml crate now displays and
reports errors differently. (Admittedly, this code still is kind of
ugly, but at least it is nicely hidden.)
It turns out that the credential is only calculated as an
intermediate result in order to blind keys and produce the
subcredential. As such, it has no need to leave the hscrypto module.
This commit changes the shebang in all shell scripts from absolute
paths (such as `/bin/bash` or `/usr/bin/python3`) to the `/usr/bin/env`
binary with the accompanying interpreter as it's argument.
The reason for this are as follows:
- NixOS cannot work with absolute paths
- BSD systems install their packages in /usr/local/bin
Previously, the offset was set to 12 hours unconditionally (like the
spec says). But based on a conversation on tor-dev, it seems that
the offset should actually be 12 times the voting interval.
I'm also opening an MR to change the spec.