On 26.05.2012 [18:03:31 -0300], Lucas Meneghel Rodrigues wrote:
> On Fri, 2012-05-25 at 16:31 -0700, Nishanth Aravamudan wrote:
> > Sometimes there are firewalls between test machines and the greater
> > Internet, so it seems unwise to depend upon external network access in
> > the boottool/grubby building code. But some sites won't have those
> > restrictions. Add the ability to configure a local mirror for the grubby
> > tarball in the CLIENT section, but default to the external location.
> 
> The problem with this patch is that makes boottool dependent on autotest
> libraries, when the script itself is sometimes used in a stand alone
> fashion. Therefore, I can't accept this as is.

Ah makes sense. I didn't realize boottool was used stand-alone, sorry.

> Cleber, I believe we should try to locate and download boottool from the
> copy present in the autotest tree, before trying to reach out to github.
> What do you say?

Ah I didn't even realize there was one in client/deps/grubby -- so,
would we try and push it out with the rest of autotest? I'm not sure
pulling will work, as the client/deps/grubby path isn't guaranteed (nor
is it setup to be, afaict) part of the web-exposed path.

Thanks,
Nish

> > Signed-off-by: Nishanth Aravamudan <[email protected]>
> > 
> > diff --git a/client/tools/boottool b/client/tools/boottool
> > index c0b095c..d4ad76e 100755
> > --- a/client/tools/boottool
> > +++ b/client/tools/boottool
> > @@ -6,9 +6,11 @@ A boottool clone, but written in python and relying mostly 
> > on grubby[1].
> >  [1] - http://git.fedorahosted.org/git/?p=grubby.git
> >  '''
> >  
> > +from autotest.client.shared import global_config
> >  import os, re, sys, optparse, logging, subprocess
> >  import urllib, tarfile, tempfile, shutil, struct, md5
> >  
> > +GLOBAL_CONFIG = global_config.global_config
> >  
> >  __all__ = ['Grubby', 'OptionParser', 'App', 'EfiVar', 'EfiToolSys',
> >             'EliloConf', 'find_executable', 'parse_entry']
> > @@ -18,7 +20,10 @@ __all__ = ['Grubby', 'OptionParser', 'App', 'EfiVar', 
> > 'EfiToolSys',
> >  # Information on default requirements and installation for grubby
> >  #
> >  GRUBBY_REQ_VERSION = (8, 11)
> > -GRUBBY_TARBALL_URI = ('http://cloud.github.com/downloads/autotest/'
> > +GRUBBY_MIRROR = GLOBAL_CONFIG.get_config_value('CLIENT',
> > +                                               'grubby_mirror',
> > +                                          
> > default='http://cloud.github.com/downloads/autotest/')
> > +GRUBBY_TARBALL_URI = GRUBBY_MIRROR +
> >                        'grubby/grubby-8.11-autotest.tar.bz2')
> >  GRUBBY_TARBALL_MD5 = '56695ec865460b25f20427b5329ef641'
> >  GRUBBY_DEFAULT_SYSTEM_PATH = '/sbin/grubby'
> > diff --git a/global_config.ini b/global_config.ini
> > index 4f5a976..a753e80 100644
> > --- a/global_config.ini
> > +++ b/global_config.ini
> > @@ -80,6 +80,8 @@ kernel_mirror: http://www.kernel.org/pub/linux/kernel/
> >  kernel_gitweb:
> >  # gitweb installation(s) for -stable tree (space-separated)
> >  stable_kernel_gitweb:
> > +# local mirror for grubby tarballs
> > +# grubby_mirror:
> >  
> >  [SERVER]
> >  # Hostname of the autotest RPC server. You should set a different hostname
> > 
> 
> 

-- 
Nishanth Aravamudan <[email protected]>
IBM Linux Technology Center

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to