From a8e44708937708290e62ad66898119902fd6425f Mon Sep 17 00:00:00 2001
From: Michel Lind <salimma@fedoraproject.org>
Date: Thu, 7 Sep 2023 11:11:00 -0500
Subject: [PATCH] Revert "feat: Replace sq-keyring-linter with sq >= 0.31.0"
For use in distribution packages where sq has not been updated
This reverts commit 3365f8607cadf4c5e87b8e5d582cdbb021c0d267.
---
README.md | 3 ++-
libkeyringctl/ci.py | 2 +-
libkeyringctl/cli.py | 2 +-
libkeyringctl/verify.py | 6 +++---
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 102e9c3..f409fc5 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,12 @@ Build:
Runtime:
* python
-* sequoia-sq >= 0.31.0
+* sequoia-sq
Optional:
* hopenpgp-tools (verify)
+* sq-keyring-linter (verify)
* git (ci)
## Usage
diff --git a/libkeyringctl/ci.py b/libkeyringctl/ci.py
index 7200709..31b0210 100644
--- a/libkeyringctl/ci.py
+++ b/libkeyringctl/ci.py
@@ -10,7 +10,7 @@ from .verify import verify
def ci(working_dir: Path, keyring_root: Path, project_root: Path) -> None:
- """Verify certificates against modern expectations using `sq keyring lint` and hokey
+ """Verify certificates against modern expectations using sq-keyring-linter and hokey
Currently only newly added certificates will be checked against the expectations as existing
keys are not all fully compatible with those assumptions.
diff --git a/libkeyringctl/cli.py b/libkeyringctl/cli.py
index 020f64b..3334c17 100644
--- a/libkeyringctl/cli.py
+++ b/libkeyringctl/cli.py
@@ -118,7 +118,7 @@ verify_parser.add_argument(
)
verify_parser.add_argument("--no-lint-hokey", dest="lint_hokey", action="store_false", help="Do not run hokey lint")
verify_parser.add_argument(
- "--no-lint-sq-keyring", dest="lint_sq_keyring", action="store_false", help="Do not run sq keyring lint"
+ "--no-lint-sq-keyring", dest="lint_sq_keyring", action="store_false", help="Do not run sq-keyring-linter"
)
verify_parser.set_defaults(lint_hokey=True, lint_sq_keyring=True)
diff --git a/libkeyringctl/verify.py b/libkeyringctl/verify.py
index a0c582b..5b7fc7d 100644
--- a/libkeyringctl/verify.py
+++ b/libkeyringctl/verify.py
@@ -29,7 +29,7 @@ def verify( # noqa: ignore=C901
lint_hokey: bool = True,
lint_sq_keyring: bool = True,
) -> None:
- """Verify certificates against modern expectations using `sq keyring lint` and hokey
+ """Verify certificates against modern expectations using sq-keyring-linter and hokey
Parameters
----------
@@ -38,7 +38,7 @@ def verify( # noqa: ignore=C901
sources: A list of username, fingerprint or directories from which to read PGP packet information
(defaults to `keyring_root`)
lint_hokey: Whether to run hokey lint
- lint_sq_keyring: Whether to run sq keyring lint
+ lint_sq_keyring: Whether to run sq-keyring-linter
"""
if not sources:
@@ -71,7 +71,7 @@ def verify( # noqa: ignore=C901
keyring_fd = Popen(("sq", "dearmor", f"{str(keyring_path)}"), stdout=PIPE)
print(system(["hokey", "lint"], _stdin=keyring_fd.stdout), end="")
if lint_sq_keyring:
- print(system(["sq", "keyring", "lint", f"{str(keyring_path)}"]), end="")
+ print(system(["sq-keyring-linter", f"{str(keyring_path)}"]), end="")
def verify_integrity(certificate: Path, all_fingerprints: Set[Fingerprint]) -> None: # noqa: ignore=C901
--
2.41.0