keyfork-plumbing: move back into keyfork-{mnemonic-util,entropy}

This commit is contained in:
Ryan Heywood 2024-01-17 21:30:36 -05:00
parent c5d1a6d62c
commit 2de0c5ce10
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
7 changed files with 23 additions and 36 deletions

12
Cargo.lock generated
View File

@ -1763,6 +1763,9 @@ dependencies = [
[[package]] [[package]]
name = "keyfork-entropy" name = "keyfork-entropy"
version = "0.1.0" version = "0.1.0"
dependencies = [
"smex",
]
[[package]] [[package]]
name = "keyfork-frame" name = "keyfork-frame"
@ -1786,15 +1789,6 @@ dependencies = [
"sha2", "sha2",
] ]
[[package]]
name = "keyfork-plumbing"
version = "0.1.0"
dependencies = [
"keyfork-entropy",
"keyfork-mnemonic-util",
"smex",
]
[[package]] [[package]]
name = "keyfork-prompt" name = "keyfork-prompt"
version = "0.1.0" version = "0.1.0"

View File

@ -19,7 +19,6 @@ members = [
"crates/util/keyfork-frame", "crates/util/keyfork-frame",
"crates/util/keyfork-mnemonic-util", "crates/util/keyfork-mnemonic-util",
"crates/util/keyfork-prompt", "crates/util/keyfork-prompt",
"crates/util/keyfork-plumbing",
"crates/util/keyfork-slip10-test-data", "crates/util/keyfork-slip10-test-data",
"crates/util/smex", "crates/util/smex",
] ]

View File

@ -6,4 +6,9 @@ license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = []
bin = ["smex"]
[dependencies] [dependencies]
smex = { version = "0.1.0", path = "../smex", optional = true }

View File

@ -1,12 +0,0 @@
[package]
name = "keyfork-plumbing"
version = "0.1.0"
edition = "2021"
license = "AGPL-3.0-only"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
keyfork-entropy = { version = "0.1.0", path = "../keyfork-entropy" }
keyfork-mnemonic-util = { version = "0.1.0", path = "../keyfork-mnemonic-util" }
smex = { version = "0.1.0", path = "../smex" }

View File

@ -10,15 +10,16 @@ cargo install --index https://git.distrust.co/public/_cargo-index keyfork@0.1.0
The index is managed by Distrust, but is not signed by developers when commits The index is managed by Distrust, but is not signed by developers when commits
are created, so a safer alternative may be to build from source. It is are created, so a safer alternative may be to build from source. It is
recommended to perform these operations on a machine dedicated for the purpose recommended to perform these operations in an environment dedicated for the
of building Rust binaries, to avoid the risk of building a compromised binary. purpose of building Rust binaries, to avoid the risk of building a compromised
binary.
```sh ```sh
git clone https://git.distrust.co/public/keyfork git clone https://git.distrust.co/public/keyfork
cd keyfork cd keyfork
# git checkout keyfork-0.1.0 # git checkout keyfork-0.1.0
git verify-commit HEAD git verify-commit HEAD
cargo install --locked --path keyfork cargo install --locked --path crates/keyfork
``` ```
This will build Keyfork from source, using a local `Cargo.lock` file to ensure This will build Keyfork from source, using a local `Cargo.lock` file to ensure
@ -30,15 +31,12 @@ Keyfork offers "plumbing" binaries (as opposed to the "porcelain" `keyfork`)
that offer a smaller [SBOM], allowing users with a smaller feature requirement that offer a smaller [SBOM], allowing users with a smaller feature requirement
to lessen the requirements for code review. Plumbing binaries can be installed to lessen the requirements for code review. Plumbing binaries can be installed
the same way Keyfork is installed, either through the registry or by building the same way Keyfork is installed, either through the registry or by building
locally. Plumbing binaries are grouped by crates of shared dependencies. For locally. Plumbing binaries may be grouped by crates of shared dependencies if
instance, `keyfork-plumbing` includes all binaries using only shared all dependencies are shared between the binaries. Plumbing binaries may also
dependencies. Eventually, `keyfork-plumbing-openpgp` may contain all exist in crates that exist only to serve as a command-line interface to that
dependencies relevant to OpenPGP (such as the `keyfork-shard` variants, crate, but may require additional dependencies to build a binary. These will be
`keyfork-derive-openpgp`, and `keyfork-provision-openpgp-card`). There may also specified by `--features bin` as a flag that should be passed to `cargo
be plumbing binaries that exist by themselves, without a plumbing package. install`.
Unfortunately, Cargo offers no convenient way to install a binary from any
package on a workspace, so the information about which package contains which
binary must be known beforehand.
<!-- TODO: <!-- TODO:
Should plumbing binaries be their own packages? Should plumbing binaries be their own packages?
@ -46,8 +44,11 @@ binary must be known beforehand.
--> -->
```sh ```sh
cargo install --index https://git.distrust.co/public/_cargo-index keyfork-plumbing@0.1.0 # Currently (2024-01-17) unreleased, may not exist yet
cargo install --locked --path keyfork-plumbing --bin keyfork-entropy cargo install --index https://git.distrust.co/public/_cargo-index keyfork-entropy@0.1.0 --features bin
# Confirmed to work as of 2024-01-17.
cargo install --locked --path crates/util/keyfork-entropy --bin keyfork-entropy --features bin
``` ```
[SBOM]: https://en.wikipedia.org/wiki/SBOM [SBOM]: https://en.wikipedia.org/wiki/SBOM