Smock successor?

Nathanael D. Noblet nathanael at gnat.ca
Thu Apr 4 21:53:32 UTC 2013


On 04/04/2013 10:25 AM, Till Maas wrote:
> Can you provide the patches? Adding support to sign packages is
> something I want to look into as well.

I thought I provided them upstream awhile ago when I wrote them at this 
point I don't know what is original and what is not. Attached is my 
smock-threaded.pl script diffing it against whatever is latest would 
likely show you the changes made. You'll note that it has an autosign 
script it calls if it is asked to auto sign the rpms. Since this was all 
internal and used mainly for quick development builds I had a *terrible* 
script that used expect and all that for the password. It would be much 
better to just grab from the perl script itself the signing password 
than to do what I did. I also hardcoded the number of packages. Not my 
best work but included for completeness... :D




-- 
Nathanael d. Noblet
t 403.875.4613
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smock-threaded.pl
Type: application/x-perl
Size: 12078 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20130404/a99701c1/attachment.pl>
-------------- next part --------------
#!/usr/bin/expect

set package_0 [ lindex $argv 0 ]
set package_1 [ lindex $argv 1 ]
set package_2 [ lindex $argv 2 ]
set package_3 [ lindex $argv 3 ]
set package_4 [ lindex $argv 4 ]
set package_5 [ lindex $argv 5 ]
set package_6 [ lindex $argv 6 ]
set package_7 [ lindex $argv 7 ]
set package_8 [ lindex $argv 8 ]

if {$argc == 0} {
  send_user "NO arguments??? $argv"
}
if {$argc == 1} {
send_user "calling rpmsign --addsign $package_0\nargv: $argv"
spawn rpmsign "--addsign" $package_0
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof

}
if {$argc == 2} {
spawn rpmsign "--addsign" $package_0 $package_1
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof

}
if {$argc == 3} {
spawn rpmsign "--addsign" $package_0 $package_1 $package_2
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof

}
if {$argc == 4} {
spawn rpmsign "--addsign" $package_0 $package_1 $package_2 $package_3
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof

}
if {$argc == 5} {
spawn rpmsign "--addsign" $package_0 $package_1 $package_2 $package_3 $package_4
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof
}
if {$argc == 6} {
spawn rpmsign "--addsign" $package_0 $package_1 $package_2 $package_3 $package_4 $package_5
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof
}
if {$argc == 7} {
spawn rpmsign "--addsign" $package_0 $package_1 $package_2 $package_3 $package_4 $package_5 $package_6
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof
}
if {$argc == 8} {
spawn rpmsign "--addsign" $package_0 $package_1 $package_2 $package_3 $package_4 $package_5 $package_6 $package_7
expect "Enter pass phrase: "
send PASSWORD_HERE\r
expect eof
}


More information about the devel mailing list