From 232aebe04e6dd2d57eec1a8209768ece6f0bf9a5 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Tue, 9 May 2006 16:43:04 +0000 Subject: [PATCH] - (re)install any GPG signing keys before running yum --- NodeUpdate.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/NodeUpdate.py b/NodeUpdate.py index 41d5880..f863403 100644 --- a/NodeUpdate.py +++ b/NodeUpdate.py @@ -65,6 +65,8 @@ YUM_PATH = "/usr/bin/yum" RPM_PATH = "/bin/rpm" +RPM_GPG_PATH = "/etc/pki/rpm-gpg" + # location of file containing http/https proxy info, if needed PROXY_FILE = '/etc/planetlab/http_proxy' @@ -154,6 +156,14 @@ class NodeUpdate: return 0 + def InstallKeys( self ): + Message( "\nRemoving any existing GPG signing keys from the RPM database" ) + os.system( "%s --allmatches -e gpg-pubkey" % RPM_PATH ) + + Message( "\nInstalling all GPG signing keys in %s" % RPM_GPG_PATH ) + os.system( "%s --import %s/*" % (RPM_PATH, RPM_GPG_PATH) ) + + def ClearRebootFlag( self ): os.system( "/bin/rm -rf %s" % REBOOT_FLAG ) @@ -278,6 +288,7 @@ if __name__ == "__main__": Error( "Unable to initialize." ) else: nodeupdate.RemoveRPMS() + nodeupdate.InstallKeys() nodeupdate.CheckForUpdates() Message( "\nUpdate complete." ) -- 2.43.0