The rpm commend insists on prompting for a passphrase when signing rpms even
for passphraselees keys. This behaviour causes problems for automated build
scripts. The rpm-autosign.exp scripts is a small expect wrapper for rpm that
that sends empty passphrase in reposne to the prompt.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
--- /dev/null
+#!/usr/bin/expect -f
+
+# First parameter should be the key such as:
+# --define "_gpg_name 03C3951A"
+
+spawn rpm --addsign {*}$argv
+expect -exact "Enter pass phrase: "
+send -- "\r"
+expect eof