Commit Graph

19 Commits

Author SHA1 Message Date
Micah Elizabeth Scott 61bf60d177 check_licenses: Whitelist for crates that may use LGPL-3.0-only
Narrows the previous check, allowing this particular LGPL
only for the hashx and equix crates.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-07-27 13:23:26 -07:00
Micah Elizabeth Scott fdba82100f equix, hashx: Prepare for an initial LGPL release
This replaces the 'TODO' marker from earlier commits, using tevador's
copyright and license (LGPL 3.0 only) for the hashx and equix crates.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-07-27 07:20:14 -07:00
Micah Elizabeth Scott a8756f2bce Reimplement HashX in Rust
This is a new pure Rust implementation of the HashX algorithm
designed by tevador for Tor's onion service proof of work puzzle v1.

HashX is a lightweight family of randomly generated hash functions.
A seed, via blake2 and siphash, drives a program generation model
which randomly selects opcodes and registers while following some
constraints that avoid timing stalls or insufficient hash mixing.

The execution of these hash funcions can be done using a pure Rust
interpreter, or about 20x faster using a very simple just in time
compiler based on the dynasm assembler crate. This has been
implemented for x86_64 and aarch64.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-07-27 07:20:06 -07:00
Nick Mathewson e5fa42e1c7 maint/check_license: Make MPL-2.0 into an allow-list
Previously we allowed this license unconditionally.  But because of its
non-self-enacting nature, we need the actual notice from its "exhibit A"
to appear somewhere that says that it applies to all the relevant code.

Therefore, we shouldn't take new MPL-2.0 dependencies without
hand-checking them.  (I am tentatively allowing option-ext, though,
since we already have an indirect dependency on that crate via
`directories`.)

For more info, see https://gitlab.torproject.org/tpo/core/arti/-/issues/845
2023-05-23 13:51:51 -04:00
trinity-1686a 6d25a81a01 allow rustls-webpki license 2023-05-08 18:22:43 +02:00
Nick Mathewson 6cfc387f14 check-licenses: Permit MPL-2.0
The generational-arena crate is distributed under MPL-2.0,
so we need to allow it.

I believe that this license is fine and does not interfere with
our code or our users; the reviewer should double-check.
2023-05-04 10:35:05 -04:00
Ian Jackson df79d407d9 maint/check_licensse: Placate shellcheck
There's nothing wrong with the previous idiom since it's a trusted
variable, but whatever.
2023-02-24 17:27:43 +00:00
Ian Jackson 4756ad6e57 maint/check_licensse: Approve Zlib licence
This is a very permissive BSD/MIT-like licence.  I have reviewed the
licence text and it is inoffensive.

I want this for slotmap, in !1034
2023-02-24 17:14:27 +00:00
Ian Jackson 7068f237f7 maint/check_licensse: Honour CARGO variable
Even if it contains spaces.
2023-02-24 17:14:27 +00:00
Ian Jackson 745336fac5 maint/check_licensse: Do not discard actual error
This confused me while I was debugging the interaction with nailing-cargo.
2023-02-24 17:14:27 +00: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
Nick Mathewson 167408050f check_licenses: List license for tinystr 2022-08-30 20:09:19 -04: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
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
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
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
Ian Jackson 9aefbf4227 rename *.sh scripts to bare name
As per #309

Update all references.  There is one remaining hit for
  git-grep '\.sh\b'
namely "build.sh" in maint/reproducible_build, which I think is
the build script for osxcross - ie, an external project.
2022-02-18 11:46:06 +00:00