Skip to content
Snippets Groups Projects

Implementation of layered LCG software stacks

Merged Pere Mato Vila requested to merge SPI-1401 into master
1 file
+ 43
1
Compare changes
  • Side-by-side
  • Inline
+ 43
1
@@ -178,6 +178,14 @@ def lcgcmake_configure(args) :
else:
c_options += ['-DUSE_BINARIES=OFF']
if(args.withtarfiles):
c_options += ['-DLCG_TARBALL_INSTALL=ON']
else:
c_options += ['-DLCG_TARBALL_INSTALL=OFF']
if(args.withrpms):
print("Option --with-rmps not yet implemented!!")
if(debug):
c_options += ['-DCMAKE_BUILD_TYPE=Debug']
@@ -319,6 +327,33 @@ def lcgcmake_reset(args):
print('Reseting current LCGCMAKE session')
os.remove(jsonfile)
#---Upload-------------------------------------------------------------------------------------------------
def lcgcmake_upload(args):
if args.what == 'tarfiles':
localdir = 'tarfiles'
if args.releaseupload:
remotedir = '/eos/project/l/lcg/www/lcgpackages/tarFiles/releases'
else:
remotedir = '/eos/project/l/lcg/www/lcgpackages/tarFiles/latest'
print("Uploading all the created binary tarfiles to the EOS repository (%s).\nPassword could be asked by 'scp'" % remotedir)
tarfiles = []
for f in os.listdir(localdir):
if os.path.isfile(os.path.join(localdir, f)) and '-HEAD' not in f:
tarfiles.append(os.path.join(localdir, f))
if not tarfiles:
print('No tarfiles to upload')
return
rc = subprocess.call(['scp']+ tarfiles + ['lxplus.cern.ch:' + remotedir])
if rc == 0 :
print("Producing the summary files in the EOS directory.\nPassword could be asked by `ssh`")
rc = subprocess.call(['ssh','lxplus.cern.ch',os.path.join(remotedir,'make-summaries')])
if rc != 0 :
sys.exit(rc)
else:
sys.exit(rc)
#---Utility functions-----------------------------------------------------------------------------------
def make_compilerversion(command, version):
patt = re.compile('([0-9]+)[.]([0-9]+)')
@@ -584,6 +619,8 @@ if __name__ == '__main__':
p_c.add_argument('-t', '--target_platform', dest='target_platform', help='Force a plaform string (e.g. x86_64-centos7-gcc7-opt)', default=None)
p_c.add_argument('--lcg-prefix', dest='lcg_prefix', help='Location(s) of existing LCG releases. Used for incremental builds (: separated)')
p_c.add_argument('--no-binary', dest='binary', action='store_false', help='Force not using binary installations if they exists')
p_c.add_argument('--with-tarfiles', dest='withtarfiles', action='store_true', help='Produce the binary tarfiles while building the packages')
p_c.add_argument('--with-rpms', dest='withrpms', action='store_true', help='Produce the rpms while building the packages')
p_m = subparsers.add_parser('install', help='Install or build a set of given targets with all their dependencies')
p_m.add_argument('targets', nargs='*', help='Select the target[s]', default=['top_packages'])
p_s = subparsers.add_parser('show', help='get information from the lcgcmake session', aliases=['sh'])
@@ -592,7 +629,10 @@ if __name__ == '__main__':
p_r.add_argument('runcmd', nargs='*', help='Command to run', default=['/bin/bash'])
p_t = subparsers.add_parser('reset', help='reset the lcgcmake session')
p_t.add_argument('--full', dest='fullreset', action='store_true', help='force a full reset by deleting all the locally installed packages')
p_u = subparsers.add_parser('upload', help='Upload build/install artifacts', aliases=['up'])
p_u.add_argument('what', help='What to uopload', choices=['tarfiles','rpms'])
p_u.add_argument('--release', dest='releaseupload', action='store_true', help='Upload into the release directory')
args = parser.parse_args()
if args.command in ['configure','config','conf'] :
@@ -607,3 +647,5 @@ if __name__ == '__main__':
lcgcmake_version(args)
elif args.command in ['reset'] :
lcgcmake_reset(args)
elif args.command in ['upload', 'up'] :
lcgcmake_upload(args)
Loading