This repository was archived by the owner on Jan 10, 2023. It is now read-only.
File tree 3 files changed +25
-2
lines changed
3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.7.1
2
+
3
+ * Bugfix: Workaround remote_file not supporting 404's and utilize archive_url
4
+
1
5
## 0.7.0
2
6
3
7
* Enhancement: Update J default version to 5.1.29
Original file line number Diff line number Diff line change 3
3
maintainer_email '[email protected] '
4
4
license 'Apache 2.0'
5
5
description 'Recipes/LWRPs for installing MySQL Connectors.'
6
- version '0.7.0 '
6
+ version '0.7.1 '
7
7
recipe 'mysql_connector' , 'Empty recipe'
8
8
recipe 'mysql_connector::j' , 'Installs MySQL Connector/J via attribute.'
9
9
recipe 'mysql_connector::odbc_package' , 'Installs MySQL Connector/ODBC via package.'
Original file line number Diff line number Diff line change 13
13
#
14
14
15
15
remote_file "#{ Chef ::Config [ :file_cache_path ] } /#{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } " do
16
- source [ node [ 'mysql_connector' ] [ 'j' ] [ 'url' ] , node [ 'mysql_connector' ] [ 'j' ] [ 'archive_url' ] ]
16
+ source node [ 'mysql_connector' ] [ 'j' ] [ 'url' ]
17
17
checksum node [ 'mysql_connector' ] [ 'j' ] [ 'checksum' ]
18
18
mode 00644
19
+ ignore_failure true
19
20
action :create
20
21
end
21
22
23
+ # BEGIN: This is workaround for remote_file not supporting 404's
24
+ # This is after various attempts at begin/rescue and requires ignore_failure above.
25
+ remote_file "#{ Chef ::Config [ :file_cache_path ] } /#{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } -archive_url" do
26
+ source node [ 'mysql_connector' ] [ 'j' ] [ 'archive_url' ]
27
+ checksum node [ 'mysql_connector' ] [ 'j' ] [ 'checksum' ]
28
+ mode 00644
29
+ not_if "test -s #{ Chef ::Config [ :file_cache_path ] } /#{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } "
30
+ action :create
31
+ end
32
+
33
+ execute 'mysql_connector_j_mv_archive_url' do
34
+ cwd Chef ::Config [ :file_cache_path ]
35
+ command "mv #{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } -archive_url #{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } "
36
+ not_if "test -s #{ Chef ::Config [ :file_cache_path ] } /#{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } "
37
+ action :run
38
+ end
39
+ # END: This is workaround for remote_file not supporting 404's
40
+
22
41
execute "mysql-connector-java-#{ new_resource . path } " do
23
42
cwd Chef ::Config [ :file_cache_path ]
24
43
command "tar --strip-components=1 -xzf #{ node [ 'mysql_connector' ] [ 'j' ] [ 'tar_file' ] } -C #{ new_resource . path } mysql-connector-java-#{ node [ 'mysql_connector' ] [ 'j' ] [ 'version' ] } /#{ node [ 'mysql_connector' ] [ 'j' ] [ 'jar_file' ] } "
You can’t perform that action at this time.
0 commit comments