def WriteComponent(name='grr-rekall', version='0.4', build_system=None, modules=None, token=None, raw_data=''):
 components_base = 'grr.client.components.rekall_support.'
 if (modules is None):
  modules = [(components_base + 'grr_rekall')]
 result = rdf_client.ClientComponent(raw_data=raw_data)
 if build_system:
  result.build_system = build_system
 else:
  with utils.Stubber(platform, 'libc_ver', (lambda : ('glibc', '2.3'))):
   result.build_system = result.build_system.FromCurrentSystem()
 result.summary.modules = modules
 result.summary.name = name
 result.summary.version = version
 result.summary.cipher = rdf_crypto.SymmetricCipher.Generate('AES128CBC')
 with utils.TempDirectory() as tmp_dir:
  with open(os.path.join(tmp_dir, 'component'), 'wb') as fd:
   fd.write(result.SerializeToString())
  return maintenance_utils.SignComponent(fd.name, token=token)

def WriteComponent ( name = 'grr-rekall' , version = '0.4' , build_system = None , modules = None , token = None , raw_data = '' ) : components_base = 'grr.client.components.rekall_support.' if ( modules is None ) : modules = [ ( components_base + 'grr_rekall' ) ] result = rdf_client . ClientComponent ( raw_data = raw_data ) if build_system : result . build_system = build_system else : with utils . Stubber ( platform , 'libc_ver' , ( lambda : ( 'glibc' , '2.3' ) ) ) : result . build_system = result . build_system . FromCurrentSystem ( ) result . summary . modules = modules result . summary . name = name result . summary . version = version result . summary . cipher = rdf_crypto . SymmetricCipher . Generate ( 'AES128CBC' ) with utils . TempDirectory ( ) as tmp_dir : with open ( os . path . join ( tmp_dir , 'component' ) , 'wb' ) as fd : fd . write ( result . SerializeToString ( ) ) return maintenance_utils . SignComponent ( fd . name , token = token )
create a fake component .