/
build.xml
975 lines (755 loc) · 32.7 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011-2015, David C. Epler
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Unofficial Updater 2" default="runType">
<description>Ant script that will fetch then apply hotfixes and security updates for ColdFusion 8.0.1 or 9.0.x</description>
<!-- Ant-Contrib makes writting Ant tasks so much easier -->
<typedef resource="net/sf/antcontrib/antlib.xml" />
<!-- load properties and determine some items regarding the environment running in -->
<property file="uu2.properties"/>
<available file="downloads/download.properties" property="hasDownloads" />
<available file="ant.install.properties" property="isAntInstaller" />
<condition property="isRoot" else="false">
<equals arg1="root" arg2="${user.name}" />
</condition>
<condition property="isUnix" else="false">
<os family="unix"/>
</condition>
<tstamp>
<format property="ts.filename" pattern="yyyyMMdd-HHmmss"/>
<format property="ts.full" pattern="EEEE, MMMM dd, yyyy 'at' HH:mm:ss z" />
</tstamp>
<!-- if running as standalone Ant script, add depends="get_install_info" to the target below -->
<target name="runType" description="Just download or download and apply">
<record name="uu2-${ts.filename}.log" action="start" loglevel="info" />
<echo message="Starting UU2 on ${ts.full}" />
<if>
<istrue value="${downloadOnly}" />
<then>
<if>
<isfalse value="${isAntInstaller}" />
<then>
<antcall target="proxyInfo" />
</then>
</if>
<antcall target="download_hotfixes" />
<antcall target="repack_uu2" />
</then>
<else>
<antcall target="preUpdate" />
</else>
</if>
<record name="uu2-${ts.filename}.log" action="stop" />
</target>
<target name="preUpdate" description="Preliminary work for update">
<if>
<isfalse value="${applyUpdate}" />
<then>
<fail message="Need to re-run the script and enter correct values, sorry." />
</then>
</if>
<!-- Download hotfixes if they aren't local -->
<if>
<not>
<isset property="hasDownloads" />
</not>
<then>
<antcall target="download_hotfixes" />
<antcall target="repack_uu2" />
</then>
</if>
<property file="downloads/download.properties"/>
<echo message="UU2 Environment Information" />
<echo message="User .: ${user.name}" />
<echo message="OS ...: ${os.name} ${os.version} ${os.arch}" />
<echo message="Java .: ${java.runtime.name} ${java.runtime.version}" />
<if>
<istrue value="${isUnix}"/>
<then>
<!-- determine existing owner for specific directories -->
<!-- need to inspect files that aren't touched by Update 1 -->
<exec executable="ls" outputproperty="ls.CFIDE" osfamily="unix" failonerror="true">
<arg value="-al"/>
<arg value="${cfideDir}/Application.cfm" />
</exec>
<propertyregex property="owner.CFIDE" input="${ls.CFIDE}" regexp="(\S+)(\s+)(\S+)(\s+)(\S+)" select="\5" />
<exec executable="ls" outputproperty="ls.WEBINF" osfamily="unix" failonerror="true">
<arg value="-al"/>
<arg value="${webinfDir}/lib/cfx.jar" />
</exec>
<propertyregex property="owner.WEBINF" input="${ls.WEBINF}" regexp="(\S+)(\s+)(\S+)(\s+)(\S+)" select="\5" />
<if>
<equals arg1="${installType}" arg2="standalone" />
<then>
<exec executable="ls" outputproperty="ls.CFUSIONLIB" osfamily="unix" failonerror="true">
<arg value="-al"/>
<arg value="${cfusionLibDir}/cfusion-req.jar" />
</exec>
<propertyregex property="owner.CFUSIONLIB" input="${ls.CFUSIONLIB}" regexp="(\S+)(\s+)(\S+)(\s+)(\S+)" select="\5" />
</then>
</if>
<!-- warning notice if not running as root -->
<if>
<isfalse value="${isRoot}"/>
<then>
<echo>
***[ WARNING ]*****************************************************
**
** Unofficial Updater 2 is running as a non-root user, it might
** fail applying updates if ownership is not correct
**
*******************************************************************
</echo>
</then>
</if>
</then>
</if>
<!-- validate access to directories and fail early -->
<antcall target="checkDirectoryAccess" />
<!-- check ColdFusion version -->
<trycatch property="versionException">
<try>
<java classpath="${cfusionLibDir}/cfusion.jar" classname="coldfusion.tools.CfinfoMain" outputproperty="reportedVersion" fork="true" failonerror="true">
<arg value="-version"/>
</java>
</try>
<catch>
<echo>Unable to determine ColdFusion version via Java, fallback to hashes</echo>
<checksum algorithm="SHA-512" file="${cfusionLibDir}/cfusion.jar" property="cfusion.jar.sha-512" />
<switch value="${cfusion.jar.sha-512}">
<!-- "Official" 8.0.1 build version as published by Adobe -->
<case value="${cf801.195765.cfusion.jar.sha-512}">
<property name="reportedVersion" value="8,0,1,195765" />
</case>
<!-- build reported by CF 8 Linux with Update 1 applied (8.0.0 -> 8.0.1) -->
<case value="${cf801.196946.cfusion.jar.sha-512}">
<property name="reportedVersion" value="8,0,1,196946" />
</case>
<case value="${cf900.251028.cfusion.jar.sha-512}">
<property name="reportedVersion" value="9,0,0,251028" />
</case>
<case value="${cf901.274733.cfusion.jar.sha-512}">
<property name="reportedVersion" value="9,0,1,274733" />
</case>
<case value="${cf902.282541.cfusion.jar.sha-512}">
<property name="reportedVersion" value="9,0,2,282541" />
</case>
<default>
<property name="reportedVersion" value="UNKNOWN" />
</default>
</switch>
</catch>
</trycatch>
<echo message="Found ColdFusion version ${reportedVersion}" />
<switch value="${reportedVersion}">
<case value="8,0,1,195765">
<antcall target="update_801" />
</case>
<case value="8,0,1,196946">
<antcall target="update_801" />
</case>
<case value="9,0,0,251028">
<antcall target="update_900" />
</case>
<case value="9,0,1,274733">
<antcall target="update_901" />
</case>
<case value="9,0,2,282541">
<antcall target="update_902" />
</case>
<default>
<fail message="Unofficial Updater 2 only runs against ColdFusion 8.0.1 or 9.0.x" />
</default>
</switch>
</target>
<!-- Download Hotfixes -->
<target name="download_hotfixes" description="Download hotfixes from Adobe" >
<if>
<istrue value="${needProxy}" />
<then>
<setproxy proxyhost="${proxyHost}" proxyport="${proxyPort}" proxyuser="${proxyUser}" proxypassword="${proxyPassword}" />
</then>
</if>
<mkdir dir="downloads" />
<for list="${hotfix_ids}" param="hotfix">
<sequential>
<mkdir dir="downloads/@{hotfix}" />
<echo message="Downloading: ${@{hotfix}.description}" />
<for list="${@{hotfix}.files}" param="filename">
<sequential>
<get src="${@{hotfix}.url}@{filename}" dest="downloads/@{hotfix}/@{filename}" verbose="true" usetimestamp="true" />
<checksum algorithm="SHA-512" file="downloads/@{hotfix}/@{filename}" property="${@{hotfix}.@{filename}.sha-512}" verifyproperty="@{filename}_isOK" />
<if>
<isfalse value="${@{filename}_isOK}" />
<then>
<fail message="Checksum for @{hotfix} file @{filename} is not correct! Either download is corrupt or Adobe updated the file." />
</then>
</if>
</sequential>
</for>
</sequential>
</for>
<propertyfile file="downloads/download.properties" comment="Hotfix/Security Updates Downloaded from Adobe">
<entry key="download.date" type="date" value="now" pattern="EEEE, MMMM dd, yyyy 'at' HH:mm:ss z" />
<entry key="download.result" value="success" />
</propertyfile>
</target>
<target name="repack_uu2" description="Repack UU2 with downloaded updates from Adobe" if="isAntInstaller">
<!-- modify Ant Installer script to skip first run screen -->
<replace file="antinstall-config.xml" token='property="firstRun" value="true"' value='property="firstRun" value="false"' />
<replace file="antinstall-config.xml" token=' GO! ' value='Apply Updates' />
<if>
<istrue value="${enableAuto}" />
<then>
<replace file="antinstall-config.xml" token='swing,text' value='swing,text,text-auto' />
<replace file="antinstall-config.xml" token='loadDefaults="false"' value='loadDefaults="true"' />
</then>
</if>
<echo message="Repacking UU2 with downloaded updates from Adobe" />
<!-- pack everything up except current ant.install.properties -->
<jar destfile="${user.dir}/Unofficial-Updater2-with-downloads.jar" basedir=".">
<exclude name="**/ant.install.properties" />
<manifest>
<attribute name="Main-Class" value="org.tp23.antinstaller.selfextract.SelfExtractor" />
<attribute name="Look-And-Feel" value="native" />
</manifest>
</jar>
</target>
<!-- Backup -->
<target name="backup" description="Create backups of CFIDE, WEB-INF (and lib if standalone or admin if jrun)">
<!-- additional backups based upon install type -->
<switch value="${installType}">
<case value="standalone">
<echo message="Creating backup of ${cfusionLibDir}" />
<zip destfile="${backupDir}/lib-uu2-${ts.filename}.zip" basedir="${cfusionLibDir}" />
</case>
<case value="jrun">
<echo message="Creating backup of ${jrunInstallDir}/servers/admin" />
<zip destfile="${backupDir}/jrun-admin-uu2-${ts.filename}.zip" basedir="${jrunInstallDir}/servers/admin" />
</case>
<default />
</switch>
<echo message="Creating backup of ${webinfDir}" />
<if>
<istrue value="${excludeCFClasses}" />
<then>
<echo message="Excluding files from WEB-INF/cfclasses" />
<zip destfile="${backupDir}/WEB-INF-uu2-${ts.filename}.zip" basedir="${webinfDir}" excludes="cfclasses/**" />
</then>
<else>
<zip destfile="${backupDir}/WEB-INF-uu2-${ts.filename}.zip" basedir="${webinfDir}" />
</else>
</if>
<echo message="Creating backup of ${cfideDir}" />
<zip destfile="${backupDir}/CFIDE-uu2-${ts.filename}.zip" basedir="${cfideDir}" />
</target>
<target name="checkDirectoryAccess" description="Check to see if current user can write/delete files in directories UU2 touches">
<for list="${cfideDir},${webinfDir},${cfusionLibDir},${hotfixDir},${backupDir}" param="checkDir">
<sequential>
<echo message="Testing access to @{checkDir}" />
<trycatch>
<try>
<echo message="Creating: @{checkDir}/uu2.test" />
<echo message="${ts.full}" file="@{checkDir}/uu2.test" />
</try>
<catch>
<fail message="Unable to write to @{checkDir}. ** No changes have been made to ColdFusion. **" />
</catch>
</trycatch>
<trycatch>
<try>
<delete file="@{checkDir}/uu2.test" />
</try>
<catch>
<fail message="Unable to delete from @{checkDir}. Please remove @{checkDir}/uu2.test manually. ** No changes have been made to ColdFusion. **" />
</catch>
</trycatch>
</sequential>
</for>
</target>
<target name="directoryPrep" description="Remove unneeded files">
<echo message="Clearing all existing Hot Fixes from ${hotfixDir}" />
<delete>
<fileset dir="${hotfixDir}" includes="*.jar"/>
</delete>
<delete file="${hotfixDir}/empty.txt" />
<delete file="${hotfixDir}/unofficial-updater2.txt" />
<if>
<available file="${webinfDir}/cfclasses" type="dir" />
<then>
<echo message="Clearing all compiled code from ${webinfDir}/cfclasses" />
<delete>
<fileset dir="${webinfDir}/cfclasses" includes="*.class"/>
</delete>
</then>
</if>
</target>
<target name="uu2.text" description="Drop text file into lib/updates for uu2">
<echo message="Noting when UU2 was run in ${hotfixDir}" />
<echo file="${hotfixDir}/unofficial-updater2.txt" append="false">
Unofficial Updater 2 was run on ${ts.full}
Using files downloaded on ${download.date}
</echo>
</target>
<target name="cleanup" description="Cleanup after UU2 is done">
<if>
<and>
<istrue value="${isUnix}"/>
<istrue value="${isRoot}"/>
</and>
<then>
<echo message="Settings owner of files in ${cfideDir} to ${owner.CFIDE}" />
<chown owner="${owner.CFIDE}" type="both" maxparallel="100" verbose="true">
<fileset dir="${cfideDir}" includes="**/*" />
</chown>
<echo message="Settings owner of files in ${webinfDir} to ${owner.WEBINF}" />
<chown owner="${owner.WEBINF}" type="both" maxparallel="100" verbose="true">
<fileset dir="${webinfDir}" includes="**/*" />
</chown>
<if>
<equals arg1="${installType}" arg2="standalone" />
<then>
<echo message="Settings owner of files in ${cfusionLibDir} to ${owner.CFUSIONLIB}" />
<chown owner="${owner.CFUSIONLIB}" type="both" maxparallel="100" verbose="true">
<fileset dir="${cfusionLibDir}" includes="**/*" />
</chown>
</then>
</if>
</then>
</if>
</target>
<target name="proxyInfo" description="get proxy information">
<input message="Do you need to use a proxy?" validargs="yes,no" addproperty="needProxy" defaultvalue="no" />
<!-- get proxy settings if needed -->
<if>
<istrue value="${needProxy}" />
<then>
<input message="Proxy Host:" addproperty="proxyHost" />
<input message="Proxy Port:" addproperty="proxyPort" defaultvalue="80" />
<input message="Proxy User:" addproperty="proxyUser" />
<input message="Proxy Password:" addproperty="proxyPassword">
<handler classname="org.apache.tools.ant.input.SecureInputHandler" />
</input>
</then>
</if>
</target>
<target name="get_install_info" description="Get information about ColdFusion installation">
<!-- first time running if downloads aren't present -->
<if>
<not>
<isset property="hasDownloads" />
</not>
<then>
<echo>Since this is the first time this version of Unofficial Updater 2 has been run, it will download ALL updates from Adobe then pack them into a new Unofficial-Updater2-with-downloads.jar that can be run again without connecting to the Internet</echo>
<antcall target="proxyInfo" />
</then>
<else>
<property name="needProxy" value="no"/>
</else>
</if>
<input message="How is ColdFusion Installed" validargs="standalone,jrun,j2ee" addproperty="installType" defaultvalue="standalone" />
<switch value="${installType}">
<case value="standalone">
<if>
<os family="windows" />
<then>
<property name="default_cfInstallDir" value="C:\ColdFusion8"/>
</then>
<else>
<property name="default_cfInstallDir" value="/opt/coldfusion8"/>
</else>
</if>
<input message="ColdFusion directory" addproperty="cfInstallDir" defaultvalue="${default_cfInstallDir}" />
<if>
<os family="windows" />
<then>
<property name="default_webinfDir" value="${cfInstallDir}\wwwroot\WEB-INF"/>
<property name="default_cfideDir" value="${cfInstallDir}\wwwroot\CFIDE"/>
</then>
<else>
<property name="default_webinfDir" value="${cfInstallDir}/wwwroot/WEB-INF"/>
<property name="default_cfideDir" value="${cfInstallDir}/wwwroot/CFIDE"/>
</else>
</if>
<property name="jrunInstallDir" value="" />
</case>
<case value="jrun">
<if>
<os family="windows" />
<then>
<property name="default_jrunInstallDir" value="C:\JRun4"/>
</then>
<else>
<property name="default_jrunInstallDir" value="/opt/jrun4"/>
</else>
</if>
<input message="JRun4 directory" addproperty="jrunInstallDir" defaultvalue="${default_jrunInstallDir}" />
<if>
<os family="windows" />
<then>
<property name="default_webinfDir" value="${jrunInstallDir}\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF"/>
</then>
<else>
<property name="default_webinfDir" value="${jrunInstallDir}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF"/>
</else>
</if>
<property name="cfInstallDir" value="" />
<property name="default_cfideDir" value=""/>
</case>
<case value="j2ee">
<property name="default_webinfDir" value=""/>
<property name="default_cfideDir" value=""/>
<property name="cfInstallDir" value="" />
<property name="jrunInstallDir" value="" />
</case>
</switch>
<input message="WEB-INF directory" addproperty="webinfDir" defaultvalue="${default_webinfDir}" />
<input message="CFIDE directory" addproperty="cfideDir" defaultvalue="${default_cfideDir}" />
<input message="Backup Directory" addproperty="backupDir" defaultvalue="${user.dir}" />
<input message="Exclude WEB-INF/cfclasses?" validargs="yes,no" addproperty="excludeCFClasses" defaultvalue="no" />
<!-- figure out additional paths -->
<if>
<equals arg1="${installType}" arg2="standalone" />
<then>
<property name="cfusionLibDir" value="${cfInstallDir}/lib" />
</then>
<else>
<property name="cfusionLibDir" value="${webinfDir}/cfusion/lib" />
</else>
</if>
<property name="hotfixDir" value="${cfusionLibDir}/updates" />
<echo>
Install Type .........: ${installType}
Using the following directories:
* WEB-INF ...........: ${webinfDir}
* CFIDE .............: ${cfideDir}
* CFusion Lib .......: ${cfusionLibDir}
* Backups ...........: ${backupDir}
* Exclude cfclasses .: ${excludeCFClasses}
</echo>
<input message="Apply Update to the above?" validargs="yes,no" addproperty="applyUpdate" defaultvalue="yes" />
</target>
<!-- *********************************************** -->
<!-- ColdFusion 8.0.1 Hot Fixes and Security Updates -->
<!-- *********************************************** -->
<target name="update_801" description="everything to update 8.0.1">
<antcall target="backup" />
<antcall target="directoryPrep" />
<antcall target="cpsid_52915" />
<antcall target="kb403597" />
<antcall target="kb403795" />
<antcall target="kb403411" />
<antcall target="cpsid_84585" />
<antcall target="cpsid_86589" />
<antcall target="apsb09-09" />
<antcall target="apsb12-21_cf801" />
<!-- only for jrun installs -->
<if>
<equals arg1="${installType}" arg2="jrun" />
<then>
<antcall target="apsb09-12" />
</then>
</if>
<antcall target="uu2.text" />
<antcall target="cleanup" />
</target>
<target name="cpsid_52915" description="Cumulative Hot Fix 4 for ColdFusion 8.0.1">
<!-- update of cfmx_bootstrap.jar now from APSB12-21 -->
<!--
<echo message="Applying cfmx_bootstrap.jar to ${webinfDir}/lib/" />
<unzip src="downloads/cpsid_52915/chf8010004.zip" dest="${webinfDir}/lib/">
<patternset>
<include name="cfmx_bootstrap.jar"/>
</patternset>
</unzip>
-->
<echo message="Applying chf8010004.jar to ${hotfixDir}" />
<unzip src="downloads/cpsid_52915/chf8010004.zip" dest="${hotfixDir}">
<patternset>
<include name="chf8010004.jar"/>
</patternset>
</unzip>
</target>
<target name="kb403597" description="Patch for HTML grid and cfmenu (hf801-71634)">
<!-- hf801-71634.jar not needed was rolled into CHF2+ -->
<echo message="Applying trigger.gif to ${cfideDir}/scripts/ajax/resources/ext/images/default/form" />
<unzip src="downloads/kb403597/hf801-71634.zip" dest="${cfideDir}/scripts/ajax/resources/ext/images/default/form">
<patternset>
<include name="trigger.gif"/>
</patternset>
</unzip>
<echo message="Applying yui.css to ${cfideDir}/scripts/ajax/resources/yui" />
<unzip src="downloads/kb403597/hf801-71634.zip" dest="${cfideDir}/scripts/ajax/resources/yui">
<patternset>
<include name="yui.css"/>
</patternset>
</unzip>
</target>
<target name="kb403795" description="CFPresentation patch for audio issues and flash slide sizing problem (hf801-70839)">
<!-- hf801-70839.jar not needed was rolled into CHF2+ -->
<echo message="Applying files to ${cfusionLibDir}/preso" />
<unzip src="downloads/kb403795/hf801-70839.zip" dest="${cfusionLibDir}/preso">
<patternset>
<exclude name="*.jar"/>
<exclude name="preso"/>
</patternset>
</unzip>
</target>
<target name="kb403411" description="Patch for CFImage and Image functions in ColdFusion 8.0.1 (hf801-71557)">
<!--
kb403411 calls for rename of metadata-extractor-2.3.1.jar to metadata-extractor-2.3.1.jar.bak
installs encountered all have metadata-extractor-2.2.2.jar not metadata-extractor-2.3.1.jar
removing any existing version of metadata-extractor instead
-->
<echo message="Removing any metadata-extractor-*.jar from ${cfusionLibDir}" />
<delete>
<fileset dir="${cfusionLibDir}" includes="metadata-extractor-*.jar"/>
</delete>
<echo message="Applying metadata-extractor-2.3.1.jar to ${cfusionLibDir}" />
<unzip src="downloads/kb403411/hf801-71557.zip" dest="${cfusionLibDir}">
<patternset>
<include name="metadata-extractor-2.3.1.jar"/>
</patternset>
</unzip>
<echo message="Applying hf801-71557.jar to ${hotfixDir}" />
<unzip src="downloads/kb403411/hf801-71557.zip" dest="${hotfixDir}">
<patternset>
<include name="hf801-71557.jar"/>
</patternset>
</unzip>
</target>
<target name="cpsid_84585" description="Update for expired certificate on CFForm controls (May 2010)">
<echo message="Applying cfapplets.jar to ${cfideDir}/classes" />
<unzip src="downloads/cpsid_84585/cfapplets_cps_84585.zip" dest="${cfideDir}/classes">
<patternset>
<include name="cfapplets.jar"/>
</patternset>
</unzip>
</target>
<target name="cpsid_86589" description="Deadlock caused by compiler and cache lock (hf801-76563)">
<echo message="Applying hf801-76563.jar to ${hotfixDir}" />
<unzip src="downloads/cpsid_86589/hf801-76563.zip" dest="${hotfixDir}">
<patternset>
<include name="hf801-76563.jar"/>
</patternset>
</unzip>
</target>
<target name="apsb09-09" description="Hotfix available for potential ColdFusion 8 input sanitization issue">
<!--
hf801-77218.jar rolled into CHF4, explicitly listed to be removed in CHF4 and APSB12-21
Other files are in APSB12-21
to complete APSB09-09 still need to remove cf5_upload.cfm and cf5_connector.cfm
from CFIDE/scripts/ajax/FCKeditor/editor/filemanager/connectors/cfm
-->
<echo message="Removing cf5_*.cfm from ${cfideDir}/scripts/ajax/FCKeditor/editor/filemanager/connectors/cfm" />
<if>
<available file="${cfideDir}/scripts/ajax/FCKeditor/editor/filemanager/connectors/cfm" type="dir" />
<then>
<delete>
<fileset dir="${cfideDir}/scripts/ajax/FCKeditor/editor/filemanager/connectors/cfm" includes="cf5_*.cfm"/>
</delete>
</then>
</if>
</target>
<target name="apsb12-21_cf801" description="Security update: Hotfix available for ColdFusion 8.0.1 (APSB12-21)">
<echo message="Unpacking CF801.zip" />
<unzip src="downloads/apsb12-21/CF801.zip" dest="downloads/apsb12-21/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb12-21/CF801/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb12-21/CFIDE-801.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/apsb12-21/CF801/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
<target name="apsb09-12" description="Security Update: Hotfixes available for ColdFusion and JRun (APSB09-12)">
<echo message="Applying jmc-app.ear to ${jrunInstallDir}/servers/admin" />
<unzip src="downloads/apsb09-12/jmc-app2.zip" dest="${jrunInstallDir}/servers/admin">
<patternset>
<include name="jmc-app.ear"/>
</patternset>
</unzip>
</target>
<!-- *********************************************** -->
<!-- ColdFusion 9.0.0 Hot Fixes and Security Updates -->
<!-- *********************************************** -->
<target name="update_900" description="everything to update 9.0.0">
<antcall target="backup" />
<antcall target="directoryPrep" />
<antcall target="cpsid_84585" />
<antcall target="cf900_chf3" />
<!--- <antcall target="apsb13-27_cf900" /> -->
<antcall target="apsb14-23_cf900" />
<antcall target="apsb13-19" />
<antcall target="uu2.text" />
<antcall target="cleanup" />
</target>
<target name="cf900_chf3" description="Cumulative Hot Fix 3 (CHF3) for ColdFusion 9.0.0">
<echo message="Unpacking CF9.zip" />
<unzip src="downloads/cf900_chf3/CF9.zip" dest="downloads/cf900_chf3/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/cf900_chf3/CF9/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/cf900_chf3/CFIDE-9.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/cf900_chf3/CF9/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
<!--
<target name="apsb13-27_cf900" description="Security update: Hotfix available for ColdFusion (APSB13-27)">
<echo message="Unpacking CF9.zip" />
<unzip src="downloads/apsb13-27/CF9.zip" dest="downloads/apsb13-27/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb13-27/CF9/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb13-27/CFIDE-9.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/apsb13-27/CF9/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
-->
<target name="apsb14-23_cf900" description="Security update: Hotfix available for ColdFusion (APSB14-23)">
<echo message="Unpacking CF9.zip" />
<unzip src="downloads/apsb14-23/CF9.zip" dest="downloads/apsb14-23/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb14-23/CF9/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb14-23/CFIDE-9.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/apsb14-23/CF9/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
<!-- *********************************************** -->
<!-- ColdFusion 9.0.1 Hot Fixes and Security Updates -->
<!-- *********************************************** -->
<target name="update_901" description="everything to update 9.0.1">
<antcall target="backup" />
<antcall target="directoryPrep" />
<antcall target="cf901_chf4" />
<!-- <antcall target="apsb13-27_cf901" /> -->
<antcall target="apsb14-23_cf901" />
<antcall target="apsb13-19" />
<antcall target="uu2.text" />
<antcall target="cleanup" />
</target>
<target name="cf901_chf4" description="Cumulative Hot Fix 4 (CHF4) for ColdFusion 9.0.1">
<echo message="Unpacking CF901.zip" />
<unzip src="downloads/cf901_chf4/CF901.zip" dest="downloads/cf901_chf4/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/cf901_chf4/CF901/lib"/>
</copy>
<!-- was missed in original release of CHF4 -->
<unzip src="downloads/cf901_chf4/jpedal.zip" dest="${cfusionLibDir}" />
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/cf901_chf4/CFIDE-901.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/cf901_chf4/CF901/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
<!--
<target name="apsb13-27_cf901" description="Security update: Hotfix available for ColdFusion (APSB13-27)">
<echo message="Unpacking CF901.zip" />
<unzip src="downloads/apsb13-27/CF901.zip" dest="downloads/apsb13-27/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb13-27/CF901/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb13-27/CFIDE-901.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/apsb13-27/CF901/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
-->
<target name="apsb14-23_cf901" description="Security update: Hotfix available for ColdFusion (APSB14-23)">
<echo message="Unpacking CF901.zip" />
<unzip src="downloads/apsb14-23/CF901.zip" dest="downloads/apsb14-23/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb14-23/CF901/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb14-23/CFIDE-901.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/apsb14-23/CF901/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
<!-- *********************************************** -->
<!-- ColdFusion 9.0.2 Hot Fixes and Security Updates -->
<!-- *********************************************** -->
<target name="update_902" description="everything to update 9.0.2">
<antcall target="backup" />
<antcall target="directoryPrep" />
<antcall target="cf902_chf1" />
<!-- <antcall target="apsb13-27_cf902" /> -->
<antcall target="apsb14-23_cf902" />
<antcall target="apsb13-19" />
<antcall target="uu2.text" />
<antcall target="cleanup" />
</target>
<target name="cf902_chf1" description="Cumulative Hot Fix 1 (CHF1) for ColdFusion 9.0.2">
<echo message="Unpacking CF902.zip" />
<unzip src="downloads/cf902_chf1/CF902.zip" dest="downloads/cf902_chf1/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/cf902_chf1/CF902/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/cf902_chf1/CFIDE-902.zip" dest="${cfideDir}/.." />
</target>
<!--
<target name="apsb13-27_cf902" description="Security update: Hotfix available for ColdFusion (APSB13-27)">
<echo message="Unpacking CF902.zip" />
<unzip src="downloads/apsb13-27/CF902.zip" dest="downloads/apsb13-27/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb13-27/CF902/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb13-27/CFIDE-902.zip" dest="${cfideDir}/.." />
</target>
-->
<target name="apsb14-23_cf902" description="Security update: Hotfix available for ColdFusion (APSB14-23)">
<echo message="Unpacking CF902.zip" />
<unzip src="downloads/apsb14-23/CF902.zip" dest="downloads/apsb14-23/" />
<echo message="Applying files to ${cfusionLibDir}" />
<copy todir="${cfusionLibDir}" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb14-23/CF902/lib"/>
</copy>
<echo message="Applying files to ${cfideDir}" />
<unzip src="downloads/apsb14-23/CFIDE-902.zip" dest="${cfideDir}/.." />
<echo message="Applying files to ${webinfDir}" />
<unzip src="downloads/apsb14-23/CF902/WEB-INF.zip" dest="${webinfDir}/.." />
</target>
<target name="apsb13-19" description="Security update: Hotfix available for ColdFusion (APSB13-19)">
<echo message="Unpacking 3329722.zip" />
<unzip src="downloads/apsb13-19/3329722.zip" dest="downloads/apsb13-19/" />
<switch value="${installType}">
<case value="standalone">
<copy todir="${cfInstallDir}/runtime/servers/lib" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb13-19/3329722/" />
</copy>
</case>
<case value="jrun">
<copy todir="${jrunInstallDir}/servers/lib" verbose="true" overwrite="true" preservelastmodified="true">
<fileset dir="downloads/apsb13-19/3329722/" />
</copy>
</case>
<default>
<echo message="APSB13-19 does not need to be applied to J2EE (non-JRun) installations" />
</default>
</switch>
</target>
</project>