Adding a signature looks like a trivial task, but once you want to skip the manual interaction it start to be embracing.
It looks funny, but i could not find an usable script on the net to do this task, therefore I post mine in order to make the others life easier
Here is my small, dummy script for batch signing rpm packages. It requires expect and it does work
- Code: Select all
#!/usr/bin/expect
# Expect script for batch signing rpm packages
#
set timeout -1
log_user 0
set rpm_file [lindex $argv 0]
set sig_password [lindex $argv 1]
spawn /usr/bin/rpmsign --addsign $rpm_file
expect "phrase: "
send "$sig_password\r"
expect eof