Skip to content

Commit

Permalink
Review: Fix typos and misc
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pedro-psb committed May 27, 2024
1 parent 0b3505e commit 372b11d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGES/2986.feature
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Added supported for signing RPM Packages on upload.
Added (tech preview) support for signing RPM packages when uploading to a Repository.
2 changes: 1 addition & 1 deletion pulp_rpm/app/shared_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pulp_rpm/tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand Down
10 changes: 5 additions & 5 deletions staging_docs/admin/guides/add-signing-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,15 +42,15 @@ 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
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

Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions staging_docs/user/guides/06-sign-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 372b11d

Please sign in to comment.