Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sign-rpms: remove GPG_PASSPHRASE #2126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions scripts/sign-rpms
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ distros=( centos rhel )
# are the same values used by the build system.
distro_versions=( 7 8 9 )

# To unlock the gpg keys for the current run, it is requested over STDIN as
# a password and later passed into GPG directly as a variable.
read -s -p "Key Passphrase: " GPG_PASSPHRASE
echo

for release in "${releases[@]}"; do
for distro in "${distros[@]}"; do
for distro_version in "${distro_versions[@]}"; do
Expand All @@ -64,7 +59,7 @@ for release in "${releases[@]}"; do
--define "_gpg_name '$keyid'" \
--define '_signature gpg' \
--define '__gpg_check_password_cmd /bin/true' \
--define "__gpg_sign_cmd %{__gpg} gpg --no-tty --yes --batch --no-armor --passphrase '$GPG_PASSPHRASE' --no-secmem-warning -u "%{_gpg_name}" --sign --detach-sign --output %{__signature_filename} %{__plaintext_filename}" \
--define "__gpg_sign_cmd %{__gpg} gpg --no-tty --yes --batch --no-armor --no-secmem-warning -u "%{_gpg_name}" --sign --detach-sign --output %{__signature_filename} %{__plaintext_filename}" \
--resign "$rpm_path"

fi
Expand Down Expand Up @@ -92,7 +87,7 @@ for release in "${releases[@]}"; do
if [[ $update_repo -eq 1 ]]; then
for repomd in `find -name repomd.xml`; do
echo "signing repomd: $repomd"
gpg --batch --yes --passphrase "$GPG_PASSPHRASE" --detach-sign --armor -u $keyid $repomd
gpg --batch --yes --detach-sign --armor -u $keyid $repomd
done
fi

Expand Down