Commit Graph

3524 Commits

Author SHA1 Message Date
Ian Jackson 32e4baa4c4 arti: Demote itertools back to dev-dependency 2022-05-31 15:45:07 +01:00
Ian Jackson fe9fb6b6ee arti config: Check that example config is exhaustive
This is the final piece of #457.
2022-05-30 16:03:01 +01:00
Ian Jackson 0a324f843f mistrust: Canonicalise prefix from Some("") to None
This allows us to add the proper default example to the arti example
config file.
2022-05-30 16:00:45 +01:00
Ian Jackson ca60859dff arti: config: Canonicalise ports, and provide example dns_port
Now the validated configuration will never be `Some(0)`, even if that
is what was written in the config file.  The arti CLI parser can still
produce this, so we don't touch the code that actually uses this.

(Without the canonicalisation the default builder produces `None` for
the `dns_port`, but the example would produce `Some(0)`, which is
semantically identical but fails the test.)

See https://gitlab.torproject.org/tpo/core/arti/-/issues/488 for some
background.
2022-05-30 16:00:45 +01:00
Ian Jackson fbfaecdf72 config: Provide tor_config::resolve_option and resolve journald
Canonicalise the `logging.journald` setting in the validated
configuration.  Now it will never be `Some("")`, even if that is what
was written in the config file.

This allows us to write `journald = ""` in the example configuration.
(Without the canonicalisation the default builder produces `None` and
the example would produce `Some("")`, which are semantically identical
but fail the test.)

See https://gitlab.torproject.org/tpo/core/arti/-/issues/488 for some
background.
2022-05-30 16:00:45 +01:00
Ian Jackson fb54b5b032 arti: config example: Add entries for tor_network fields
These weren't previously discussed.  It's not practical or useful to
show the actual default values here.
2022-05-30 16:00:45 +01:00
Ian Jackson 116b6c30e0 arti: config example: Add some missing defaults
Found by my forthcoming test.
2022-05-30 16:00:45 +01:00
Ian Jackson d365d73889 arti: example config: Arrange to uncomment logfiles
This makes the config default parser see just "[ ]", an empty list,
which is indeed the default.
2022-05-30 16:00:45 +01:00
Ian Jackson b88c1c1093 tor-config: Drop Serialize and Deserialize from a test type
These violate our rule that *built* structs ought not to be desr.
But this is just in a test.
2022-05-30 16:00:45 +01:00
Ian Jackson c8d5681ff1 arti: Make ProxyConfig no longer Deserialize
That this remained was an oversight.
2022-05-30 16:00:45 +01:00
Ian Jackson e0d9d24348 arti: cfg: Actually uncomment *all* the things in the example 2022-05-30 16:00:45 +01:00
Ian Jackson 017906cdc7 tor-dirmgr: Fix DirSkewTolerance
This was upposed to be one day, I presume!

Also complete a truncated sentence in the docs.
2022-05-30 16:00:45 +01:00
Ian Jackson 5824992471 Merge branch 'post-release-fix-20220527' into 'main'
Fix minor issues found while publishing crates for Arti 0.4.0

See merge request tpo/core/arti!547
2022-05-30 14:57:49 +00:00
Ian Jackson ea80f124ff Merge branch 'bug487' into 'main'
fs-mistrust: add getegid() to getgrouplist() output.

Closes #487

See merge request tpo/core/arti!548
2022-05-30 14:56:49 +00:00
Ian Jackson 064521dcf2 Merge branch 'arti-cfg-tests' into 'main'
add unit tests for ArtiConfig public functions

See merge request tpo/core/arti!551
2022-05-30 14:23:11 +00:00
Ian Jackson aa5e647bd2 Merge branch 'chore/integrate_cargo_sort' into 'main'
Lexically sort Cargo.toml dependencies

Closes #490

See merge request tpo/core/arti!549
2022-05-30 14:19:19 +00:00
Ian Jackson 573d12363b Merge branch 'per_crate_semver' into 'main'
Update semver_status.md with new procedure.

See merge request tpo/core/arti!545
2022-05-30 13:47:05 +00:00
Ian Jackson 5327059775 Merge branch 'mistrust_osstring_limitation' into 'main'
fs-mistrust: Document problems with non-UTF8 OsString in toml

See merge request tpo/core/arti!538
2022-05-30 09:54:10 +00:00
Ian Jackson c3de4f338b Merge branch 'dns-dedup' into 'main'
deduplicate dns requests based on transaction id

Closes #411

See merge request tpo/core/arti!535
2022-05-30 09:52:11 +00:00
trinity-1686a 266b278c74 deduplicate dns requests based on transaction id 2022-05-30 09:52:11 +00:00
michael mccune db6842f666 add unit tests for ArtiConfig public functions
this change adds some simple tests for the ArtiConfig public getter
functions to help expand coverage in this crate.
2022-05-28 20:41:31 -04:00
Orhun Parmaksız bfd41ddb5f
Lexically sort Cargo.toml dependencies
Utilize cargo-sort: https://github.com/DevinR528/cargo-sort

Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-05-28 20:05:51 +03:00
Nick Mathewson a58eaa2893 fs-mistrust: add getegid() to getgrouplist() output.
This fixes a unit test failure in weird environments (like some
containers) where the current effective GID is not included in the
list of current groups.

Closes #487.

Bug reported by @sjm217.
2022-05-27 14:14:29 -04:00
Nick Mathewson 5b1622c283 tor-rtcompat: Fix a warning when building with no backends.
Cargo publish (and probably nobody else!) builds this crate with no
features enabled.  When you do that, you get a warning about an
unused `use std::io`.

Fixing that.
2022-05-27 14:07:06 -04:00
Nick Mathewson 9d36925700 Move tor-error crate to the "rust-patterns" category.
There is no "tor" category; crates.io warned about this.
2022-05-27 14:02:17 -04:00
Nick Mathewson 75f968017d Merge branch 'macro' into 'main'
Suppress new "unused_macro_rules" lint in one place

See merge request tpo/core/arti!544
2022-05-27 17:20:13 +00:00
Ian Jackson 0173fce2e9 tor-netdoc: Allow suppressing unknown lints
We want to supress the unused_macro_rules lint in one place but it's
new in Nightly and this triggers yet another lint.
2022-05-27 17:36:54 +01:00
Ian Jackson 1f067c0237 tor-netdoc: Suppress new "unused_macro_rules" lint in one place
The compiler can apparently tell that we aren't generating compile
errors!  Also that we're not yet using a feature provided here.

(New lint in currently Nightly.)
2022-05-27 17:36:52 +01:00
Nick Mathewson c9552220dc Update semver_status.md with new procedure.
Now (per discussion on #471) we use one file per crate.

I've tried to be more explicit about the format to use, and what to
add when.
2022-05-27 11:55:29 -04:00
Nick Mathewson ed518c5a2b Merge branch 'fix-coverage-help' into 'main'
Fix "coverage -h" command

See merge request tpo/core/arti!539
2022-05-27 15:41:56 +00:00
Nick Mathewson c5e9b81374 Merge branch 'bench-default-chutney' into 'main'
add default chutney path to arti-bench script

See merge request tpo/core/arti!541
2022-05-27 15:41:11 +00:00
Nick Mathewson 4f7e06fe17 Clear out 0.4.0 semver-status 2022-05-27 11:36:33 -04:00
Nick Mathewson 4326aa1de9 Regenerate version bump from previous commit.
This commit was made by reverting the previous commit, then
re-running the script I used to generate it.  In theory there should
be no semantic changes: only changes due to improved formatting from
cargo edit.
2022-05-27 10:18:52 -04:00
Nick Mathewson b232365a75 Semantic version changes for Arti 0.4.0 release
I followed the following procedure to make these changes:

* I used maint/changed_crates to find out which crates had changed
  since 0.3.0.
* I used grep and maint/list_crates to sort those crates in
  topological (dependency) order.
* I looked through semver_status to find which crates were listed as
  having semver-relevant changes (new APIs and breaking changes).
* I scanned through the git logs of the crates with no
  semver-relevant changes listed to confirm that, indeed, they had
  no changes.  For those crates, I incremented their patch-level
  version _without_ changing the version that other crates depend on.
* I scanned through the git logs of the crates with no
  semver-relevant changes listed to confirm that, indeed, they had
  no obvious breaking changes.
* I treated all crates that depend on `arti` and/or `arti-client` as
  having breaking changes.
* I identified crates that depend on crates that have changed, even
  if they have not changed themselves, and identified them as having
  a non-breaking change.
* For all of the crates, I used `cargo set-version -p $CRATE --bump
  $STATUS` (where `STATUS` is `patch` or `minor`) to update the
  versions, and the depended-upon versions.
2022-05-27 09:01:20 -04:00
Nick Mathewson 45d21d2520 Bump versions of trivially-changed crates.
These crates had only clippy fixes that do not affect their
behavior:
        tor-bytes
        tor-cell
        tor-events
        tor-linkspec
        tor-netdir
        tor-socksproto

This crate only had the cargo-husky dependency removed, which
does not affect compatibility:
        tor-llcrypto

Since these changes have no compatibility effects, it is not
necessary to bump the versions of these crates which other crates
depend on.
2022-05-27 08:52:44 -04:00
Nick Mathewson fbc5218af6 Update tor-config README.md. 2022-05-27 08:34:52 -04:00
Nick Mathewson f17c9083da Run "cargo update" in preparation for release 2022-05-27 08:30:27 -04:00
Nick Mathewson 4282a1f070 Light edits to changelog. 2022-05-27 08:23:41 -04:00
Nick Mathewson b4a87687f5 Fix a link with nightly rustdoc 2022-05-26 15:40:39 -04:00
trinity-1686a 0dccb567be add default chutney path to arti-bench script 2022-05-26 21:09:06 +02:00
Nick Mathewson eae8e25c4b CHANGELOG: add a blurb. 2022-05-26 14:45:51 -04:00
Nick Mathewson 445978f608 CHANGELOG: Acknowledgments and links 2022-05-26 14:42:55 -04:00
Nick Mathewson 2c0641dd0c Add new entries to changelog. 2022-05-26 14:34:11 -04:00
Steven Murdoch 235fd78602 Fix "coverage -h" command
$SCRIPT_NAME is not defined so causes an error. Use $(basename "$0") instead.
2022-05-26 15:12:36 +00:00
Nick Mathewson 487742ea3d fs-mistrust: Document problems with non-UTF8 OsString in toml
It turns out that the `toml` crate can't handle OsString, since
`toml` doesn't support serialize_newtype_variant, and the `serde`
crate tries to serialize OsString using that method.

In this commit we document that limitation, and test that we can at
least round-trip through json.

Found by inspecting test coverage.
2022-05-26 10:36:35 -04:00
Nick Mathewson ae08a023fb Merge branch 'tests-20220525' into 'main'
Add a few coverage-driven tests

See merge request tpo/core/arti!536
2022-05-26 14:35:32 +00:00
Nick Mathewson c33a9d1f4e Remove some stray dbg!() calls. 2022-05-26 09:59:48 -04:00
Nick Mathewson fda33323bf Merge branch 'link-to-coverage' into 'main'
add link to coverage reports

Closes #251

See merge request tpo/core/arti!537
2022-05-26 13:02:35 +00:00
Nick Mathewson 68b0419752 Merge branch 'standardise-shell' into 'main'
Standardise shell

Closes #425

See merge request tpo/core/arti!533
2022-05-26 12:53:14 +00:00
trinity-1686a f5c2974a65 add link to coverage reports 2022-05-26 13:14:00 +02:00