Removes comments and refs

This commit is contained in:
torsten committed 2026-07-18 13:06:31 +02:00
1 parent d6584b3519
commit 6bb80ee9c8
12 files changed
+215 -215

No files matched your search

+37 -37
View File
@@ -1,11 +1,11 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# $Id: make_rpmSVOnly.py 1382 2023-10-09 04:11:49Z fritsche_h $
# $HeadURL: svn://slssvn/admin/rpmbuild/make_rpmSVOnly.py $
# $Author: fritsche_h $
# Created by Christian Ehrlicher, SLSE, 20013-02-19
#
import datetime
import getopt
@@ -17,7 +17,7 @@ import time
import ConfigParser
import fnmatch
# helper functions
loc = os.path.dirname( sys.argv[0] )
loc = os.path.abspath( loc )
exec(compile(open('helpers.py').read(), 'helpers.py', 'exec'))
@@ -33,7 +33,7 @@ class build(object):
self.version_rev = 0
self.cmake_version_prefix = "TDS"
self.source_dir_rel = "legatus"
#self.svn_fullpath = None
self.build_hla_rpm = "false"
self.build_sv_rpm = "true"
self.build_lic_rpm = "false"
@@ -68,14 +68,14 @@ class build(object):
print(" Build WS RPM: %s" % self.build_ws_rpm)
print(" Build Building RPM: %s" % self.build_bld_rpm)
print(" Build AAR RPM: %s" % self.build_aar_rpm)
# print(" SVN Path: %s" % self.svn_fullpath)
print(" Version: %s.%s-%s" % ( self.version_maj, self.version_min, self.version_rev ))
print(" Jenkins build number: %s" % os.getenv( "BUILD_NUMBER" ))
print(" Date: %s" % self.version_date)
print("")
time.sleep(2)
# does a svn export, returns True when it's a checkout or False when it's an update
def svn_export( self, svn_path, dest_dir, svn_revision = "HEAD", svn_user = None, svn_passwd = None ):
removeDirectory( dest_dir )
@@ -125,17 +125,17 @@ class build(object):
die( 'Unable to find a valid spec file in %s' % specdir )
def copy_spec( self, dest_dir, spec_fullpath ):
# copy spec to build
f = open( spec_fullpath, 'r' )
content = f.read()
f.close()
# Jenkins Build Tag (wird von Jenkins gesetzt wenn darüber gebaut wird)
jenkins_build_tag = os.getenv( "BUILD_TAG" )
if jenkins_build_tag == None or len(jenkins_build_tag) == 0:
jenkins_build_tag = 'Not build with jenkins job'
# Versionsinformationen übergeben
cmake_flags = ""
cmake_flags += '-D%s_VERSION_MAJOR:STRING="%s" ' % (self.cmake_version_prefix, self.version_maj)
cmake_flags += '-D%s_VERSION_MINOR:STRING="%s" ' % (self.cmake_version_prefix, self.version_min)
@@ -151,13 +151,13 @@ class build(object):
if self.cmake_build_flags:
cmake_flags += ' %s ' % self.cmake_build_flags
# und den Buildtype
cmake_flags += '-DCMAKE_BUILD_TYPE="%s" ' % self.buildtype
filename = 'project.%s.cfg' % self.project_name
cmake_flags += '-DTDS_PROJECT_CONFIG_FILE=%s ' % filename
## auto add BuildFlags depending on the modules
if self.build_sv_rpm == "true":
cmake_flags += '-DBUILD_SV=ON '
if self.build_ws_rpm == "true":
@@ -165,7 +165,7 @@ class build(object):
if self.build_hla_rpm == "true":
cmake_flags += '-DBUILD_HLA=ON -DBUILD_SVC_HLA=ON '
if self.build_aar_rpm == "true":
cmake_flags += '-DBUILD_AAR=ON '
cmake_flags += '-DBUILD_AAR=ON '
content = content.replace( "@PROJECT@", self.project_name )
content = content.replace( "@OS_SYSTEM@", getOS_Name() )
@@ -180,9 +180,9 @@ class build(object):
content = content.replace( "@BUILDSVNRPM@", self.build_sv_rpm )
content = content.replace( "@BUILDRPMHLA@", self.build_hla_rpm )
content = content.replace( "@BUILDRPMLIC@", self.build_lic_rpm )
# content = content.replace( "@BUILDRPMWS@", self.build_ws_rpm )
# content = content.replace( "@BUILDRPMBLD@", self.build_bld_rpm )
# content = content.replace( "@BUILDRPMAAR@", self.build_aar_rpm )
if not os.path.exists( dest_dir ):
@@ -218,8 +218,8 @@ class build(object):
info( "Packing sources in %s to %s" % ( src_dir, xzfilename ) )
info( "--------------------------------" )
removeDirectory( xzfilename ) # falls es ein directory ist
if os.path.exists( xzfilename ): # falls es eine datei ist
removeDirectory( xzfilename )
if os.path.exists( xzfilename ):
os.remove( xzfilename )
if not os.path.exists( dest_dir ):
os.makedirs( dest_dir )
@@ -228,16 +228,16 @@ class build(object):
cmd = "tar cJf %s %s" % ( xzfilename, os.path.split( src_dir )[1] )
system( cmd, sys.stdout ) and die( "while packing. cmd: %s" % command )
# svn export ${svn} ${base}
# fixup_rde_header ${base} "c"
# fixup_rde_header ${base} "h"
# fixup_rde_header ${base} "cpp"
# fixup_rde_header ${base} "hpp"
# fixup_rde_header ${base} "txt"
# fixup_rde_header ${base} "py"
# cp ${base}/specs/ctc.spec /usr/src/packages/SPECS/
def usage():
@@ -296,27 +296,27 @@ def main():
svn_path = a
# b.check_rpm("ctc_EXTFW_%s" % os_str)
#b.version_rev = getSvn_Release( b.svn_fullpath )
b.version_rev = os.getenv( "BUILD_NUMBER" )
# b.version_date = getSvn_Date( b.svn_fullpath )
b.version_date = os.getenv( "VERSION_DATE" )
b.init()
b.printOptions()
# rpmbase_dir = os.path.join( os.getenv( "HOME" ), 'rpmbuild' )
rpmbase_dir = '/shd/CTC/TOOLS/rpmbuild'
# project_base_dir = '/builds/projects-domain-live/tds'
# project_base_dir = os.getenv( "PROJECT_BASE_DIR" )
project_base_dir = os.getenv( "WORKSPACE" )
specdir = os.path.join( rpmbase_dir, "SPECS" )
#specdir = os.path.join( rpmbase_dir, "SPECS" )
if not os.path.exists(specdir):
os.makedirs(specdir)
@@ -331,7 +331,7 @@ def main():
b.pack_sources( os.path.join(project_base_dir, 'legatus'), os.path.join( rpmbase_dir, "SOURCES" ) )
exec_rpmbuild( specdir, specname )
# move rpms to FOO-1.2-345
dstdir = os.path.join( b.output_dir, "%s-%s-%s" % ( b.project_name, b.repository, full_version ) )
filter = re.compile( "^.*%s\..*\.rpm$" % full_version )
moved_files = moveFilesToDir( rpmbase_dir,