Commit graph

458 commits

Author SHA1 Message Date
github-actions[bot]
71764ca62c
release: binstalk-types v0.6.1 (#1446)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-10-07 07:08:48 +00:00
github-actions[bot]
45518cb65e
release: detect-targets v0.1.13 (#1444)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-10-07 06:10:03 +00:00
github-actions[bot]
39d22510b6
release: simple-git v0.1.1 (#1445)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-10-07 06:09:58 +00:00
Jiahao XU
8e08c65946
Fix fallback to cargo-install: Use the default target unless user override (#1430)
* Fix fallback to `cargo-install`: Use the default target

which is guaranteed to work, instead of providing a custom `--target`
from `detect-targets`.

The one from `detect-targets` might report musl even if the `rustc`
reports gnu, since OSes like NixOS could use a custom glibc location
that prevent glibc binaries built for other OSes be run for them.

However, if we are compiling the crate and `rustc` defaults to glibc,
then it should be guaranteed to work.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Impl fn `DesiredTargets::get_initialized`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix fallback to `cargo-install`: Use user-provided override targets

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-30 00:22:21 +00:00
github-actions[bot]
4344148566
release: binstalk-downloader v0.9.1 (#1416)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-27 22:31:01 +00:00
github-actions[bot]
bf30d73f53
release: binstalk v0.17.0 (#1396)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 12:29:23 +00:00
github-actions[bot]
df74a0d4f6
release: detect-targets v0.1.12 (#1395)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 11:38:37 +00:00
github-actions[bot]
c8099a9d88
release: binstalk-registry v0.2.0 (#1393)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 10:48:42 +00:00
github-actions[bot]
029f767a27
release: binstalk-bins v0.2.0 (#1389)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 09:01:12 +00:00
github-actions[bot]
ac357069a3
release: binstalk-fetchers v0.2.0 (#1390)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 09:00:55 +00:00
github-actions[bot]
3388ab98b9
release: cargo-toml-workspace v2.0.0 (#1392)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 09:00:47 +00:00
github-actions[bot]
4ec44749f1
release: binstalk-downloader v0.9.0 (#1387)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 05:32:33 +00:00
github-actions[bot]
d39bb918df
release: binstalk-types v0.6.0 (#1384)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 02:31:02 +00:00
Tamir Duberstein
2db8e254bc
Investigate incorrect target detection (#1376)
* detect-targets: add debug tracing

See #1375.

* Add new feature `tracing` & `cli-tracing` to `detect-targets

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix clippy lints

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-23 10:45:44 +00:00
Félix Saparelli
680accd0d3
Check quickinstall signatures (#1382)
* Check quickinstall signatures

* e2e test

* We can no longer check presence of signing section early

* Improve UI a little
2023-09-23 08:35:49 +00:00
Félix Saparelli
32beba507b
Initial signing support (#1345)
* Add CLI options

* Add manifest types

* Thread signature policy through to fetchers

* Thread signing section through from metadata

* Implement signing validation

* Clippy

* Attempt testing

* Yes and

* Why

* fmt

* Update crates/bin/src/args.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/binstalk-fetchers/src/gh_crate_meta.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/bin/src/args.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/binstalk-fetchers/src/signing.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/binstalk-fetchers/src/signing.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/binstalk-fetchers/src/signing.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/binstalk-fetchers/src/signing.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* fixes

* Finish feature

* Document

* Include all fields in the signing.file template

* Readme document

* Review fixes

* Fail on non-utf8 sig

* Thank goodness for tests

* Run test in ci

* Add rsign2 commands

* Log utf8 error

* Update e2e-tests/signing.sh

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `e2e-tests/signing.sh` MacOS CI failure

Move the tls cert creation into `signing.sh` and sleep for 10s to wait
for https server to start.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Refactor e2e-tests-signing files

 - Use a tempdir generated by `mktemp` for all certificates-related
   files
 - Put other checked-in files into `e2e-tests/signing`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fixed `e2e-tests-signing` connection err in MacOS CI

Wait for server to start up by trying to connect to it.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `e2e-tests-signing` passing `-subj` to `openssl` on Windows

Use single quote instead of double quote to avoid automatic expansion
from bash

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix `e2e-tests-signing` waiting for server to startup

Remove `timeout` since it is not supported on MacOS.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Try to fix windows CI by setting `MSYS_NO_PATHCONV=1` on `openssl` cmds

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fixed `e2e-tests-signing` on windows

By using double `//` for the value passed to option `-subj`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fixed infinite loop in `signing/wait-for-server` on Windows

Pass `--ssl-revoke-best-effort` to prevent schannel from checking ssl
revocation status.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Add cap on retry attempt in `signing/wait-for-server.sh`

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Let `singing/server.py` print output to stderr

so that we can see the error message there.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix running `signing/server.py` on MacOS CI

use `python3` since macos-latest still has python2 installed and
`python` is a symlink to `python2` there.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-23 04:02:56 +00:00
github-actions[bot]
e4d4b15536
release: binstalk v0.16.1 (#1373)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 07:53:35 +00:00
github-actions[bot]
b2602b81fc
release: binstalk-registry v0.1.1 (#1372)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 06:57:16 +00:00
github-actions[bot]
3f3fdd565d
release: binstalk-fetchers v0.1.1 (#1370)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 06:04:55 +00:00
github-actions[bot]
53234e81ab
release: binstalk-downloader v0.8.0 (#1369)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 03:53:11 +00:00
github-actions[bot]
b78276c03e
release: detect-targets v0.1.11 (#1367)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 01:39:04 +00:00
Jiahao XU
3c5641610a
feat: Improve resolution logging and verbose logging (#1341)
* feat: Improve resolution logging

Fixed #1336

Log target of the pre-built binaries which will be installed.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Fix args parsing: `quiet` & `verbose` cannot be set at the same time

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* feat: Implies `--log-level debug` if `--verbose` is set

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-02 09:38:24 +00:00
Jiahao XU
e5567ae526
Fix clippy lint and format (#1328)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-25 08:53:50 +00:00
github-actions[bot]
d768b8c029
release: binstalk v0.16.0 (#1324)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-24 12:51:55 +00:00
github-actions[bot]
52b81aad2b
release: binstalk-fetchers v0.1.0 (#1322)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-24 10:24:07 +00:00
github-actions[bot]
0d90f515c1
release: binstalk-registry v0.1.0 (#1321)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-24 09:26:49 +00:00
github-actions[bot]
8a9fbfa502
release: binstalk-bins v0.1.0 (#1319)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-24 07:57:10 +00:00
github-actions[bot]
a440b0e4a2
release: simple-git v0.1.0 (#1318)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-24 05:29:13 +00:00
github-actions[bot]
94ac906caa
release: binstalk-downloader v0.7.1 (#1320)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-24 05:28:59 +00:00
Jiahao XU
6cc22b2c51
binstalk-fetchers: Add feature quickinstall (#1315)
Also fixed `package.metadata.docs.rs` for `binstalk-registry`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-24 00:05:27 +00:00
github-actions[bot]
382b32a380
release: cargo-toml-workspace v1.0.0 (#1306)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-19 04:51:04 +00:00
Jiahao XU
dc77a1ab93
Refactor: Extract new crate simple-git (#1304)
`binstalk-downloader` contains stuff about http(s) before the
git code is moved into it and now it becomes http and git.

While git indeed uses http stuff, which is why I decided to put
it into binstalk-downloader, it is more than just downloading
since it is stateful (can be cached locally and updated)
where as http is stateless.

Also `binstalk-downloader`'s codegen time now increases
dramatically and it also creates extra dependencies for
binstalk-fetchers, delaying its execution.

The git code also don't use anything from `binstalk-downloader`
at all, it makes sense to be an independent crate.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-19 01:08:55 +00:00
Jiahao XU
0f7828569a
Add error logging if achieve doesn't contain bin required (#1298)
* Add `error` logging if achieve doesn't contain bin required

So that users know that this is an upstream issue and will report to
upstream.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>

* Update crates/binstalk/src/ops/resolve.rs

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-16 23:13:21 +00:00
Jiahao XU
0c5a65fb35
Refactor: Extract new crate binstalk-bins (#1294)
To reduce `binstalk` codegen and enable reuse of it.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-15 21:48:42 +00:00
Jiahao XU
76c72469eb
Refactor: Extract new crate binstalk-fetchers (#1291)
To reduce `binstalk` codegen and enable better reuse.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-14 03:20:34 +00:00
Jiahao XU
623f7ff4ed
Refactor: Extract new crate binstalk-registry (#1289)
To speedup codegen of `binstalk` and enable it to be reused.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-13 07:16:53 +00:00
Jiahao XU
2375ba48b6
Refactor to reduce compilation time (#1284)
- Make `binstalk::bins` private.
 - Move mod `signal` into `crates/bin`
 - Make items in `crates/bin/src/lib.rs` private if possible to reduce
   its API generation time.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 14:25:41 +00:00
Jiahao XU
fbed317df5
feat: git::Repository cancellation support (#1288)
feat: `git::Repository` support cancellation.

To make sure users can cancel git operation via signal, e.g. when the
git operation fail or users no longer want to install.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 14:18:02 +00:00
Jiahao XU
ef99dd795f
Refactor: Extract mod fs as crate atomic-file-install (#1286)
Refactor: Extract mod `fs` as crate `atomic-install`

To speedup codegen of `binstalk` and also publish a new crate that could
be reused.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 13:24:26 +00:00
Jiahao XU
8ff13c1b36
Refactor: Extract cargo_toml_workspace as a new crate (#1287)
To reduce codegen time of `binstalk` and also enable others to reuse
this crate.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 12:05:10 +00:00
Jiahao XU
c57356e870
Refactor: Move mod git into binstalk-downloader (#1285)
To speedup codegen time for `binstalk`, also fixed the docs.rs build for
`binstalk-downloader`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-12 07:20:26 +00:00
github-actions[bot]
9e901c6b84
release: detect-targets v0.1.10 (#1280)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-11 02:22:13 +00:00
github-actions[bot]
cf3e3c25b0
release: binstalk v0.15.0 (#1274)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-10 07:54:29 +00:00
Jiahao XU
cf2a8a5287
dep: Bump tokio to v1.30.0 & disable feat parking_lot (#1273)
In tokio v1.30.0, MSRV is bumped to rust 1.63 and all `const_new`
methods in `tokio::sync` are now always available, so there is no need
to enable feat `parking_lot`.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-10 07:17:40 +00:00
github-actions[bot]
070537076d
release: binstalk-downloader v0.7.0 (#1272)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-09 21:00:48 +00:00
github-actions[bot]
000c87bcee
release: detect-targets v0.1.9 (#1268)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-08-09 11:02:53 +00:00
Jiahao XU
3e80b12748
feat: Verify cksum of crate tarball from cargo registry (#1260)
Fixed #1183

Since the crate tarball could be downloaded from a different set of
servers than where the cargo registry is hosted, verifying the checksum
is necessary to verify its integrity.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 10:57:47 +00:00
Jiahao XU
7f1ddd1dd7
Reduce public interface of binstalk (#1265)
To reduce amount of breaking changes.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 07:46:12 +00:00
Jiahao XU
9c521d162a
Enable unstable feature reqwest/http3 in CI (#1261)
For dev and release build, so that pre-built binaries of
`cargo-binstall` can utilize http3 protocol.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-09 07:44:10 +00:00
Jiahao XU
435df675b3
Fix too many 429 response (#1231)
Fixed #1229

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-08-08 00:53:15 +00:00