RPM v4 signature check

[email protected] Tue, 9 Nov 2004 20:08:01 +0100 (CET)
Newsgroups gmane.linux.suse.fou4s.devel
Message-ID <[email protected]>
we are using a lot of selfbuild rpm packages (e.g. Apache, Squid)
With SuSE 9.1 rpm is comming in version 4 (rpm-4.1.1-177). Because the new
version has different messages, your function hasGoodRPMSignature does not
recognize the valid signature with the imported public gpg key.
So I expanded the function in fou4s-0.12.4.
Please see the diff file for my changes.
I hope, you apply my changes in the next version.

Thanks,
Elmar Kluegel


fou4s-0.12.4-rpm-4_sigcheck.diff

--- /usr/sbin/fou4s        2004-10-26 16:48:13.000000000 +0200
+++ ./fou4s        2004-11-09 18:55:54.183066694 +0100
@@ -1597,6 +1597,9 @@
         elif [[ $sigresult == *gpg:\ Good\ signature\ from* ]] && \
                 [[ $sigresult != *gpg:\ WARNING:\ This\ key\ is\ not\
certified\ with\
a\ trusted\ signature* ]] ; then
                 return 0 # ok
+        elif [[ $sigresult == *V3\ DSA\ signature:\ OK* ]] && \
+                [[ $sigresult != *gpg:\ WARNING:\ This\ key\ is\ not\
certified\ with\
a\ trusted\ signature* ]] ; then
+                return 0 # ok
         else
                 if [ "`echo "$sigresult" | wc -l`" -le 2 ] && \
                         [[ $sigresult == *MD5\ sum\ OK* ]] ; then

fou4s message:
squid                  2.5.STABLE7-713.32768.mbu
(2.5.STABLE6-711.32768.mbu) [ok] generated    2365kb
Signature verification failed for squid-2.5.STABLE7-713.32768.mbu.i586.rpm
(no installation)! You may want to try the -g option to ignore this error.
squid-2.5.STABLE7-713.32768.mbu.i586.rpm:
    Header V3 DSA signature: OK, key ID 2f443a24
    Header SHA1 digest: OK (c04e49143c8d7be259fa1610dddbefa33cde2fbd) MD5
digest: OK (61cc0ed7131488b98e996dcd4a5c1824)
    V3 DSA signature: OK, key ID 2f443a24

Warning: 1 updates failed. Please fix the problems and try again





--