Skip to content

Commit

Permalink
Use new fixture signing keys
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
dralley committed Nov 22, 2023
1 parent 23863f5 commit 103e466
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/scripts/post_before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ fi

cmd_stdin_prefix bash -c "cat > /var/lib/pulp/scripts/sign-metadata.sh" < "$GITHUB_WORKSPACE"/pulp_rpm/tests/functional/sign-metadata.sh

curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-pulp-qe | cmd_stdin_prefix su pulp -c "cat > /tmp/GPG-KEY-pulp-qe"
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-pulp-qe | cmd_stdin_prefix su pulp -c "gpg --import"
echo "6EDF301256480B9B801EBA3D05A5E6DA269D9D98:6:" | cmd_stdin_prefix gpg --import-ownertrust
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-fixture-signing | cmd_stdin_prefix su pulp -c "cat > /tmp/GPG-KEY-fixture-signing"
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-fixture-signing | cmd_stdin_prefix su pulp -c "gpg --import"
echo "0C1A894EBB86AFAE218424CADDEF3019C2D4A8CF:6:" | cmd_stdin_prefix gpg --import-ownertrust
cmd_prefix chmod a+x /var/lib/pulp/scripts/sign-metadata.sh

cmd_prefix su pulp -c "pulpcore-manager add-signing-service sign-metadata /var/lib/pulp/scripts/sign-metadata.sh \"Pulp QE\""
cmd_prefix su pulp -c "pulpcore-manager add-signing-service sign-metadata /var/lib/pulp/scripts/sign-metadata.sh \"pulp-fixture-signing-key\""

echo "machine pulp
login admin
Expand Down
4 changes: 2 additions & 2 deletions pulp_rpm/tests/functional/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@
}

PULP_FIXTURES_COMMON_URL = "https://github.com/pulp/pulp-fixtures/raw/master/common/"
PUBLIC_GPG_KEY_URL = urljoin(PULP_FIXTURES_COMMON_URL, "GPG-KEY-pulp-qe")
PRIVATE_GPG_KEY_URL = urljoin(PULP_FIXTURES_COMMON_URL, "GPG-PRIVATE-KEY-pulp-qe")
PUBLIC_GPG_KEY_URL = urljoin(PULP_FIXTURES_COMMON_URL, "GPG-KEY-fixture-signing")
PRIVATE_GPG_KEY_URL = urljoin(PULP_FIXTURES_COMMON_URL, "GPG-PRIVATE-KEY-fixture-signing")

RPM_CUSTOM_REPO_METADATA_FIXTURE_URL = urljoin(PULP_FIXTURES_BASE_URL, "rpm-repo-metadata/")
RPM_CUSTOM_REPO_METADATA_CHANGED_FIXTURE_URL = urljoin(
Expand Down
2 changes: 1 addition & 1 deletion pulp_rpm/tests/functional/sign-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
FILE_PATH=$1
SIGNATURE_PATH="$1.asc"

GPG_KEY_ID="Pulp QE"
GPG_KEY_ID="pulp-fixture-signing-key"

# Create a detached signature
gpg --quiet --batch --homedir ~/.gnupg/ --detach-sign --local-user "${GPG_KEY_ID}" \
Expand Down
4 changes: 2 additions & 2 deletions pulp_rpm/tests/functional/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def init_signed_repo_configuration():
subprocess.run(("gpg", "--import"), input=priv_key)

# set the imported key to the maximum trust level
key_fingerprint = "6EDF301256480B9B801EBA3D05A5E6DA269D9D98"
key_fingerprint = "0C1A894EBB86AFAE218424CADDEF3019C2D4A8CF"
completed_process = subprocess.run(("echo", f"{key_fingerprint}:6:"), stdout=subprocess.PIPE)
subprocess.run(("gpg", "--import-ownertrust"), input=completed_process.stdout)

Expand All @@ -198,7 +198,7 @@ def init_signed_repo_configuration():
"add-signing-service",
"sign-metadata",
f"{signing_script_path}",
"Pulp QE",
"pulp-fixture-signing-key",
)
)

Expand Down

0 comments on commit 103e466

Please sign in to comment.