Commit graph

937 commits

Author SHA1 Message Date
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
dependabot[bot]
49592890f9
build(deps): bump the deps group with 2 updates (#1441)
Bumps the deps group with 2 updates: [fs4](https://github.com/al8n/fs4-rs) and [proc-macro2](https://github.com/dtolnay/proc-macro2).


Updates `fs4` from 0.6.6 to 0.7.0
- [Release notes](https://github.com/al8n/fs4-rs/releases)
- [Commits](https://github.com/al8n/fs4-rs/commits/0.7.0)

Updates `proc-macro2` from 1.0.67 to 1.0.68
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.67...1.0.68)

---
updated-dependencies:
- dependency-name: fs4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-07 02:02:23 +00:00
Jiahao XU
ceba74870e
Fix clippy errors in cargo v1.73.0 (#1439)
It actually improves the quality of our code!

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-10-06 12:10:42 +00:00
Sculas
af04e45b5a
feat: logging for DNS resolver (also fixes #1417) (#1436)
* feat: logging for dns resolver

* refactor: fix clippy warnings

* refactor: actually fix clippy warnings

* refactor: apply requested changes
2023-10-05 11:00:07 +00:00
dependabot[bot]
59963c712f
build(deps): bump the deps group with 2 updates (#1433)
Bumps the deps group with 2 updates: [file-format](https://github.com/mmalecot/file-format) and [gix](https://github.com/Byron/gitoxide).


Updates `file-format` from 0.20.0 to 0.21.0
- [Release notes](https://github.com/mmalecot/file-format/releases)
- [Changelog](https://github.com/mmalecot/file-format/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mmalecot/file-format/compare/v0.20.0...v0.21.0)

Updates `gix` from 0.53.1 to 0.54.1
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Byron/gitoxide/compare/gix-v0.53.1...gix-v0.54.1)

---
updated-dependencies:
- dependency-name: file-format
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: gix
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 14:08:07 +00:00
Jiahao XU
a69beccf1a
Bump dep trust-dns-reslver to v0.23.0 (#1432)
* Bump dep trust-dns-reslver to v0.23.0

Since we no longer enables `reqwest/trust-dns-resolver` anymore, we
don't need to keep this dependency is sync with upstream `reqwest`.

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

* Fix compilation

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-30 01:12:27 +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
Jiahao XU
b56a8c3579
Fix detect-targets glibc detection (#1421)
* Fix `detect-targets` glibc detection

Fixed #1420

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

* Fix `detect-targets` glibc detection for Fedora

Fedora 37-39 has glibc installed in `/lib64` and `/usr/lib64` instead of
`/lib` or `/usr/lib`.

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

* Improve caching in `detect-targets-alpine-test`

Make sure it reuses cached artifacts instead of recompiling everything.

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

* Mv `test-detect-targets-musl.sh` into `.github/scripts/`

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

* Refactor `ci.yml`: Extract new job `detect-targets-build`

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

* FIx `detect-targets-ubuntu-test`

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

* Avoid building the entire workspacein `detect-targets-build`

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

* Fix `detect-targets-*-test`: `chmod +x detect-targets`

Also fixed testing on Alpine, to make sure it exits with status 1 on
assertion failure.

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

* Fix typo

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

* Cache all crates in `detect-targets-build`

Since `detect-targets` rarely changes and is quite small, it is also
reasonable to cache it.

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

* Add job `detect-targets-more-glibc-test`

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

* Add `detect-targets-nix-test`

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

* Fix `detect-targets-nix-test` executing `detect-targets`

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

* Fix workflow: Add all `detect-targets-*` jobs to be dep of `tests-pass`

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-29 23:46:03 +00:00
github-actions[bot]
6ce60225d4
release: cargo-binstall v1.4.2 (#1418)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-28 02:59:25 +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
Jiahao XU
b73c253275
Fix GhApiClient: Accept any auth_token given (#1415)
Fixed #1414

There are many different kinds of gh tokens and they can change the
format at anytime, so we can't check it based on its formats.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-27 12:02:42 +00:00
github-actions[bot]
e41db2a297
release: cargo-binstall v1.4.1 (#1406)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-26 23:42:26 +00:00
Félix Saparelli
216d548fd4
Use explicit write permissions (#1404)
* Use explicit write permissions

* Revert "release: cargo-binstall v1.4.1 (#1403)"

This reverts commit 00941d8b43.
2023-09-26 21:57:51 +00:00
github-actions[bot]
00941d8b43
release: cargo-binstall v1.4.1 (#1403)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-26 13:31:47 +00:00
github-actions[bot]
3f29e13e42
release: cargo-binstall v1.4.0 (#1399)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-26 07:46:42 +00:00
Félix Saparelli
49b37ff1e2
Revert "release: cargo-binstall v1.4.0" and fix (#1398)
* Revert "release: cargo-binstall v1.4.0 (#1397)"

This reverts commit 99e8256018.

* --allow-dirty on publish

* Remove private key file after generation

* Write public key file to bin crate and to package

* Upload public key file to release
2023-09-26 06:47:25 +00:00
github-actions[bot]
99e8256018
release: cargo-binstall v1.4.0 (#1397)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-26 03:42:59 +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]
1d8dfff3ba
release: binstalk-manifests v0.10.0 (#1388)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-25 05:49:14 +00:00
Jiahao XU
1fe4702bde
Refactor cargo-toml-workspace: Rm dep on binstalk-types (#1386)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-25 05:34:40 +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
Jiahao XU
efbd20857b
Fix detect-targets on ubuntu 20.04, glibc 2.31 (#1379)
* Fix `detect-targets` on ubuntu 20.04, glibc 2.31

Fixed #1375 and fixed #1378

glibc 2.31 does not support `--version`, so we need to detect and
fallback to passing an executable linked with that glibc to check if it
is indeed glibc.

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

* Fix compilation faillure on ubuntu-20.04

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-22 23:55:12 +00:00
github-actions[bot]
82e5fc4781
release: cargo-binstall v1.3.1 (#1374)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 10:16:35 +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]
2c81b749ef
release: binstalk-manifests v0.9.0 (#1368)
chore: Release

Co-authored-by: github-actions <github-actions@github.com>
2023-09-17 01:53:04 +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
9c4e3a6642
Minor refactor for binstalk-downloader (#1365)
- Mv `resolver.rs` => `remote/resolver.rs`
 - Fix clippy warnings in `resolver.rs` on unix

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-17 01:06:15 +00:00
Sculas
6560225c03
fix: use custom DNS resolver (#1364)
* add DefaultResolver

* style: fmt

* chore: remove unused feature

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

* chore: remove unused `ipconfig/computer` feature

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

* chore: update `trust-dns-resolver`

* refactor: apply requested changes

* chore: revert `trust-dns-resolver` upgrade

I mistakenly thought `reqwest` already updated to the newest version, but it hasn't! (no release was made yet)

* refactor: cleanup

---------

Co-authored-by: GNQG <my.t.gnq+dev@gmail.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-16 23:51:07 +00:00
dependabot[bot]
04c5c00669
build(deps): bump the deps group with 2 updates (#1363)
Bumps the deps group with 2 updates: [reflink-copy](https://github.com/cargo-bins/reflink-copy) and [syn](https://github.com/dtolnay/syn).


Updates `reflink-copy` from 0.1.6 to 0.1.7
- [Commits](https://github.com/cargo-bins/reflink-copy/commits)

Updates `syn` from 2.0.33 to 2.0.35
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.33...2.0.35)

---
updated-dependencies:
- dependency-name: reflink-copy
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-16 01:35:20 +00:00
dependabot[bot]
e711bcd404
build(deps): bump the deps group with 8 updates (#1361)
Bumps the deps group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.2` | `4.4.3` |
| [mimalloc](https://github.com/purpleprotocol/mimalloc_rust) | `0.1.38` | `0.1.39` |
| [vergen](https://github.com/rustyhorde/vergen) | `8.2.4` | `8.2.5` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.105` | `1.0.107` |
| [async-compression](https://github.com/Nullus157/async-compression) | `0.4.2` | `0.4.3` |
| [cargo_toml](https://gitlab.com/lib.rs/cargo_toml) | `0.15.3` | `0.16.0` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.66` | `1.0.67` |
| [syn](https://github.com/dtolnay/syn) | `2.0.31` | `2.0.33` |


Updates `clap` from 4.4.2 to 4.4.3
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.2...v4.4.3)

Updates `mimalloc` from 0.1.38 to 0.1.39
- [Release notes](https://github.com/purpleprotocol/mimalloc_rust/releases)
- [Commits](https://github.com/purpleprotocol/mimalloc_rust/compare/v0.1.38...v0.1.39)

Updates `vergen` from 8.2.4 to 8.2.5
- [Release notes](https://github.com/rustyhorde/vergen/releases)
- [Commits](https://github.com/rustyhorde/vergen/compare/8.2.4...8.2.5)

Updates `serde_json` from 1.0.105 to 1.0.107
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.105...v1.0.107)

Updates `async-compression` from 0.4.2 to 0.4.3
- [Release notes](https://github.com/Nullus157/async-compression/releases)
- [Changelog](https://github.com/Nullus157/async-compression/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Nullus157/async-compression/compare/async-compression-v0.4.2...async-compression-v0.4.3)

Updates `cargo_toml` from 0.15.3 to 0.16.0
- [Commits](https://gitlab.com/lib.rs/cargo_toml/commits/main)

Updates `proc-macro2` from 1.0.66 to 1.0.67
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.66...1.0.67)

Updates `syn` from 2.0.31 to 2.0.33
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.31...2.0.33)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: mimalloc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: vergen
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: async-compression
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: cargo_toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: deps
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 23:11:33 +00:00
Jiahao XU
f31db762b4
dep: Bump gix from v0.52.0 => v0.53.1 (#1354)
* dep: Bump gix from v0.52.0 => v0.53.1

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

* Fix `gix` compilation: Enable `gix/max-performance-safe`

without this feature, `ThreadSafeRepository` does not implement `Sync`,
causes the `binstalk-registry` compilation to fail.

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

* Enable `gix/comfort` for progress tracing

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

* Fixed gix progress tracking: Enable `gix/progress-tree`

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

* Rm feature `gix/{comfort, progress-tree}`

Since they do not enable progress support and merely adds bloat.

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

* Fix gix progress logging: Allow logging from simple-git

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

* Re-enable feature `gix/comfort` for more readable logging

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-14 13:31:00 +00:00
dependabot[bot]
f26ab41961
build(deps): update toml_edit requirement from 0.19.11 to 0.20.0 in /crates/binstalk-registry (#1356)
build(deps): update toml_edit requirement in /crates/binstalk-registry

Updates the requirements on [toml_edit](https://github.com/toml-rs/toml) to permit the latest version.
- [Commits](https://github.com/toml-rs/toml/compare/v0.19.11...v0.20.0)

---
updated-dependencies:
- dependency-name: toml_edit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 03:07:40 +00:00
dependabot[bot]
cdb864fcb5
build(deps): update toml_edit requirement from 0.19.10 to 0.20.0 in /crates/binstalk-manifests (#1355)
build(deps): update toml_edit requirement in /crates/binstalk-manifests

Updates the requirements on [toml_edit](https://github.com/toml-rs/toml) to permit the latest version.
- [Commits](https://github.com/toml-rs/toml/compare/v0.19.10...v0.20.0)

---
updated-dependencies:
- dependency-name: toml_edit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 03:07:36 +00:00
dependabot[bot]
c6c36316fd
build(deps): update file-format requirement from 0.19.0 to 0.20.0 in /crates/bin (#1349)
build(deps): update file-format requirement in /crates/bin

Updates the requirements on [file-format](https://github.com/mmalecot/file-format) to permit the latest version.
- [Release notes](https://github.com/mmalecot/file-format/releases)
- [Changelog](https://github.com/mmalecot/file-format/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mmalecot/file-format/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: file-format
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-08 04:08:18 +00:00
Jiahao XU
76a692224d
Fix detect-targets on Linux and add CI testing (#1344)
* Testing: Add `detect-targets/src/main.rs`

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

* Fix `detect-targets` linux: `guess_host_triple` could return wrong libc info

so it has to check it manually instead of simply providing alternatives
like other OSes.

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

* Fix `get_ld_flavor` for Alpine's gcompat glibc

Its output is different from regular glibc, so we need to hardcode that
particular cases.

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

* Fix detection of alpine specific musl target

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

* Add ci testing for Alpine

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

* Add CI test for detect-targets on ubuntu

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

* Refactor `get_ld_flavor`

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

* Fix shellcheck

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

* Add more CI test for ubuntu

and fixed typo in it

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

* Rm distro specific target as it breaks `cargo-install` fallback

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

* Make sure all binaries are built in CI

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

* Add `package.metadata.binstall` for `detect-targets`

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

* Fix justfile

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

* Fix `detect-targets-{alpine, ubuntu}-test`

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

* Fix `detect-targets-ubuntu-test`

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

* Fix `debug-targets-ubuntu-test`

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

* `set -exuo pipefail` in `detect-targets-ubuntu-test`

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

* Simplify `detect-targets-*-test`: Use `Swatinem/rust-cache@v2` directly

instead of using `just-setup`

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

* Rm dup steps in `detect-targets-ubuntu-test`

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

* Add `ls` to detect-targets-alpine-test for debugging

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

* FIx `detect-targets-alpine-test`

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

* Fix `get_ld_flavor`

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

* Fix `linux::detect_targets` on ubuntu & glibc system

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

* FIx `linux::detect_targets` glibc checking

Check dynlib suffix

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-06 14:17:43 +00:00
Jiahao XU
0fa315758b
feat detect-targets: Improve support of non-std glibc/musl (#1343)
* feat `detect-targets`: Improve support of non-std glibc/musl

Fixed #1329

 - Refactor: Create `linux::detect_alternative_targets` to reuse code
   from other targets
 - Run `/lib/ld-linux-{cpu_arch}.so.1 --version` for checking glibc
   support instead of running `ldd --version` since it could be non-std
   glibc installation and does not provide
   `/lib/ld-linux-{cpu_arch}.so.1`
 - Check for non-std glibc and add fallback target
   `{cpu_arch}-{distro_name}-linux-gnu{abi}`
 - Add `{cpu_arch}-{distro_name}-linux-musl{abi}` fallback for musl
   libc, specially for Alpine since it has a
   `/lib/ld-musl-{cpu_arch}.so.1`
 - For unknown libc flavor, check for the target provided before
   fallback to musl

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

* feat `detect-targets`: Support glibc on musl target

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

* feat `detect-targets`: Unify `Libc::{Gnu, Musl}` checks

since we can't really tell if we are on gnu or musl

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

---------

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-02 23:19:34 +00:00
Jiahao XU
3e67e3624a
feat: Add more logging to binstalk-{downloader, registry} (#1340)
for debugging purposes.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2023-09-02 09:38:27 +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