Signing an rpm package at build-time automatically

Richard June rjune at bravegnuworld.com
Thu Jul 1 13:57:04 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've done something similar. I've attached the expect script I use.

On Wednesday 23 June 2004 02:01, Didier Casse wrote:
> Hi there!
>          When we built a package, we can sign it at build time by issuing
> the command:
>
> rpm -ba --sign file.spec
>
> and it will prompt for something like this:
>
> Enter pass phrase: <passphrase> (Not echoed)
>
> Now on my system I need to build rpm automatically ( without human
> intervention)! Is it possible to have my paraphrase being read in a file
> rather than me sitting in front of the computer and actually typing it?
>
> I know it's not a very good idea but my rpms need to be generated
> automatically daily via cron, and I can't sit behind my pc and type the
> paraphrase each time one rpm is being built.
>
> Can I avoid the prompting of the paraphrase if I want to sign my packages
> at build-time and everything be done automatically? Thanks.
>
> This is for the purpose of a repository and things like these need to be
> automated when dealing with multiple packages.
>
> With kind regards,
>
> Didier.
>
> ---
> PhD student.
>
> Singapore Synchrotron Light Source (SSLS)
> 5 Research Link,
> Singapore 117603
>
> Email: didierbe at sps dot nus dot edu dot sg
>
> Web: http://ssls.nus.edu.sg

- -- 
Public Key available Here:
http://www.bravegnuworld.com/~rjune/rjune.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA5BgzoEoft/7GAvIRAheKAKCfjvrTjhqVcuE2gpJwHFqOY6x9PgCfS4wi
a6ecC9sHg5tjMcDEE6enIik=
=hHiN
-----END PGP SIGNATURE-----
-------------- next part --------------
#!/usr/bin/expect -f
# wrapper to make rpm --sign be non-interactive
# passwd is 1st arg, file to sign is 2nd
#send_user «$argv0 [lrange $argv 0 2]\n" 
#set files [lrange $argv 1 $argc ]

set password [lindex $argv 0]
set files [lrange $argv 1 1 ]
spawn rpm --addsign $files
expect "Enter pass phrase:"
send -- "$password\r"
expect eof


More information about the fedora-devel-list mailing list