From 372b11d739a4d416f2a73eb027da7d9824053b1e Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Mon, 27 May 2024 16:32:49 -0300 Subject: [PATCH] Review: Fix typos and misc [noissue] --- CHANGES/2986.feature | 2 +- pulp_rpm/app/shared_utils.py | 2 +- pulp_rpm/tests/functional/conftest.py | 2 +- staging_docs/admin/guides/add-signing-services.md | 10 +++++----- staging_docs/user/guides/06-sign-packages.md | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGES/2986.feature b/CHANGES/2986.feature index 4e1f5caef..bdc14d442 100644 --- a/CHANGES/2986.feature +++ b/CHANGES/2986.feature @@ -1 +1 @@ -Added supported for signing RPM Packages on upload. +Added (tech preview) support for signing RPM packages when uploading to a Repository. diff --git a/pulp_rpm/app/shared_utils.py b/pulp_rpm/app/shared_utils.py index 8155e3aae..dd0ca6e22 100644 --- a/pulp_rpm/app/shared_utils.py +++ b/pulp_rpm/app/shared_utils.py @@ -180,7 +180,7 @@ class RpmTool: """ INVALID_SIGNATURE_ERROR_MSG = "Signature is invalid or pubkey is unreachable" - UNKNOWN_ERROR_MSG = "Some unknown error ocurred" + UNKNOWN_ERROR_MSG = "Some unknown error occurred" UNSIGNED_ERROR_MSG = "The package is not signed" def __init__(self, root: t.Optional[Path] = None): diff --git a/pulp_rpm/tests/functional/conftest.py b/pulp_rpm/tests/functional/conftest.py index 21ab9a199..286098d00 100644 --- a/pulp_rpm/tests/functional/conftest.py +++ b/pulp_rpm/tests/functional/conftest.py @@ -366,7 +366,7 @@ def _cleanup_domains( # see https://www.gnupg.org/documentation/manuals/gnupg/Specify-a-User-ID.html GPG_NAME="${PULP_SIGNING_KEY_FINGERPRINT}" -# Sign the pacakge +# Sign the package rpm \ --define "_signature gpg" \ --define "_gpg_path ${GPG_HOME}" \ diff --git a/staging_docs/admin/guides/add-signing-services.md b/staging_docs/admin/guides/add-signing-services.md index 0ed2b90a6..3ba7dd543 100644 --- a/staging_docs/admin/guides/add-signing-services.md +++ b/staging_docs/admin/guides/add-signing-services.md @@ -22,14 +22,14 @@ Nevertheless, the process of registering is very similar. 1. Create a signing script capable of signing an RPM Package. - The script receives a file path as its first argument. - - The script should return a json-formatted. No signature is required, since its embedded. + - The script should return a json-formatted output. No signature is required, since its embedded. ```json {"file": "filename"} ``` 1. Register it with `pulpcore-manager add-signing-service`. - The `--class` should be `rpm:RpmPackageSigningService`. - The key provided here serves only for validating the script. - The signing fingerprint are provided dynamically, as [on upload signing](site:pulp_rpm/docs/user/guides/06-sign-packages/#on-upload). + The signing fingerprint is provided dynamically, as [on upload signing](site:pulp_rpm/docs/user/guides/06-sign-packages/#on-upload). 1. Retrieve the signing service for usage. ### Example @@ -42,7 +42,7 @@ The following example is roughly what we use for testing. # Input provided to the script FILE_PATH=$1 -FINGERPINT="${PULP_SIGNING_KEY_FINGERPRINT}" +FINGERPRINT="${PULP_SIGNING_KEY_FINGERPRINT}" # Specific signing logic GPG_HOME=${HOME}/.gnupg @@ -50,7 +50,7 @@ GPG_BIN=/usr/bin/gpg rpm \ --define "_signature gpg" \ --define "_gpg_path ${GPG_HOME}" \ - --define "_gpg_name ${FINGERPINT}" \ + --define "_gpg_name ${FINGERPRINT}" \ --define "_gpgbin ${GPG_BIN}" \ --addsign "${FILE_PATH}" 1> /dev/null @@ -67,7 +67,7 @@ Register the signing service and retrieve information about it. ```bash pulpcore-manager add-signing-service \ - "SimpleRpmSigningSerivce" \ + "SimpleRpmSigningService" \ ${SCRIPT_ABS_FILENAME} \ ${KEYID} \ --class "rpm:RpmPackageSigningService" diff --git a/staging_docs/user/guides/06-sign-packages.md b/staging_docs/user/guides/06-sign-packages.md index b5fa74581..151c8cb05 100644 --- a/staging_docs/user/guides/06-sign-packages.md +++ b/staging_docs/user/guides/06-sign-packages.md @@ -14,7 +14,7 @@ Sign an RPM Package when uploading it to a Repository. - Have an `RpmPackageSigningService` registered (see [here](site:pulp_rpm/docs/admin/guides/add-package-signing-service/#package-signing)). -- Have the V4 fingerprint of the key you want to use. The key should be acessible by the SigningService you are using. +- Have the V4 fingerprint of the key you want to use. The key should be accessible by the SigningService you are using. ### Instructions @@ -24,10 +24,10 @@ Sign an RPM Package when uploading it to a Repository. ### Example ```bash -# Create a Repository w/ required porams +# Create a Repository w/ required params http POST $API_ROOT/repositories/rpm/rpm \ name="MyRepo" \ - package_signing_service=$SIGNING_SERIVCE_HREF \ + package_signing_service=$SIGNING_SERVICE_HREF \ package_signing_fingerprint=$SIGNING_FINGERPRINT \ # Upload a package w/ signing enabled