app-editors/cursor: add 0.44.9, drop 0.44.8-r1
[gentoo-zh.git] / app-crypt / archlinux-keyring / files / 01_adapt_to_sequoia_sq_0_34.patch
blob6389650d653864ca60b65e41ce13efc0440e65dc
1 From 10252b287d7d3bc338d0aa3e5d2e6c0fc6d1653d Mon Sep 17 00:00:00 2001
2 From: David Runge <dvzrv@archlinux.org>
3 Date: Thu, 29 Feb 2024 20:53:42 +0100
4 Subject: [PATCH] fix(libkeyringctl): Adapt to CLI churn in sequoia-sq 0.34.0
6 The `sq keyring` command has been moved to `sq toolbox keyring`.
7 The `sq toolbox packet split` command now outputs to stdout by default
8 for unknown reasons. Providing an empty string to `--prefix` now
9 works again and somehow has the command output to files again.
11 Signed-off-by: David Runge <dvzrv@archlinux.org>
12 ---
13 libkeyringctl/sequoia.py | 6 +++---
14 libkeyringctl/verify.py | 2 +-
15 2 files changed, 4 insertions(+), 4 deletions(-)
17 diff --git a/libkeyringctl/sequoia.py b/libkeyringctl/sequoia.py
18 index 1e731491..34206a58 100644
19 --- a/libkeyringctl/sequoia.py
20 +++ b/libkeyringctl/sequoia.py
21 @@ -49,7 +49,7 @@ def keyring_split(working_dir: Path, keyring: Path, preserve_filename: bool = Fa
22 keyring_dir = Path(mkdtemp(dir=working_dir, prefix="keyring-")).absolute()
24 with cwd(keyring_dir):
25 - system(["sq", "keyring", "split", str(keyring)])
26 + system(["sq", "toolbox", "keyring", "split", str(keyring)])
28 keyrings: List[Path] = list(natural_sort_path(keyring_dir.iterdir()))
30 @@ -75,7 +75,7 @@ def keyring_merge(certificates: List[Path], output: Optional[Path] = None, force
31 The result if no output file has been used
32 """
34 - cmd = ["sq", "keyring", "merge"]
35 + cmd = ["sq", "toolbox", "keyring", "merge"]
36 if force:
37 cmd.insert(1, "--force")
38 if output:
39 @@ -103,7 +103,7 @@ def packet_split(working_dir: Path, certificate: Path) -> Iterable[Path]:
40 packet_dir = Path(mkdtemp(dir=working_dir, prefix="packet-")).absolute()
42 with cwd(packet_dir):
43 - system(["sq", "toolbox", "packet", "split", str(certificate)])
44 + system(["sq", "toolbox", "packet", "split", "--prefix", "''", str(certificate)])
45 return natural_sort_path(packet_dir.iterdir())
48 diff --git a/libkeyringctl/verify.py b/libkeyringctl/verify.py
49 index a0c582bc..29c64d86 100644
50 --- a/libkeyringctl/verify.py
51 +++ b/libkeyringctl/verify.py
52 @@ -71,7 +71,7 @@ def verify( # noqa: ignore=C901
53 keyring_fd = Popen(("sq", "dearmor", f"{str(keyring_path)}"), stdout=PIPE)
54 print(system(["hokey", "lint"], _stdin=keyring_fd.stdout), end="")
55 if lint_sq_keyring:
56 - print(system(["sq", "keyring", "lint", f"{str(keyring_path)}"]), end="")
57 + print(system(["sq", "toolbox", "keyring", "lint", f"{str(keyring_path)}"]), end="")
60 def verify_integrity(certificate: Path, all_fingerprints: Set[Fingerprint]) -> None: # noqa: ignore=C901
61 --
62 GitLab