ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51216] New: chmod task when build is run using sudo hangs.
Date Wed, 18 May 2011 09:32:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51216

             Bug #: 51216
           Summary: chmod task when build is run using sudo hangs.
           Product: Ant
           Version: 1.6.2
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: silvano_lutri@it.ibm.com
    Classification: Unclassified


I run a .sh script using sudo that invokes Ant. It copies file and run chmod on
them.
When it arrives to the chmod task it hangs.

Here a subset of my Ant script:
-----------------------------------------------------------------------------
<project name="CustomizeSQLScripts" default="everything" basedir=".">
    <description>
        This build file is used to customize the sql scripts used to create the
database
    </description>

    <property name="src" location="."/>

    <target name="createDBtools_DB2" description="The target to create in the
temp dir the structure of the DB tools when using DB2">
        <mkdir dir="${TWSTEMPDIR}/scripts"/>
        <copy file="${DBSETUPSCRIPT}" todir="${TWSTEMPDIR}/scripts"
overwrite="true"/>
        <mkdir dir="${TWSTEMPDIR}/sql"/>
        <chmod dir="${TWSTEMPDIR}/scripts" perm="755" includes="**/*"/>
        <chmod dir="${TWSTEMPDIR}/sql" perm="755" includes="**/*"/>
    </target>

    <target name="customize_migratedb_root_sh" description="The target to
customize the launching script used to migrate the database on Unix">
        <filter token="DB2LOCALADMINUSER" value="${DB2LOCALADMINUSER}"/>
        <filter token="TWSTEMPDIR" value="${TWSTEMPDIR}"/>
        <copy tofile="${TWSTEMPDIR}/scripts/migratedb_root.sh" filtering="true"
overwrite="true">
            <fileset dir="${src}">
                <filename name="_migratedb_root.sh"/>
            </fileset>
        </copy>
        <copy file="dbupgrade.sh" todir="${TWSTEMPDIR}/scripts"
overwrite="true"/>
        <copy file="dbmigrate.sh" todir="${TWSTEMPDIR}/scripts"
overwrite="true"/>
        <chmod file="${TWSTEMPDIR}/scripts/migratedb_root.sh" perm="755"/>
        <chmod file="${TWSTEMPDIR}/scripts/dbupgrade.sh" perm="755"/>
        <chmod file="${TWSTEMPDIR}/scripts/dbmigrate.sh" perm="755"/>
    </target>


    <target name="everything"
        depends="createDBtools_DB2,
                 customize_migratedb_root_sh"
        description="The default target">
    </target>

</project>


And here the output of Ant executed in debug mode:
----------------------------------------------------------------------------
 > sudo ./commandToRun.sh                                  



               Apache Ant version 1.6.2 compiled on July 16 2004         



               Buildfile:                                                

               /software/TWS/8.5.1/TWS/AIX/./../AIX/tws_tools/customizeS 

               QLScripts4upgrade84.xml                                   



               Detected Java version: 1.4 in:                            

               /tmp/istemp3538996112160829/_bundledJRE_                  



               Detected OS: AIX                                          



               parsing buildfile                                         

               /software/TWS/8.5.1/TWS/AIX/tws_tools/customizeSQLScripts 

               4upgrade84.xml with URI =                                 

               file:///software/TWS/8.5.1/TWS/AIX/tws_tools/customizeSQL 

               Scripts4upgrade84.xml                                     



               Project base dir set to:                                  

               /software/TWS/8.5.1/TWS/AIX/tws_tools                     



               Build sequence for target `everything' is                 

               [detectCurrentOSFamily, defineOSSpecificPlatformFlag,     

               define_db_use, define_db2Win, define_db2Unix,             

               define_oracleWin, define_oracleUnix, createDBtools_DB2,   

               createDBtools_Oracle, customize_migratedb_root_bat,       

               customize_migratedb_root_oracle_bat,                      

               customize_migratedb_root_sh,                              

               customize_migratedb_root_oracle_sh, customizeSQL,         

               customizeOracleSQL, chmodSqlDir, chmodSqlStdedDir,        

               everything]                                               



               Complete build sequence is [detectCurrentOSFamily,        

               defineOSSpecificPlatformFlag, define_db_use,              

               define_db2Win, define_db2Unix, define_oracleWin,          

               define_oracleUnix, createDBtools_DB2,                     

               createDBtools_Oracle, customize_migratedb_root_bat,       

               customize_migratedb_root_oracle_bat,                      

               customize_migratedb_root_sh,                              

               customize_migratedb_root_oracle_sh, customizeSQL,         

               customizeOracleSQL, chmodSqlDir, chmodSqlStdedDir,        

               everything, ]                                             







               detectCurrentOSFamily:                                    







               defineOSSpecificPlatformFlag:                             







               define_db_use:                                            







               define_db2Win:                                            



               Property ${isWindows} has not been set                    







               define_db2Unix:                                           







               define_oracleWin:                                         



               Property ${isWindows} has not been set                    



               Property ${DB_ORACLE} has not been set                    







               define_oracleUnix:                                        



               Property ${DB_ORACLE} has not been set                    







               createDBtools_DB2:                                        



                    [copy] Copying 1 file to /tmp/TWA/tws851/scripts     



                    [copy] Copying                                       

               /software/TWS/8.5.1/TWS/AIX/tws_tools/dbmigrate.sh to     

               /tmp/TWA/tws851/scripts/dbmigrate.sh                      



                   [chmod] Current OS is AIX                             



                   [chmod] Executing 'chmod' with arguments:             



                   [chmod] '755'                                         



                   [chmod] '/tmp/TWA/tws851/scripts/dbmigrate.sh'        



                   [chmod] '/tmp/TWA/tws851/scripts/dbupgrade.sh'        



                   [chmod] '/tmp/TWA/tws851/scripts/migratedb_root.sh'   



                   [chmod]                                               



                   [chmod] The ' characters around the executable and    

               arguments are                                             



                   [chmod] not part of the command.                      
--------------------------------------------------------------------------
After this the script hangs.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message