Unverified Commit eecac7e2 authored by Tim Smith's avatar Tim Smith Committed by GitHub
Browse files

Merge pull request #892 from twk3/sign-new-rpm

Update the rpm package signing to work with newer rpm version
parents acd88ee7 e15bdc5b
......@@ -11,25 +11,22 @@ require 'pty'
puts rpm_cmd
PTY.spawn(rpm_cmd) do |r, w, pid|
# Older versions of rpmsign will prompt right away for the passphrase
prompt = r.read(19)
# match the expected prompt exactly, since that's the only way we know if
# something went wrong.
unless prompt == 'Enter pass phrase: '
STDERR.puts "unexpected output from `#{rpm_cmd}`: '#{prompt}'"
Process.kill(:KILL, pid)
exit 1
if prompt == 'Enter pass phrase: '
STDOUT.puts prompt
STDOUT.puts prompt
# Keep printing output unti the command exits
loop do
line = r.gets
puts line
if (line =~ /failed/) && !(line =~ /warning:/)
if line =~ /Please enter the passphrase to unlock the OpenPGP secret key:/
elsif (line =~ /failed/) && !(line =~ /warning:/)
STDERR.puts 'RPM signing failure'
exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment