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'
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 )
if self.doReboot == 0:
Message( "\nIgnoring any reboot flags set by RPMs" );
+
+ Message( "\nChecking if yum supports SSL certificate checks" )
+ if os.system( "%s --help | grep -q sslcertdir" % YUM_PATH ) == 0:
+ Message( "Yes, using --sslcertdir option" )
+ sslcertdir = "--sslcertdir=" + SSL_CERT_DIR
+ else:
+ Message( "No, not using --sslcertdir option" )
+ sslcertdir = ""
Message( "\nUpdating PlanetLab group" )
- os.system( "%s -y groupupdate \"PlanetLab\"" %
- (YUM_PATH) )
+ os.system( "%s %s -y groupupdate \"PlanetLab\"" %
+ (YUM_PATH, sslcertdir) )
Message( "\nUpdating rest of system" )
- os.system( "%s -y update" %
- (YUM_PATH) )
+ os.system( "%s %s -y update" %
+ (YUM_PATH, sslcertdir) )
Message( "\nChecking for extra groups to update" )
if os.access(EXTRA_GROUPS_FILE, os.R_OK) and \
else:
for group in string.split(extra_groups_contents,"\n"):
Message( "\nUpdating %s group" % group )
- os.system( "%s -y groupupdate \"%s\"" %
- (YUM_PATH,group) )
+ os.system( "%s %s -y groupupdate \"%s\"" %
+ (YUM_PATH, sslcertdir, group) )
else:
Message( "No extra groups file found" )
Error( "Unable to initialize." )
else:
nodeupdate.RemoveRPMS()
+ nodeupdate.InstallKeys()
nodeupdate.CheckForUpdates()
Message( "\nUpdate complete." )