1427 Commits

Author SHA1 Message Date
Justus Winter
6478a7903c
Fix rendering of examples with multi-line descriptions. 2024-01-10 09:49:20 +01:00
Justus Winter
a338e1efb4
Warn if examples exceed 78 characters in man pages. 2024-01-09 17:14:38 +01:00
Justus Winter
6884e41f16
Move the armor and dearmor commands to sq packet.
- While sq packet isn't quite the right home for these commands,
    they shouldn't be featured so prominently and clutter the
    top-level subcommand hierarchy.

  - See also #169.
2024-01-09 17:14:38 +01:00
Justus Winter
5932d91ecd
Reflow and align examples.
- Examples may not wrap around in rendered documentation, and if
    they do, it may distort the meaning.  Care must be taken to keep
    the line length reasonable.
2024-01-09 13:28:15 +01:00
Justus Winter
f9981e6e3e
ci: Fix redirects. 2024-01-08 18:46:06 +01:00
Justus Winter
befb3e270e
Fix cloning instructions. 2024-01-08 18:12:51 +01:00
Justus Winter
891cc859e0
Build and deploy rustdoc, man pages, subplot.
- Fixes #60.
2024-01-08 18:12:51 +01:00
Justus Winter
0588bbedb1
Improve rendering of examples with continuations. 2024-01-08 14:18:42 +01:00
Justus Winter
c6b4943dcd
Align the WoT documentation with other subcommands. 2024-01-08 14:18:42 +01:00
Justus Winter
3ef3de3408
Align the keyring linter documentation with other subcommands. 2024-01-08 14:18:42 +01:00
Justus Winter
86058193e1
Fix the password prompts.
- Fixes a5a7fd09b6c310be82852241ddda973619704388.
2024-01-08 14:18:42 +01:00
Justus Winter
fd08784e3a
Use std::io::IsTerminal instead of is-terminal.
- Available since Rust 1.70.
2024-01-08 14:18:42 +01:00
Justus Winter
fc3e4e046e
Ask for the password even if stdin is not connected to the TTY.
- As we prompt on the TTY, we can do that even if stdin is not
    connected to it.

  - Reverts f3cfb1b6022e1276ae3c047e59ec6cc34e2b4357.

  - Fixes #167.
2024-01-08 14:18:42 +01:00
Justus Winter
1b4761a045
Don't ask for passwords if we don't support the S2K mechanism. 2024-01-08 14:18:42 +01:00
Justus Winter
c4a2c5666f
tests: Detach console for child processes.
- Otherwise, rpassword will ask for passwords and hang the tests.
2024-01-08 14:18:42 +01:00
Justus Winter
0ea5ef9fad
Write assets like manual pages to a predictable location.
- Fixes #45.
2024-01-05 15:57:05 +01:00
Justus Winter
2580e26ba5
Refactor asset creation. 2024-01-05 15:45:54 +01:00
Justus Winter
03dbe1db84
Editorial changes to example text format.
- Similar to #27.
2024-01-05 15:37:08 +01:00
Justus Winter
79fd3d7333
Editorial changes to example text format.
- Fixes #27.
2024-01-05 15:32:54 +01:00
Justus Winter
f81d6f09af
Use our custom manual page generator during build time.
- Previously, there were two ways of generating manual pages.
    We used to use the upstream clap_mangen crate, but decided to
    develop our own custom formatter.  However, we didn't quite switch
    to it, keeping the old mechanism in place and adding our new
    solution to sq, activated by a hidden environment variable.

  - This patch drops the upstream formatter, and uses the custom
    formatter during build time.  First, our custom code can be
    tweaked easily to suit our needs, and switching back to the
    upstream solution is easy enough should it better suit our needs.
    Second, generating manual pages at build time should help
    cross-building environments.
2024-01-05 13:56:32 +01:00
Justus Winter
cf16123967
Always emit option subsections, list global options last. 2024-01-05 13:45:17 +01:00
Justus Winter
14717e210b
Restructure manual pages.
- Previously, the top-level manpage contained all leaf commands in the
    synopsis, their descriptions, and their examples.  This made the
    page unwieldy.

  - Instead, only list direct subcommands in overview pages, and
    generate one overview page per non-leaf command.
2024-01-05 13:45:16 +01:00
Justus Winter
02b043559a
Represent the commands as a tree instead of a flattened tree.
- This doesn't change the output, except for fixing the order of
    subcommands in the SYNOPSIS.
2024-01-05 12:32:36 +01:00
Justus Winter
bf256f250d
Move the generating functions to the struct Command. 2024-01-05 12:10:20 +01:00
Justus Winter
d1b70a2c41
Use a BTreeMap instead of a HashMap for deterministic output. 2024-01-05 11:48:16 +01:00
Justus Winter
d929cd0100
Align functions building manpages.
- This doesn't change the output.
2024-01-05 11:43:53 +01:00
Justus Winter
ad567d5c04
Track whether commands are leaves and filter accordingly.
- This doesn't change the output.
2024-01-05 11:27:21 +01:00
Justus Winter
d0767969ce
Rename type. 2024-01-04 19:13:09 +01:00
Justus Winter
5be0d39b05
Qualify clap's types. 2024-01-04 19:07:42 +01:00
Justus Winter
6e56915e0c
Insert missing space in subcommand synopsis. 2024-01-04 19:02:20 +01:00
Justus Winter
545035093f
Fix documentation. 2024-01-04 19:02:14 +01:00
Justus Winter
428372d65b
Turn comments into function documentation. 2024-01-04 18:17:29 +01:00
Justus Winter
9cb519771a
Rename subcommand dispatcher functions. 2024-01-04 18:16:59 +01:00
Justus Winter
1e3b2b0b25
Use a BTreeMap instead of a HashMap for deterministic output. 2024-01-04 17:16:39 +01:00
Justus Winter
ec933036dd
Buffer certs and use the correct armor label in sq keyring.
- See #14.
2024-01-04 17:16:26 +01:00
Justus Winter
55321a2769
Don't suggest to omit a mandatory option.
- Provide two distinct default help texts for our CLI types: for
    optional and required arguments.
2024-01-04 16:21:45 +01:00
Justus Winter
5a809f77d6
Improve ergonomics of sq key userid add.
- Make the input and one user id argument mandatory.

  - Fixes #104.
2024-01-04 16:02:25 +01:00
Justus Winter
70eb478987
Dump certs if we see a bad signature in the sq-certify tests.
- See #9.
2024-01-04 15:01:19 +01:00
Justus Winter
4db9d09dac
Constrain to valid messages when merging signatures.
- Fixes #65.
2024-01-04 14:05:18 +01:00
Justus Winter
b79ff91ddf
Fix joining of packets that contain secrets.
- Fixes 56dba759fd425aa28d4ba8b03db3b2f89ae0b033.
2024-01-04 13:34:08 +01:00
Justus Winter
2acae1311c
Fix detection of inline-signed messages. 2024-01-04 13:34:08 +01:00
Justus Winter
bd4e645bfc
Make label detection more robust, use packet tag instead of kind.
- For packet joining, we don't need to be able to parse the packet.
    Hence, it is enough to look at the tag, which will cover e.g
    packets with unsupported versions.
2024-01-04 13:34:08 +01:00
Justus Winter
e0fab7a234
Take the path from the packet parser instead of computing it. 2024-01-04 13:34:07 +01:00
Justus Winter
8314b47c51
Refactor dispatching logic. 2024-01-04 12:03:55 +01:00
Justus Winter
3e3980b161
Identify bare revocation certificates as such. 2024-01-04 11:17:19 +01:00
Justus Winter
1dfbe5cc70
Identify compound revocation certificates as such. 2024-01-04 10:57:16 +01:00
Justus Winter
c6b29ec13f
Include public key in revocation cert, adjust Armor label.
- Fixes #53.
2024-01-04 10:45:28 +01:00
Justus Winter
b24b9b898e
Merge certificates used to verify signatures.
- Fixes #79.
2024-01-04 10:33:13 +01:00
Justus Winter
012f4500ac
Validate the Autocrypt header against the From header. 2024-01-03 17:47:12 +01:00
Justus Winter
86f599542c
Remove the Autocrypt feature, making it mandatory.
- We once made the Autocrypt feature optional in order to squeeze a
    sq update into a freeze without requiring new dependencies.
    However, having features has a cost too (see e.g. #137), and we
    generally try to keep the number of exposed features down.  And,
    the sequoia-autocrypt is one of the least demanding crates to
    package.
2024-01-03 17:14:46 +01:00