Hi,

On Thursday, November 09, 2006 at 21:02:52, Marcus Rueckert wrote:

> On 2006-11-09 20:50:13 +0100, Anders Norrbring wrote:
> > >Just remove the passphrase from your key.  It does not make any sense to
> > >encrypt your private key with a passphrase and then store this passphrase
> > >somewhere on the disk for a batch process.
> > 
> > Hmm.. That would be a good point.. ;)  I didn't realize that gpg / 
> > rpmbuild accepted passphrase-free keys. I'll look at it!
> 
> better look at henne's suggestion.

#!/bin/bash

UPLOAD_DIR=/local/upload

for file in `find $UPLOAD_DIR -type f -name "*.rpm"`; do
        SIG=`rpm --nosignature -q --qf '%{SIGGPG}\n' -p $file`
        if [ $SIG == \(none\) ]; then
        TOSIGN="$file $TOSIGN"
        fi
done

if [ -z "$TOSIGN" ]; then
        echo "no packages without a signature"
        exit 0
fi

echo "packages to sign"
echo $TOSIGN

echo "adding signature to rpm"
rpm --addsign $TOSIGN

that will sign all rpm's in /local/upload without a signature with your
default key (setup in ~/.rpmmacros).

Henne

-- 
Henne Vogelsang,      http://hennevogel.de
"To die. In the rain. Alone."
                   Ernest Hemingway
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to