From 2b112424f02678c64156ff0a19d3151f6dd01c45 Mon Sep 17 00:00:00 2001 From: Patric Karwat Date: Fri, 5 Sep 2025 06:40:37 +0000 Subject: [PATCH] Update make_rpmSVOnly.py --- make_rpmSVOnly.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/make_rpmSVOnly.py b/make_rpmSVOnly.py index 22397d0..c504064 100755 --- a/make_rpmSVOnly.py +++ b/make_rpmSVOnly.py @@ -105,7 +105,7 @@ class build(object): return specname die( 'Unable to find a valid spec file in %s' % specdir ) - def copy_spec( self, svn_fullpath, dest_dir, spec_fullpath ): + def copy_spec( self, dest_dir, spec_fullpath ): # copy spec to build f = open( spec_fullpath, 'r' ) content = f.read() @@ -125,6 +125,7 @@ class build(object): cmake_flags += '-D%s_VERSION_DATE:STRING="%s" ' % (self.cmake_version_prefix, self.version_date) cmake_flags += '-D_pname:STRING="%s" ' % (self.project_name) + jenkins_build_number = os.getenv( "BUILD_NUMBER" ) if jenkins_build_number != None: cmake_flags += '-DJENKINS_BUILD_NUMBER:STRING="%s" '% (jenkins_build_number) @@ -142,7 +143,7 @@ class build(object): content = content.replace( "@OS_SYSTEM@", getOS_Name() ) content = content.replace( "@PACKAGER@", getpass.getuser() ) content = content.replace( "@VERSION@", self.version_str() ) - content = content.replace( "@RELEASE@", self.version_rev ) + content = content.replace( "@RELEASE@", str(self.version_rev) ) content = content.replace( "@SOURCE_DIR_REL@", self.source_dir_rel ) content = content.replace( "@SOURCES@", self.xzfilename() ) content = content.replace( "@APPLICATION@", self.repository ) @@ -151,6 +152,7 @@ class build(object): if not os.path.exists( dest_dir ): os.makedirs( dest_dir ) f = open( os.path.join( dest_dir, os.path.split( spec_fullpath )[1] ), 'w' ) + f.write( content ) f.close()