upload tizen1.0 source 24/24/1 1.0_post
authorSungho Park <chywoo.park@samsung.com>
Mon, 30 Apr 2012 09:06:25 +0000 (18:06 +0900)
committerSungho Park <chywoo.park@samsung.com>
Mon, 30 Apr 2012 09:06:25 +0000 (18:06 +0900)
Change-Id: I232e4e72700c4ebb3c4bd418aa271c0590259aff

12 files changed:
.cproject [new file with mode: 0644]
.project [new file with mode: 0644]
Makefile
build-package_linux.sh [deleted file]
build-package_mac.sh [deleted file]
build-package_win.sh [deleted file]
libxml2/build_win.sh [deleted file]
libxml2/patch/mingw.patch [deleted file]
package/build.windows
package/pkginfo.manifest
package_upload.sh [deleted file]
src/execute.c

diff --git a/.cproject b/.cproject
new file mode 100644 (file)
index 0000000..67da42e
--- /dev/null
+++ b/.cproject
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+       <storageModule moduleId="org.eclipse.cdt.core.settings">
+               <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1952911960">
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.1952911960" moduleId="org.eclipse.cdt.core.settings" name="Default">
+                               <externalSettings/>
+                               <extensions>
+                                       <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+                                       <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                                       <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+                               </extensions>
+                       </storageModule>
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+                               <configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.1952911960" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+                                       <folderInfo id="cdt.managedbuild.toolchain.gnu.base.1952911960.478375858" name="/" resourcePath="">
+                                               <toolChain id="cdt.managedbuild.toolchain.gnu.base.1609218737" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
+                                                       <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.185221648" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
+                                                       <builder id="cdt.managedbuild.target.gnu.builder.base.551638038" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.archiver.base.770573228" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1336870518" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.2074173005" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.860665706" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
+                                                               <option id="gnu.c.compiler.option.include.paths.157664431" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+                                                                       <listOptionValue builtIn="false" value="/usr/include/libxml2"/>
+                                                               </option>
+                                                               <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.864323782" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1560177953" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+                                                       <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.463814255" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1399254113" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+                                                                       <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+                                                                       <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+                                                               </inputType>
+                                                       </tool>
+                                                       <tool id="cdt.managedbuild.tool.gnu.assembler.base.1102070453" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
+                                                               <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1960954268" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+                                                       </tool>
+                                               </toolChain>
+                                       </folderInfo>
+                               </configuration>
+                       </storageModule>
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+               </cconfiguration>
+       </storageModule>
+       <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+               <project id="smart-build-interface.null.470632946" name="smart-build-interface"/>
+       </storageModule>
+       <storageModule moduleId="refreshScope" versionNumber="1">
+               <resource resourceType="PROJECT" workspacePath="/smart-build-interface"/>
+       </storageModule>
+       <storageModule moduleId="scannerConfiguration">
+               <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1952911960;cdt.managedbuild.toolchain.gnu.base.1952911960.478375858;cdt.managedbuild.tool.gnu.c.compiler.base.860665706;cdt.managedbuild.tool.gnu.c.compiler.input.864323782">
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+               </scannerConfigBuildInfo>
+               <scannerConfigBuildInfo instanceId="cdt.managedbuild.toolchain.gnu.base.1952911960;cdt.managedbuild.toolchain.gnu.base.1952911960.478375858;cdt.managedbuild.tool.gnu.cpp.compiler.base.1336870518;cdt.managedbuild.tool.gnu.cpp.compiler.input.2074173005">
+                       <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+               </scannerConfigBuildInfo>
+       </storageModule>
+</cproject>
diff --git a/.project b/.project
new file mode 100644 (file)
index 0000000..4ed4dad
--- /dev/null
+++ b/.project
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>smart-build-interface</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+                       <triggers>clean,full,incremental,</triggers>
+                       <arguments>
+                               <dictionary>
+                                       <key>?name?</key>
+                                       <value></value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.append_environment</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.buildArguments</key>
+                                       <value></value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.buildCommand</key>
+                                       <value>make</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+                                       <value>clean</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.contents</key>
+                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+                                       <value>false</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.stopOnError</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+                                       <value>true</value>
+                               </dictionary>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+                       <triggers>full,incremental,</triggers>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.cdt.core.cnature</nature>
+               <nature>org.eclipse.cdt.core.ccnature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+       </natures>
+</projectDescription>
index a937f5a..5d9db54 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,9 @@
 CC = gcc
 CFLAGS = -g -Wall
 LDFLAGS = 
-OS=$(shell uname -s)
 
-ifeq ($(OS),Darwin)
-OS = Linux
-endif
-
-ifeq ($(OS),Linux)
 XMLCFLAGS = `xml2-config --cflags`
 XMLLDFLAGS = `xml2-config --libs`
-else
-XMLCFLAGS = `./libxml2/usr/bin/xml2-config --cflags`
-XMLLDFLAGS = `./libxml2/usr/bin/xml2-config --libs`
-endif
 
 CFLAGS += $(XMLCFLAGS)
 
@@ -22,9 +12,6 @@ all: prebuild bin/sbi bin/sbi_build
 
 prebuild: 
        mkdir -p bin
-ifneq ($(OS),Linux)
-       cd libxml2 ; ./build_win.sh
-endif
 
 bin/sbi_build: bin/sbi_build.o $(COMMON_OBJS) bin/plugin_mgt.o bin/plugin.o
        $(CC) $(LDFLAGS) -o $@ bin/sbi_build.o $(COMMON_OBJS) bin/plugin_mgt.o bin/plugin.o $(XMLLDFLAGS)
diff --git a/build-package_linux.sh b/build-package_linux.sh
deleted file mode 100755 (executable)
index 2695da6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh -e
-CURDIR=`pwd`
-
-rm -rf $CURDIR/package
-mkdir -p $CURDIR/package
-
-#pkginfo file copy 
-cp $CURDIR/pkginfo.manifest $CURDIR/package/pkginfo.manifest
-#copy remove script
-cp $CURDIR/remove.sh $CURDIR/package/remove.sh
-#add remove script section for pkginfo.manifest
-echo "Remove-script : remove.sh" >> $CURDIR/package/pkginfo.manifest
-
-VERSION=`cat $CURDIR/package/pkginfo.manifest | grep Version | cut -d ':' -f2 | tr -d ' ' ` 
-
-#init
-rm -rf *.zip
-
-rm -rf $CURDIR/package/data
-mkdir -p $CURDIR/package/data/SDK/build-system/bin
-mkdir -p $CURDIR/package/data/SDK/build-system/plugins/
-
-make clean ; make
-
-#copy
-cp $CURDIR/bin/sbi $CURDIR/package/data/SDK/build-system/bin/
-cp $CURDIR/bin/sbi_build $CURDIR/package/data/SDK/build-system/bin/
-
-#packaging
-cd $CURDIR/package
-zip -r -y $CURDIR/smart-build-interface_${VERSION}_linux.zip *
diff --git a/build-package_mac.sh b/build-package_mac.sh
deleted file mode 100755 (executable)
index e91ca24..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh -e
-CURDIR=`pwd`
-
-rm -rf $CURDIR/package
-mkdir -p $CURDIR/package
-
-#pkginfo file copy 
-cp $CURDIR/pkginfo.manifest $CURDIR/package/pkginfo.manifest
-#copy remove script
-cp $CURDIR/remove.sh $CURDIR/package/remove.sh
-#add remove script section for pkginfo.manifest
-echo "Remove-script : remove.sh" >> $CURDIR/package/pkginfo.manifest
-
-VERSION=`cat $CURDIR/package/pkginfo.manifest | grep Version | cut -d ':' -f2 | tr -d ' ' ` 
-
-#init
-rm -rf *.zip
-
-rm -rf $CURDIR/package/data
-mkdir -p $CURDIR/package/data/SDK/build-system/bin
-mkdir -p $CURDIR/package/data/SDK/build-system/plugins/
-
-make clean ; make
-
-#copy
-cp $CURDIR/bin/sbi $CURDIR/package/data/SDK/build-system/bin/
-cp $CURDIR/bin/sbi_build $CURDIR/package/data/SDK/build-system/bin/
-
-#packaging
-cd $CURDIR/package
-zip -r -y $CURDIR/smart-build-interface_${VERSION}_mac.zip *
diff --git a/build-package_win.sh b/build-package_win.sh
deleted file mode 100755 (executable)
index b86f03d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh -x
-if [ "$WORKSPACE" ]
-then
- CURDIR=$WORKSPACE/smart-build-interface
- CURDIR="`echo $CURDIR | tr '\\' '/' | sed 's/C:/\/c/'`"
- echo $CURDIR
- cd $CURDIR
-else
- CURDIR=`pwd`
-fi
-
-rm -rf $CURDIR/package
-mkdir -p $CURDIR/package
-
-#pkginfo file copy
-cp $CURDIR/pkginfo.manifest $CURDIR/package/pkginfo.manifest
-#copy remove script
-cp $CURDIR/remove.bat $CURDIR/package/remove.bat
-#add remove script section for pkginfo.manifest
-echo "Remove-script : remove.bat" >> $CURDIR/package/pkginfo.manifest
-
-VERSION=`cat "$CURDIR"/package/pkginfo.manifest | grep Version | cut -d ':' -f2 | tr -d ' ' ` 
-
-#init 
-rm -rf *.zip
-rm -rf "$CURDIR"/package/data
-mkdir -p "$CURDIR"/package/data/SDK/build-system/bin
-mkdir -p "$CURDIR"/package/data/SDK/build-system/plugins
-
-make clean ; make
-
-#copy
-cp "$CURDIR"/bin/sbi.exe $CURDIR/package/data/SDK/build-system/bin/
-cp "$CURDIR"/bin/sbi_build.exe $CURDIR/package/data/SDK/build-system/bin/
-cp "$CURDIR"/libxml2/usr/bin/*.dll $CURDIR/package/data/SDK/build-system/bin/
-cp "$CURDIR"/sbi-build.bat $CURDIR/package/data/SDK/build-system/bin/ 
-
-#packaging
-cd "$CURDIR"/package
-zip -r "$CURDIR"/smart-build-interface_${VERSION}_windows.zip *
diff --git a/libxml2/build_win.sh b/libxml2/build_win.sh
deleted file mode 100755 (executable)
index 80cde4f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh -e
-CURDIR=`pwd`
-
-#extract
-rm -rf libxml2-2.7.8 
-tar xvf libxml2-2.7.8.tar.gz
-
-#patch if windows
-cd $CURDIR/libxml2-2.7.8
-patch -p1 < ../patch/mingw.patch
-
-#build & install
-mkdir -p $CURDIR/usr
-./configure --prefix=$CURDIR/usr
-make
-make install
diff --git a/libxml2/patch/mingw.patch b/libxml2/patch/mingw.patch
deleted file mode 100644 (file)
index 4f43f11..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -urN libxml2-2.7.8/testThreads.c libxml2-2.7.8_modified/testThreads.c
---- libxml2-2.7.8/testThreads.c        2010-10-12 15:25:32 +0900
-+++ libxml2-2.7.8_modified/testThreads.c       2011-09-20 10:25:51 +0900
-@@ -107,7 +107,8 @@
-       for (i = 0; i < num_threads; i++) {
-           results[i] = NULL;
--          tid[i] = (pthread_t) -1;
-+          /*tid[i] = (pthread_t) -1;*/
-+          memset(&tid[i], 0xff, sizeof(tid[i]) );
-       }
-       for (i = 0; i < num_threads; i++) {
index 1b9d1f5..71482e1 100755 (executable)
@@ -5,16 +5,12 @@ clean()
        make clean
        rm -rf $SRCDIR/*.zip
        rm -rf $SRCDIR/*.tar.gz
-       rm -rf $SRCDIR/bin 
-       rm -rf $SRCDIR/libxml2/usr
-       rm -rf $SRCDIR/libxml2/libxml2-2.7.8
-       rm -rf $SRCDIR/libxml2/libxml2-2.7.8.tar.gz
+       rm -rf $SRCDIR/bin
 }
 
 # build
 build() 
 {
-       cp $ROOTDIR/libxml2-2.7.8.tar.gz $SRCDIR/libxml2/
        make
 }
 
@@ -25,8 +21,9 @@ install()
        mkdir -p $BIN_DIR
        PLUGINS_DIR=$SRCDIR/package/smart-build-interface.package.windows/data/SDK/build-system/plugins
        mkdir -p $PLUGINS_DIR
-       cp $SRCDIR/bin/sbi $BIN_DIR/
-       cp $SRCDIR/bin/sbi_build $BIN_DIR/
+       cp $SRCDIR/bin/sbi.exe $BIN_DIR/
+       cp $SRCDIR/bin/sbi_build.exe $BIN_DIR/
+       cp $SRCDIR/sbi-build.bat $BIN_DIR/
 }
 
 [ "$1" = "clean" ] && clean
index 6682350..a2b1421 100644 (file)
@@ -1,5 +1,5 @@
 Package : smart-build-interface
-Version : 0.20.16
+Version : 0.22.1
 Maintainer : Taejun Ha <taejun.ha@samsung.com>, Jiil Hyoun <jiil.hyoun@samsung.com>, Donghyuk Yang <donghyuk.yang@samsung.com>, Donghee Yang<donghee.yang@samsung.com>
 Description : smart build interface for Tizen SDK
 OS : linux
@@ -7,11 +7,9 @@ Build-host-os : linux
 Source : smart-build-interface
 
 Package : smart-build-interface
-Version : 0.20.16
+Version : 0.22.1
 Maintainer : Taejun Ha <taejun.ha@samsung.com>, Jiil Hyoun <jiil.hyoun@samsung.com>, Donghyuk Yang <donghyuk.yang@samsung.com>, Donghee Yang<donghee.yang@samsung.com>
 Description : smart build interface for Tizen SDK
 OS : windows
 Build-host-os : windows 
-Install-dependency :
-Source-dependency : libxml2-2.7.8.tar.gz [windows]
 Source : smart-build-interface
diff --git a/package_upload.sh b/package_upload.sh
deleted file mode 100755 (executable)
index 024c519..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# Script by TaeYoung Son
-if [ $# -lt 1 ] 
-then
-  echo "Usage: package_upload {linux|windows|inhouse}" 
-  exit 1
-fi
-
-
-platform=$1
-case $1 in 
-linux)
-upload_platform_name=LINUX_PUBLIC
-platform=linux
-package_file_list=`ls *_${platform}.zip`
-;;
-windows)
-upload_platform_name=WINDOWS
-platform=windows
-package_file_list=`ls *_${platform}.zip`
-;;
-inhouse)
-upload_platform_name=LINUX_INHOUSE
-platform=linux
-package_file_list=`ls *_${platform}.zip|grep -v rootstrap`
-;;
-*)
-echo "${platform} is not supported yet."
-exit 1
-;;
-esac
-
-cupload_patform_name=$1
-current_date=`date +%Y%m%d`
-upload_server=172.21.111.180
-upload_directory=/packages/${current_date}_PACKAGES_${upload_platform_name}
-upload_user=core
-upload_password=tmaxcore
-
-echo "Upload to server..."
-for package_file in ${package_file_list}
-do
-echo "ncftpput -u ${upload_user} -p ${upload_password} ${upload_server} ${upload_directory} ${package_file}"
-ncftpput -u ${upload_user} -p ${upload_password} ${upload_server} ${upload_directory} ${package_file}
-done
-echo "Upload SUCCESS"
index 589d0f5..196cdf0 100644 (file)
@@ -153,8 +153,8 @@ execute_env* parse_execute_env( string_list* arguments )
     arg = arguments;
     for ( ; arg ; arg=arg->next )
     {
-       char key[MAX_KEY_LENGTH];
-       char value[MAX_VALUE_LENGTH];
+       char* key = malloc(strchr(arg->str, '=') + 2 ); 
+       char* value = malloc(strlen(arg->str));
        execute_env* newr;
 
        assert(arg->str != NULL);
@@ -188,6 +188,8 @@ execute_env* parse_execute_env( string_list* arguments )
                else
                        result = newr;
 
+               free(key);
+               free(value);
        key_st = NULL;
        key_end = NULL;
        value_st = NULL;
@@ -298,7 +300,7 @@ static char* load_script_contents_from_plugin( plugin_tag* execute_tag )
 
 
 /* resolve input argument and append to command*/
-static void append_arguments( char* cmd, execute_input* input_list , execute_env * env )
+static char* append_arguments( char* cmd, int cmd_size, execute_input* input_list , execute_env * env )
 {
        execute_input *input = input_list;
     char* value;
@@ -312,12 +314,23 @@ static void append_arguments( char* cmd, execute_input* input_list , execute_env
             if( (value = search_tag(v->id, v->name, v->attr, v->attr_value, v->find_attr)) != 0 )
             {
                value = tag_checker(value);
+
+                               if ( cmd_size < ( strlen(cmd) + strlen(value) + 3 ) )
+                               {
+                                       cmd_size = cmd_size + strlen(value) + 3;
+                                       cmd = realloc( cmd, cmd_size );
+                               }
                strcat( cmd, " \"");
                 strcat( cmd, value);
                        strcat( cmd, "\"");
             }
             else
             {
+                               if ( cmd_size < ( strlen(cmd) + 3 ) )
+                               {
+                                       cmd_size = cmd_size + 3;
+                                       cmd = realloc( cmd, cmd_size );
+                               }
                 strcat( cmd," \"\"");
             }
                }
@@ -328,6 +341,11 @@ static void append_arguments( char* cmd, execute_input* input_list , execute_env
                        {
                                if ( strcmp( e->key, input->value ) == 0 )
                                {
+                                       if ( cmd_size < ( strlen(cmd) + strlen(e->value) + 1 ) )
+                                       {
+                                               cmd_size = cmd_size + strlen(e->value) + 1;
+                                               cmd = realloc( cmd, cmd_size );
+                                       }
                                        /* don't need to wrap the value */
                                        strcat( cmd, " ");
                                        strcat( cmd, e->value );
@@ -341,6 +359,11 @@ static void append_arguments( char* cmd, execute_input* input_list , execute_env
                }
                else if ( strcmp( input->type, "string") == 0 )
                {
+                       if ( cmd_size < ( strlen(cmd) + strlen(input->value) + 3 ) )
+                       {
+                               cmd_size = cmd_size + strlen(input->value);
+                               cmd = realloc( cmd, cmd_size );
+                       }
                        strcat( cmd, " \"");
                        strcat( cmd, input->value );
                        strcat( cmd, "\"");
@@ -352,6 +375,8 @@ static void append_arguments( char* cmd, execute_input* input_list , execute_env
                input = input->next;
        }
 
+       return cmd;
+
 }
 char* write_script(char* program, char* script)
 {
@@ -389,7 +414,8 @@ char* write_script(char* program, char* script)
 /* execute */
 static int execute_step( execute* ex , execute_env * env)
 {
-       char cmd[MAX_CMD_LENGTH + 1];
+       char* cmd = malloc(MAX_CMD_LENGTH + 1);
+       int cmd_size = MAX_CMD_LENGTH + 1;
        int ret;
        char* script_path = NULL;
 
@@ -414,7 +440,7 @@ static int execute_step( execute* ex , execute_env * env)
        }
 
        /* append argunemt */
-       append_arguments( cmd,  ex->input_list , env);
+       cmd = append_arguments( cmd, cmd_size, ex->input_list , env);
 
        /* execute */
        SBI_PRINTF( 2, "CMD : %s\n", cmd );
@@ -427,6 +453,7 @@ static int execute_step( execute* ex , execute_env * env)
                remove_file(script_path);
        }
 
+       free(cmd);
        return ret;
 }