| @@ -100,8 +100,7 @@ | |||
| =================================================================== | |||
| --> | |||
| <property name="debug" value="true"/> | |||
| <property name="chmod.fail" value="true"/> | |||
| <property name="chmod.maxparallel" value="250"/> | |||
| <property name="setpermissions.fail" value="true"/> | |||
| <property name="deprecation" value="false"/> | |||
| <property name="optimize" value="true"/> | |||
| <property name="javac.target" value="1.8"/> | |||
| @@ -914,18 +913,20 @@ | |||
| <include name="*.pl"/> | |||
| </fixcrlf> | |||
| <chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**" | |||
| failonerror="${chmod.fail}"/> | |||
| <chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**" | |||
| failonerror="${chmod.fail}" maxparallel="${chmod.maxparallel}"/> | |||
| <chmod perm="ugo+x" type="file" failonerror="${chmod.fail}"> | |||
| <setpermissions mode="755" failonerror="${setpermissions.fail}"> | |||
| <dirset dir="${dist.dir}"/> | |||
| </setpermissions> | |||
| <setpermissions mode="644" failonerror="${setpermissions.fail}"> | |||
| <fileset dir="${dist.dir}"/> | |||
| </setpermissions> | |||
| <setpermissions mode="755" failonerror="${setpermissions.fail}"> | |||
| <fileset dir="${dist.bin}"> | |||
| <include name="**/ant"/> | |||
| <include name="**/antRun"/> | |||
| <include name="**/*.pl"/> | |||
| <include name="**/*.py"/> | |||
| </fileset> | |||
| </chmod> | |||
| </setpermissions> | |||
| </target> | |||
| @@ -1026,18 +1027,20 @@ | |||
| </fileset> | |||
| </copy> | |||
| <chmod perm="ugo+rx" dir="${dist.dir}" type="dir" includes="**" | |||
| failonerror="${chmod.fail}"/> | |||
| <chmod perm="ugo+r" dir="${dist.dir}" type="file" includes="**" | |||
| failonerror="${chmod.fail}" maxparallel="${chmod.maxparallel}"/> | |||
| <chmod perm="ugo+x" type="file" failonerror="${chmod.fail}"> | |||
| <setpermissions mode="755" failonerror="${setpermissions.fail}"> | |||
| <dirset dir="${dist.dir}"/> | |||
| </setpermissions> | |||
| <setpermissions mode="644" failonerror="${setpermissions.fail}"> | |||
| <fileset dir="${dist.dir}"/> | |||
| </setpermissions> | |||
| <setpermissions mode="755" failonerror="${setpermissions.fail}"> | |||
| <fileset dir="${dist.bin}"> | |||
| <include name="**/ant"/> | |||
| <include name="**/antRun"/> | |||
| <include name="**/*.pl"/> | |||
| <include name="**/*.py"/> | |||
| </fileset> | |||
| </chmod> | |||
| </setpermissions> | |||
| <!-- publish some useful stylesheets --> | |||
| <copy todir="${dist.etc}"> | |||
| @@ -1144,18 +1147,21 @@ | |||
| <exclude name="${tests.etc.dir}/taskdefs/fixcrlf/input/Junk?.java"/> | |||
| </fixcrlf> | |||
| <chmod perm="ugo+x" dir="${src.dist.dir}" type="dir" | |||
| failonerror="${chmod.fail}"/> | |||
| <chmod perm="ugo+r" dir="${src.dist.dir}" failonerror="${chmod.fail}"/> | |||
| <chmod perm="ugo+x" failonerror="${chmod.fail}"> | |||
| <setpermissions mode="755" failonerror="${setpermissions.fail}"> | |||
| <dirset dir="${src.dist.dir}"/> | |||
| </setpermissions> | |||
| <setpermissions mode="644" failonerror="${setpermissions.fail}"> | |||
| <fileset dir="${src.dist.dir}"/> | |||
| </setpermissions> | |||
| <setpermissions mode="755" failonerror="${setpermissions.fail}"> | |||
| <fileset dir="${src.dist.dir}"> | |||
| <include name="**/.sh"/> | |||
| <include name="**/.pl"/> | |||
| <include name="**/.py"/> | |||
| <include name="**/*.sh"/> | |||
| <include name="**/*.pl"/> | |||
| <include name="**/*.py"/> | |||
| <include name="**/ant"/> | |||
| <include name="**/antRun"/> | |||
| </fileset> | |||
| </chmod> | |||
| </setpermissions> | |||
| </target> | |||
| @@ -312,13 +312,10 @@ public class NullByteStreamResource extends Resource { | |||
| <mkdir dir="${input}"/> | |||
| <touch file="${output}/${file}"/> | |||
| </target> | |||
| <target name="makeFileUnwritable" | |||
| depends="createTestdir,makeFileUnwritable-Unix,makeFileUnwritable-Windows"/> | |||
| <target name="makeFileUnwritable-Unix" id="unix"> | |||
| <chmod file="${output}/${file}" perm="444"/> | |||
| </target> | |||
| <target name="makeFileUnwritable-Windows" unless="unix"> | |||
| <attrib file="${output}/${file}" readonly="true"/> | |||
| <target name="makeFileUnwritable" depends="createTestdir"> | |||
| <setpermissions mode="444"> | |||
| <file file="${output}/${file}"/> | |||
| </setpermissions> | |||
| </target> | |||
| <target name="testCopyOverReadOnlyFile" depends="makeFileUnwritable"> | |||
| @@ -453,14 +450,9 @@ public class NullByteStreamResource extends Resource { | |||
| <mkdir dir="${output}"/> | |||
| <touch file="${input}/somefile"/> | |||
| <touch file="${output}/somefile"/> | |||
| <exec executable="chmod" osfamily="unix"> | |||
| <arg value="-w"/> | |||
| <arg file="${output}/somefile"/> | |||
| </exec> | |||
| <exec executable="attrib" osfamily="dos"> | |||
| <arg value="+r"/> | |||
| <arg file="${output}/somefile"/> | |||
| </exec> | |||
| <setpermissions mode="444"> | |||
| <file file="${output}/somefile"/> | |||
| </setpermissions> | |||
| <au:expectfailure> | |||
| <copy todir="${output}" file="${input}/somefile" | |||
| overwrite="true"/> | |||
| @@ -134,13 +134,10 @@ | |||
| <mkdir dir="${input}"/> | |||
| <touch file="${output}/${file}"/> | |||
| </target> | |||
| <target name="makeFileUnwritable" | |||
| depends="createTestdir,makeFileUnwritable-Unix,makeFileUnwritable-Windows"/> | |||
| <target name="makeFileUnwritable-Unix" id="unix"> | |||
| <chmod file="${output}/${file}" perm="444"/> | |||
| </target> | |||
| <target name="makeFileUnwritable-Windows" unless="unix"> | |||
| <attrib file="${output}/${file}" readonly="true"/> | |||
| <target name="makeFileUnwritable" depends="createTestdir"> | |||
| <setpermissions mode="444"> | |||
| <file file="${output}/${file}"/> | |||
| </setpermissions> | |||
| </target> | |||
| <target name="testMoveOverReadOnlyFile" depends="makeFileUnwritable"> | |||
| @@ -70,13 +70,10 @@ | |||
| </au:assertTrue> | |||
| </target> | |||
| <target name="makeFileUnwritable" | |||
| depends="createTestdir,makeFileUnwritable-Unix,makeFileUnwritable-Windows"/> | |||
| <target name="makeFileUnwritable-Unix" id="unix"> | |||
| <chmod file="${output}/${file}" perm="444"/> | |||
| </target> | |||
| <target name="makeFileUnwritable-Windows" unless="unix"> | |||
| <attrib file="${output}/${file}" readonly="true"/> | |||
| <target name="makeFileUnwritable" depends="createTestdir"> | |||
| <setpermissions mode="444"> | |||
| <file file="${output}/${file}"/> | |||
| </setpermissions> | |||
| </target> | |||
| <target name="testUnwritable" depends="makeFileUnwritable"> | |||
| @@ -47,13 +47,10 @@ | |||
| </au:assertTrue> | |||
| </target> | |||
| <target name="makeFileExecutable" | |||
| depends="createTestdir,makeFileExecutable-Unix,makeFileExecutable-Windows"/> | |||
| <target name="makeFileExecutable-Unix" if="unix"> | |||
| <chmod file="${output}/${file}" perm="755"/> | |||
| </target> | |||
| <target name="makeFileExecutable-Windows" unless="unix"> | |||
| <!-- no idea how to do this --> | |||
| <target name="makeFileExecutable" depends="createTestdir"> | |||
| <setpermissions mode="755"> | |||
| <file file="${output}/${file}"/> | |||
| </setpermissions> | |||
| </target> | |||
| <target name="testNotexecutable" depends="createTestdir" if="unix"> | |||
| @@ -64,13 +64,10 @@ | |||
| </au:assertTrue> | |||
| </target> | |||
| <target name="makeFileUnwritable" | |||
| depends="createTestdir,makeFileUnwritable-Unix,makeFileUnwritable-Windows"/> | |||
| <target name="makeFileUnwritable-Unix" if="unix"> | |||
| <chmod file="${output}/${file}" perm="444"/> | |||
| </target> | |||
| <target name="makeFileUnwritable-Windows" unless="unix"> | |||
| <attrib file="${output}/${file}" readonly="true"/> | |||
| <target name="makeFileUnwritable" depends="createTestdir"> | |||
| <setpermissions mode="444"> | |||
| <file file="${output}/${file}"/> | |||
| </setpermissions> | |||
| </target> | |||
| <target name="testUnwritable" depends="makeFileUnwritable"> | |||