Fix package signing (#20451)

* Build: Fix package signing
This commit is contained in:
Arve Knudsen 2019-11-18 21:23:32 +01:00 committed by GitHub
parent 5ecc12505f
commit 90b41e86f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 13 deletions

View File

@ -2,3 +2,4 @@
%_gpg_path /root/.gnupg
%_gpg_name Grafana
%_gpgbin /usr/bin/gpg
%_gpg_sign_cmd_extra_args --batch --pinentry-mode loopback --passphrase-file /tmp/gpg-passphrase

View File

@ -1,12 +0,0 @@
#!/usr/bin/expect -f
# wrapper to make rpm --sign be non-interactive
# passwd is 1st arg, file to sign is 2nd
#send_user «$argv0 [lrange $argv 0 2]\n"
#set files [lrange $argv 1 $argc ]
set password [lindex $argv 0]
set files [lindex $argv 1]
spawn rpm --addsign $files
expect "Enter pass phrase:"
send -- "$password\r"
expect eof

View File

@ -17,8 +17,9 @@ fi
gpg --batch --allow-secret-key-import --import ~/private-repo/signing/private.key
cp ./scripts/build/rpmmacros ~/.rpmmacros
echo "$GPG_KEY_PASSWORD" > /tmp/gpg-passphrase
for package in $_files; do
[ -e "$package" ] || continue
./scripts/build/sign_expect "$GPG_KEY_PASSWORD" "$package"
rpm --addsign "$package"
done