| @@ -100,8 +100,7 @@ | |||||
| =================================================================== | =================================================================== | ||||
| --> | --> | ||||
| <property name="debug" value="true"/> | <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="deprecation" value="false"/> | ||||
| <property name="optimize" value="true"/> | <property name="optimize" value="true"/> | ||||
| <property name="javac.target" value="1.8"/> | <property name="javac.target" value="1.8"/> | ||||
| @@ -914,18 +913,20 @@ | |||||
| <include name="*.pl"/> | <include name="*.pl"/> | ||||
| </fixcrlf> | </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}"> | <fileset dir="${dist.bin}"> | ||||
| <include name="**/ant"/> | <include name="**/ant"/> | ||||
| <include name="**/antRun"/> | <include name="**/antRun"/> | ||||
| <include name="**/*.pl"/> | <include name="**/*.pl"/> | ||||
| <include name="**/*.py"/> | <include name="**/*.py"/> | ||||
| </fileset> | </fileset> | ||||
| </chmod> | |||||
| </setpermissions> | |||||
| </target> | </target> | ||||
| @@ -1026,18 +1027,20 @@ | |||||
| </fileset> | </fileset> | ||||
| </copy> | </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}"> | <fileset dir="${dist.bin}"> | ||||
| <include name="**/ant"/> | <include name="**/ant"/> | ||||
| <include name="**/antRun"/> | <include name="**/antRun"/> | ||||
| <include name="**/*.pl"/> | <include name="**/*.pl"/> | ||||
| <include name="**/*.py"/> | <include name="**/*.py"/> | ||||
| </fileset> | </fileset> | ||||
| </chmod> | |||||
| </setpermissions> | |||||
| <!-- publish some useful stylesheets --> | <!-- publish some useful stylesheets --> | ||||
| <copy todir="${dist.etc}"> | <copy todir="${dist.etc}"> | ||||
| @@ -1144,18 +1147,21 @@ | |||||
| <exclude name="${tests.etc.dir}/taskdefs/fixcrlf/input/Junk?.java"/> | <exclude name="${tests.etc.dir}/taskdefs/fixcrlf/input/Junk?.java"/> | ||||
| </fixcrlf> | </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}"> | <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="**/ant"/> | ||||
| <include name="**/antRun"/> | <include name="**/antRun"/> | ||||
| </fileset> | </fileset> | ||||
| </chmod> | |||||
| </setpermissions> | |||||
| </target> | </target> | ||||
| @@ -312,13 +312,10 @@ public class NullByteStreamResource extends Resource { | |||||
| <mkdir dir="${input}"/> | <mkdir dir="${input}"/> | ||||
| <touch file="${output}/${file}"/> | <touch file="${output}/${file}"/> | ||||
| </target> | </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> | ||||
| <target name="testCopyOverReadOnlyFile" depends="makeFileUnwritable"> | <target name="testCopyOverReadOnlyFile" depends="makeFileUnwritable"> | ||||
| @@ -453,14 +450,9 @@ public class NullByteStreamResource extends Resource { | |||||
| <mkdir dir="${output}"/> | <mkdir dir="${output}"/> | ||||
| <touch file="${input}/somefile"/> | <touch file="${input}/somefile"/> | ||||
| <touch file="${output}/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> | <au:expectfailure> | ||||
| <copy todir="${output}" file="${input}/somefile" | <copy todir="${output}" file="${input}/somefile" | ||||
| overwrite="true"/> | overwrite="true"/> | ||||
| @@ -134,13 +134,10 @@ | |||||
| <mkdir dir="${input}"/> | <mkdir dir="${input}"/> | ||||
| <touch file="${output}/${file}"/> | <touch file="${output}/${file}"/> | ||||
| </target> | </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> | ||||
| <target name="testMoveOverReadOnlyFile" depends="makeFileUnwritable"> | <target name="testMoveOverReadOnlyFile" depends="makeFileUnwritable"> | ||||
| @@ -70,13 +70,10 @@ | |||||
| </au:assertTrue> | </au:assertTrue> | ||||
| </target> | </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> | ||||
| <target name="testUnwritable" depends="makeFileUnwritable"> | <target name="testUnwritable" depends="makeFileUnwritable"> | ||||
| @@ -47,13 +47,10 @@ | |||||
| </au:assertTrue> | </au:assertTrue> | ||||
| </target> | </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> | ||||
| <target name="testNotexecutable" depends="createTestdir" if="unix"> | <target name="testNotexecutable" depends="createTestdir" if="unix"> | ||||
| @@ -64,13 +64,10 @@ | |||||
| </au:assertTrue> | </au:assertTrue> | ||||
| </target> | </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> | ||||
| <target name="testUnwritable" depends="makeFileUnwritable"> | <target name="testUnwritable" depends="makeFileUnwritable"> | ||||