Nick Mathewson
7feda22444
tor-cell: documentation cleanups related to restricted_msg
2023-02-07 16:03:14 -05:00
Emil Engler
53bf3492e8
maint: add shebang
...
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
.
2023-01-26 21:04:34 +01:00
Emil Engler
54f549dd53
maint: replace llvm-tools-preview with llvm-tools
...
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.
2023-01-27 15:56:09 +01:00
Nick Mathewson
a6dd92843e
Allow clippy::unchecked_duration_subtraction in tests
...
This panics on error, and we're fine with a panic on misbehavior in
tests.
2023-01-27 08:28:02 -05:00
Nick Mathewson
bf04641c68
Disable clippy::unlinlined-format-args
...
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 .
2023-01-27 08:27:47 -05:00
Emil Engler
833b10575b
maint: update shellcheck_all with /usr/bin/env
...
This commit updates the shellcheck_all script, in order to look for
/usr/bin/env, instead of /bin.
2023-01-25 18:43:14 +01:00
Emil Engler
79097484de
shell: use /usr/bin/env instead of absolute paths
...
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
2023-01-25 18:35:53 +01:00
Ian Jackson
a8fda4b0cd
test lint blocks: Add ad hoc script for adding them
2022-12-12 18:00:26 +00:00
Ian Jackson
879c4cdbf3
Merge branch 'shadow-bridge' into 'main'
...
Test vanilla bridge in shadow
See merge request tpo/core/arti!915
2022-12-12 11:41:05 +00:00
Dimitris Apostolou
7c1beb6171
Fix typos
2022-12-09 11:57:36 +02:00
trinity-1686a
18a12d3feb
put ci log span magic strings in a dedicated script
2022-12-05 18:41:23 +01:00
Ian Jackson
b6a4f2388d
CI: test that we can compile, and test cfg, with/without bridges/PTs
2022-11-29 17:52:12 +00:00
trinity-1686a
3d5d4ada01
use newer version of zstd and lzma
2022-11-29 12:54:25 +01:00
Ian Jackson
fbd4b88044
Merge branch 'test-config' into 'main'
...
tor-guardmgr: Fix visibility of TestConfig with no features enabled
See merge request tpo/core/arti!875
2022-11-23 17:51:05 +00:00
Nick Mathewson
4c5a88c925
Merge branch 'matrix-test' into 'main'
...
maint/matrix_test: Print what command we are running!
See merge request tpo/core/arti!879
2022-11-23 17:50:30 +00:00
Ian Jackson
639cc23da3
Ignore atty theoretical unaligned read for now
2022-11-22 12:54:21 +00:00
Ian Jackson
a171f51c1a
maint/matrix_test: Print what command we are running!
2022-11-21 15:47:08 +00:00
Ian Jackson
d6f567b8ef
fixup! tor-guardmgr: Fix visibility of TestConfig with no features enabled
2022-11-18 16:40:28 +00:00
trinity-1686a
614cf34284
Check more targets
2022-11-10 13:34:17 +00:00
Gabriel de Perthuis
bc08ea48f7
Upgrade to clap 3 with minimal changes
...
This removes the last cargo audit override (for the unmaintained
ansi_term).
Don't mark options as required when they have default values:
see <https://github.com/clap-rs/clap/pull/3793 >.
2022-11-04 19:28:38 +01:00
Ian Jackson
53905f3e1a
docs features: Add a suppression for testing
2022-11-03 15:51:45 +00:00
Nick Mathewson
e4ca2459db
add_warnings: ignore clippy::result_large_err
...
This is a temporary workaround for #587 until we get it fixed for
real.
2022-11-03 11:05:14 -04:00
Nick Mathewson
0cb886a098
add_warnings: work with more non-GNU finds.
...
We were doing `find -name '*.rs'`, but `find . -name '*.rs'` (with the .)
is more standard.
2022-11-03 11:03:43 -04:00
trinity-1686a
dd5aa3ea38
cleanup target dir on job completion
2022-10-21 18:10:39 +00:00
Nick Mathewson
e0c1928ea0
Merge branch 'matrix-features' into 'main'
...
add checks for many feature combinations
Closes #303
See merge request tpo/core/arti!775
2022-10-21 12:57:36 +00:00
Nick Mathewson
938af98b8c
Remove now-needless check_doc_features exception.
2022-10-20 12:37:41 -04:00
trinity-1686a
3200870079
fix doc-feature synchro
2022-10-16 21:02:10 +02:00
trinity-1686a
53016a005b
add test for many features
...
and fix issue compiling tor-rtcompat with on ssl runtime
2022-10-16 21:02:10 +02:00
Ian Jackson
881f6edd9f
Abolish maint/readmes
...
This is not needed any more
2022-10-12 15:29:04 +01:00
Ian Jackson
82ad9eea5f
Allow "clippy::single_char_pattern" in tests.
...
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
2022-10-12 13:50:29 +01:00
Ian Jackson
9705ef3fea
Merge branch 'bridge-parse' into 'main'
...
Parse (and format) bridge lines
See merge request tpo/core/arti!745
2022-10-03 20:13:02 +00:00
Ian Jackson
b67b5ac536
pt: Make PtTarget::push_setting fallible, and take Into
...
It has its own error type PtTargetInvalidSetting.
In check_doc_features, adjust suppression to new code.
2022-10-03 20:45:54 +01:00
Nick Mathewson
6ed2e0c377
Script to list current version of every crate.
2022-10-03 11:23:30 -04:00
Nick Mathewson
a506f020b2
changed_crates: output crates in toposort order.
2022-10-03 08:47:07 -04:00
Ian Jackson
9b55cc012e
pt: Try to fix docsrs problem
2022-09-27 17:29:38 +01:00
Nick Mathewson
141afbbf61
Rename various Transport* types to Pt*.
...
This clarifies that the types apply to pluggable transports only,
and not (typically) to the default plain-old-TCP transport.
2022-09-23 14:08:53 -04:00
Nick Mathewson
cf135ad3eb
New data types to describe transport targets.
...
I've tried to name and structure these for consistency, and
comment reasonably well. We'll still probably want to make changes.
2022-09-23 14:08:24 -04:00
Ian Jackson
a4cf8bf577
maint/docker_reproducible_build: Bump image here too
2022-09-06 13:53:11 +01:00
Ian Jackson
3e15d54f64
maint/reproducible_build: Pass --locked to cargo build
...
We don't want any updates!
2022-09-06 13:53:11 +01:00
Ian Jackson
82fee7a8d6
maint/reproducible_build: Honour $CARGO
...
This makes it easier to test, and perform other kinds of stunts.
2022-09-06 13:53:11 +01:00
Ian Jackson
ecf7723344
maint/reproducible_build: Centralise -p arti --features etc.
2022-09-06 13:53:11 +01:00
Ian Jackson
2fe613647a
maint/reproducible_build: Bring "cargo build" invocations together
2022-09-06 13:53:11 +01:00
trinity-1686a
e1e3f912b3
update to v5.0.0
2022-08-31 19:08:06 +02:00
Nick Mathewson
167408050f
check_licenses: List license for tinystr
2022-08-30 20:09:19 -04:00
trinity-1686a
ef162655af
switch from awk to python
2022-08-24 18:22:41 +02:00
trinity-1686a
426a59b2ba
add feature annotation not added by doc_auto_cfg
2022-08-24 18:22:41 +02:00
Ian Jackson
eb93e05552
maint/cargo_audit: Tolerate RUSTSEC-2021-0139 (ansi_term unmaintained)
2022-08-22 10:37:00 +01:00
Ian Jackson
ff962e5109
maint/cargo_audit: Honour $CARGO
...
This makes it easier to for me to test this script. (I would like to
do this to all of them but it's easier on a case-by-case basis.)
2022-08-22 10:36:53 +01:00
FAMASoon
4cfdeca0f1
format python script in maint
2022-08-17 02:15:35 +09:00
trinity-1686a
2339f637c5
fix error running check_licenses
...
--version was removed in a recent update
we use that to detected whether cargo-license is installed,
now use --help instead
2022-08-13 09:02:17 +02:00
FAMASoon
817b811560
Delete unused Enum and fileinput in maint file
2022-08-04 22:58:58 +09:00
Nick Mathewson
dfdcc97858
Several typo fixes from `typos`.
2022-07-27 10:12:32 -04:00
Nick Mathewson
275c98940a
Teach check_licenses to accept license on `unicode-ident`.
...
The license there is `(MIT OR Apache-2.0) AND Unicode-DFS-2016`,
which fine, but the existing shell script doesn't actually handle
"AND" correctly. This commit adds a workaround for licenses that
are "AND", and some comments about weaknesses in our (lack of)
boolean expression parsing.
This should fix CI.
2022-07-20 09:40:12 -04:00
eta
c2e2da5dc3
Update `rsa` dependency (and use `x25519-dalek` prerelease)
...
- arti#448 and arti!607 highlight an issue with upgrading `rsa`: namely,
the `x25519-dalek` version previously used has a hard dependency on
`zeroize` 1.3, which creates a dependency conflict.
- However, `x25519-dalek` version `2.0.0-pre.1` relaxes this dependency.
Reviewing the changelogs, it doesn't look like that version is
substantially different from the current one at all, so it should be
safe to use despite the "prerelease" tag.
- The new `x25519-dalek` version also bumps `rand_core`, which means we
don't have to use the RNG compat wrapper in `tor-llcrypto` as much.
closes arti#448
2022-07-06 14:57:45 +01:00
Ian Jackson
b7c03943f1
maint/add_warning: Fix parsing of --check
...
Previously this would eat the first filename!
2022-06-24 14:23:38 +01:00
Ian Jackson
23c352b96b
clippy: Consolidate many lints in maint/add_warning
...
Found these by disabling the nightly dbg macro special case. Now, we
have a mechanism for globally adding suppressions to tests, we can use
that instead.
2022-06-24 14:23:38 +01:00
Ian Jackson
bebf013bef
maint/add_warning: Add two lints via add_warning as a test case
2022-06-24 14:23:38 +01:00
Ian Jackson
72515abf91
maint/add_warning: Add ability maintain test lint blocks
2022-06-24 14:23:38 +01:00
Ian Jackson
76ff330610
maint/add_warning: Scan all files by default, but insist only in some
...
This will allow us to have add_warning manage test lint blocks.
We have to stop printing all the filenames because there are too
many. Filenames still come out on error of course.
2022-06-24 14:23:34 +01:00
Ian Jackson
13e27919c5
clippy: Supresss clippy::significant_drop_in_scrutinee
...
As per the linked discussion.
2022-06-23 19:14:54 +01:00
Ian Jackson
28dea73523
lints: Scheme for allowing us to name nightly lints
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/501
2022-06-23 19:14:11 +01:00
Nick Mathewson
bf15abbb97
Avoid matching crate names by prefix.
2022-06-17 08:41:38 -04:00
Nick Mathewson
677f1b8af0
Update check_tree to better detect errors in cargo-tree.
2022-06-16 16:13:11 -04:00
Nick Mathewson
c16b32f1d4
Add script and CI to make sure `ring` doesn't show up in arti/full
...
See arti#493.
2022-06-16 09:00:59 -04:00
Ian Jackson
86c4f42c49
CI: Break out maint/via-cargo-install
2022-06-08 19:32:59 +01:00
Ian Jackson
d00ba995be
maint/cargo_sort: Tolerate toplevel Cargo.toml not being sorted
2022-06-08 18:27:45 +01:00
Ian Jackson
ba016053de
maint/toposort: Make shebang be python3, not python
...
Otherwise it doesn't work on sane systems where /usr/bin/python is
never an incompatible version from previously.
2022-06-08 17:17:20 +01:00
Ian Jackson
6f96736278
Merge branch 'check-license-fixes' into 'main'
...
Update check_licenses and add it to CI.
Closes #462
See merge request tpo/core/arti!559
2022-06-02 13:59:35 +00:00
Ian Jackson
2730bed5bd
maint/add_warning: Convert remaining asserts
2022-05-31 19:16:09 +01:00
Ian Jackson
6c52fa675b
maint/add_warning: Introduce ImproperFile and convert one assert
2022-05-31 19:14:19 +01:00
Ian Jackson
7e96664140
maint/add_warning: Use python3 argparse
2022-05-31 19:03:38 +01:00
Nick Mathewson
842e6a697d
check_licenses: list new crates with manual license verification
...
Closes #462 .
Note that the license on `ring` is slightly problematic for some
users, including as it does old the openssl license[^1], with
advertising clause and all. That's not a blocker for us now, since
`ring` is not a required dependency. But we wouldn't want `ring` to
become a mandatory dependency because of this.
[^1]: To make the situation even more complicated, modern openssl
has relicensed under apache-2.0, but that doesn't necessarily
help us, since ring took its code from boringssll, which
forked from an older version of openssl.
2022-05-31 13:58:40 -04:00
Ian Jackson
47a10fa84c
maint/add_warning: Add "how to fix" to error message
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/557#note_2808879
2022-05-31 18:54:08 +01:00
Ian Jackson
89b4a59048
maint/add_warning: Provide --check mode
2022-05-31 18:54:08 +01:00
Ian Jackson
c2939b5f74
maint/add_warning: Change shebang to python3
...
"python" sometimes means Python 2.
2022-05-31 18:53:49 +01:00
Ian Jackson
00f82a7f4d
maint/add_warning: Use .tmp~ for temp filename, not .bak
...
"bak" ought to be a backup file, with the old contents, which this
most definitely isn't.
2022-05-31 18:53:47 +01:00
Ian Jackson
2814fd99c1
lints: Add let_unit_value allow to add_warning
...
add_warning can now add allows. This one was agreed in some other MR
for one crate. Allow it everywhere.
2022-05-31 14:52:09 +01:00
Ian Jackson
a8f3423107
lints: Add two missing ones to add_warning
...
These were in some crates, but not all. Put them in add_warning
where they will propagate everywhere.
2022-05-31 14:52:09 +01:00
Ian Jackson
47a209fb31
lints: maint/add_warning: New marker-based mode
...
We don't process the in-script lint block, just paste it in, now.
This is less complicated.
This reverts/replaces
"maint/add_warnings: Make it add the markers for its future self"
2022-05-31 13:00:31 +01:00
Ian Jackson
3ae7244f91
maint/add_warnings: Make it add the markers for its future self
...
We'll run this in a moment. Then we'll revert it.
2022-05-31 13:00:31 +01:00
Ian Jackson
ea5caf9ac2
lints: maint/add_warning: Improve ordering
...
The crates we have aren't consistent. But changing this means the
deltas resulting from the script are smaller.
2022-05-31 13:00:31 +01:00
Ian Jackson
a8331c588e
maint/add_warnings: Tidy up, and add some commentary
...
This puts the actually-used lint list at the top.
No functional change.
2022-05-31 13:00:31 +01: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
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
trinity-1686a
545313a899
fix docker_reproducible_build not passing its parameters properly
2022-05-26 09:44:06 +02:00
trinity-1686a
0f14847023
update comments in coverage_fuzz_corpora
2022-05-25 22:29:04 +02:00
trinity-1686a
8eb843f2af
make almost all scripts use bash and set euo pipefail
2022-05-25 22:25:58 +02:00
eta
6fc7a864c7
Remove cargo-husky, and replace with manual instructions
...
A build script reaching into your .git/hooks/ and modifying them
nonconsensually was a bit of a horrifying concept, and also made it hard
to build arti with the feature disabled. Remove this crate, and replace
it with manual instructions on how to install the hooks in
CONTRIBUTING.md.
2022-05-10 13:36:49 +01:00
trinity-1686a
3464cae490
use true instead of /bin/true
...
see https://gitlab.torproject.org/tpo/core/arti/-/issues/400#note_2800763
2022-05-05 21:05:42 +02:00
trinity-1686a
5bd38ab6dc
generate aggregated coverage reports
2022-05-05 18:35:34 +02:00
eta
78ca87314c
Merge branch 'explain_downgrade' into 'main'
...
Add a comment explaining what downgrade_dependencies is for.
See merge request tpo/core/arti!480
2022-05-03 10:57:48 +00:00
trinity-1686a
0fea8535df
remove some unecessary crates from downgrade_dependencies
...
nix:0.4.2 is no longer a dependency
synstructure:0.12.0 is no longer required to build
2022-04-28 20:50:50 +02:00
Nick Mathewson
6fecbc721a
Add a comment explaining what downgrade_dependencies is for.
2022-04-28 14:23:50 -04:00
trinity-1686a
d1bd9e209f
update tls-api to 0.8.0
...
and remove corresponding RUSTSEC from ignored list
2022-04-28 17:43:32 +02:00
Nick Mathewson
0425de104c
downgrade_dependencies: Remove "quote" exception.
...
This is no longer necessary. :)
2022-04-26 12:16:22 -04:00
Ian Jackson
6da7a2e3e2
Use git source for derive_builder for now, for sub_builder feature
...
This commitid is the current head of my MR branch
https://github.com/colin-kiegel/rust-derive-builder/pull/253
https://github.com/ijackson/rust-derive-builder/tree/field-builder
Using the commitid prevents surprises if that branch is updated.
We will require this newer version of derive_builder. The version
will need to be bumped again later, assuming the upstream MR is merged
and upstream do a release containing the needed changes.
We will need the new version of not only `derive_builder_core` (the
main macro implementation) but also`derive_builder` for a new error
type.
2022-04-21 14:07:28 +01:00
Dimitris Apostolou
ea283584f5
Fix typos
2022-04-11 21:21:17 +03:00
Nick Mathewson
adb94f8047
Merge branch 'cargo-audit' into 'main'
...
fix maint/cargo_audit not propagating error and add temporary exceptions
See merge request tpo/core/arti!452
2022-04-08 15:55:05 +00:00
trinity-1686a
777eb8a5fc
fix maint/cargo_audit not propagating error and add temporary exceptions
2022-04-08 16:51:35 +02:00
trinity-1686a
7c4ad15fc3
use default toolchain from rustup instead of stable for coverage
...
using stable doesn't work for CI because a specific version like 1.60 is installed
2022-04-08 16:19:28 +02:00