You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
662 B

#!/usr/bin/expect -f
set timeout 3
set PACKAGE [lindex $argv 0]
set GPG_NAME [lindex $argv 1]
set GPG_PATH [lindex $argv 2]
set GPG_PASSPHRASE $env(GPG_PASSPHRASE)
if {[llength $argv] == 0} {
send_user "Usage: ./sign <rpm_package> <gpg_key> <gpg_binary>\n"
exit 1
}
send_user "\nSigning $PACKAGE\n"
spawn rpmsign --resign $PACKAGE --define "_signature gpg" --define "_gpg_name $GPG_NAME" --define "_gpgbin $GPG_PATH"
expect {
timeout { send_user "\nTimeout signing $PACKAGE\n"; exit 1 }
"Enter pass phrase:"
}
send "$GPG_PASSPHRASE\r"
expect {
timeout { send_user "\nTimeout signing $PACKAGE\n"; exit 1 }
"Pass phrase is good."
}
interact
sleep 3