Merge lp:~sradhara/charms/trusty/ibm-xl-fortran/ibm-xl-fortranfix into lp:~ibmcharmers/charms/trusty/ibm-xl-fortran/devel
- Trusty Tahr (14.04)
- ibm-xl-fortranfix
- Merge into devel
Proposed by
sunitha
Status: | Merged |
---|---|
Merged at revision: | 44 |
Proposed branch: | lp:~sradhara/charms/trusty/ibm-xl-fortran/ibm-xl-fortranfix |
Merge into: | lp:~ibmcharmers/charms/trusty/ibm-xl-fortran/devel |
Diff against target: |
290 lines (+92/-75) 4 files modified
README.md (+21/-12) config.yaml (+6/-2) hooks/config-changed (+58/-55) hooks/stop (+7/-6) |
To merge this branch: | bzr merge lp:~sradhara/charms/trusty/ibm-xl-fortran/ibm-xl-fortranfix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
vsr | Needs Fixing | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
vsr (vsasi) : | # |
review:
Needs Fixing
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README.md' | |||
2 | --- README.md 2015-08-21 07:05:52 +0000 | |||
3 | +++ README.md 2015-08-26 08:29:13 +0000 | |||
4 | @@ -1,8 +1,10 @@ | |||
5 | 1 | Charm for IBM XL FORTRAN for Linux 15.1.2, Evaluation | 1 | Charm for IBM XL FORTRAN for Linux 15.1.2, Evaluation |
6 | 2 | 2 | ||
7 | 3 | |||
8 | 3 | Overview | 4 | Overview |
9 | 4 | -------- | 5 | -------- |
10 | 5 | 6 | ||
11 | 7 | |||
12 | 6 | IBM XL FORTRAN for Linux V15.1.2, Evaluation | 8 | IBM XL FORTRAN for Linux V15.1.2, Evaluation |
13 | 7 | 9 | ||
14 | 8 | IBM XL FORTRAN for Linux, V15.1.2 is a standards-based, high-performance Fortran compiler with advanced optimization and performance-tuning features. | 10 | IBM XL FORTRAN for Linux, V15.1.2 is a standards-based, high-performance Fortran compiler with advanced optimization and performance-tuning features. |
15 | @@ -10,13 +12,18 @@ | |||
16 | 10 | For details on IBM XL FORTRAN, as well as information on purchasing the trial version, | 12 | For details on IBM XL FORTRAN, as well as information on purchasing the trial version, |
17 | 11 | please visit: [Trial Download] [trial-xlf]. | 13 | please visit: [Trial Download] [trial-xlf]. |
18 | 12 | 14 | ||
20 | 13 | To get more details about the product and useful additional resources , please visit the product page | 15 | To get more details about the product and useful additional resources, please visit the product page |
21 | 14 | [Product Page] [product-page] and [IBM Knowledge Center] [ibm-xlf-info] | 16 | [Product Page] [product-page] and [IBM Knowledge Center] [ibm-xlf-info] |
22 | 15 | 17 | ||
23 | 18 | |||
24 | 16 | Usage | 19 | Usage |
25 | 17 | ----- | 20 | ----- |
28 | 18 | Download IBM XL FORTRAN for Linux and upload it to your apache | 21 | |
29 | 19 | repository. To download and install the code contained in this charm you must agree to the IBM license. | 22 | Download your 60 day trial version for IBM XL Fortran for Linux and upload it to your apache |
30 | 23 | repository. To download and install the code contained in this charm you must agree to the IBM license. | ||
31 | 24 | The License files (`LicenseAgreement.pdf` and `license.pdf` ) can be found under the `files/archives` folder | ||
32 | 25 | after extraction of IBM Fortran compiler software is successful. | ||
33 | 26 | |||
34 | 20 | 27 | ||
35 | 21 | # Creating the repositories in Apache | 28 | # Creating the repositories in Apache |
36 | 22 | Run steps below with admin access | 29 | Run steps below with admin access |
37 | @@ -29,8 +36,8 @@ | |||
38 | 29 | cd <apache-repository-directory> | 36 | cd <apache-repository-directory> |
39 | 30 | mkdir ibm-xlf | 37 | mkdir ibm-xlf |
40 | 31 | 38 | ||
43 | 32 | Place the downloaded IBM XL FORTRAN for Linux packages in the above directory | 39 | Place the downloaded IBM XL FORTRAN for Linux packages in the above directory and Configure Apache server to allow access to the repository. |
44 | 33 | Configure Apache server to allow access to the repository. | 40 | |
45 | 34 | Configure config.yaml with the repository url | 41 | Configure config.yaml with the repository url |
46 | 35 | 42 | ||
47 | 36 | Example : fortran_url: "http://<server-name>/<REPOSITORY_DIR>/fortran_url" | 43 | Example : fortran_url: "http://<server-name>/<REPOSITORY_DIR>/fortran_url" |
48 | @@ -38,6 +45,7 @@ | |||
49 | 38 | Verify repository is set correctly otherwise charm might throw errors. | 45 | Verify repository is set correctly otherwise charm might throw errors. |
50 | 39 | 46 | ||
51 | 40 | 47 | ||
52 | 48 | |||
53 | 41 | Deploy | 49 | Deploy |
54 | 42 | ------ | 50 | ------ |
55 | 43 | 51 | ||
56 | @@ -54,9 +62,10 @@ | |||
57 | 54 | 62 | ||
58 | 55 | If not, | 63 | If not, |
59 | 56 | 64 | ||
63 | 57 | juju set ibm_xl-fortran accept-ibm-xlfortran-license=True fortran-url=<repository URL> xlfortran_package_name=<Installation package name> sha_fortran=<sha sum of the xlf package> | 65 | juju set ibm-xl-fortran accept-ibm-xlfortran-license=True fortran-url=<repository URL> xlfortran_package_name=<Installation package name> sha_fortran=<sha sum of the xlf package> |
64 | 58 | 66 | ||
65 | 59 | This charm will deploy the IBM XL FORTRAN compiler packages.For verification purpose,sample Fortran program will be created after deployment of this charm.The sample programs will be created in `Amulet test` and it can be compliled and run through Amulet test only. | 67 | This charm will deploy the IBM XL FORTRAN compiler packages. For verification purpose,sample Fortran program will be created after deployment of this charm.The sample programs will be created in `Amulet test` and it can be compliled and run through Amulet test only. |
66 | 68 | |||
67 | 60 | 69 | ||
68 | 61 | Configuration | 70 | Configuration |
69 | 62 | ------------- | 71 | ------------- |
70 | @@ -64,14 +73,14 @@ | |||
71 | 64 | 73 | ||
72 | 65 | `xlfortran_url` | 74 | `xlfortran_url` |
73 | 66 | 75 | ||
76 | 67 | URL to download IBM XL FORTRAN packages.The url would be in this format | 76 | URL to download IBM XL FORTRAN packages. The url would be in this format |
77 | 68 | http://<server-name>/<REPOSITORY_DIR>/ibm-xlf.If not set or set incorrectly, the charm | 77 | http://<server-name>/<REPOSITORY_DIR>/ibm-xlf. If not set or set incorrectly, the charm |
78 | 69 | cannot install the IBM XL FORTRAN software. | 78 | cannot install the IBM XL FORTRAN software. |
79 | 70 | 79 | ||
80 | 71 | `accept-ibm-xlfortran-license` | 80 | `accept-ibm-xlfortran-license` |
81 | 72 | 81 | ||
82 | 73 | The IBM XL FORTRAN software can only be used by accepting the terms and conditions for IBM | 82 | The IBM XL FORTRAN software can only be used by accepting the terms and conditions for IBM |
84 | 74 | XL FORTRAN License.Setting this option to True indicates that you have read and accepted the | 83 | XL FORTRAN License. Setting this option to True indicates that you have read and accepted the |
85 | 75 | IBM XL FORTRAN terms and conditions found in the license file. | 84 | IBM XL FORTRAN terms and conditions found in the license file. |
86 | 76 | 85 | ||
87 | 77 | `xlfortran_package_name` | 86 | `xlfortran_package_name` |
88 | @@ -82,7 +91,7 @@ | |||
89 | 82 | 91 | ||
90 | 83 | Checksum value to check integrity of IBM XL FORTRAN package. The Charm uses | 92 | Checksum value to check integrity of IBM XL FORTRAN package. The Charm uses |
91 | 84 | sha1sum to check the integrity. If empty, it does not carry out the integrity check. | 93 | sha1sum to check the integrity. If empty, it does not carry out the integrity check. |
93 | 85 | The command to find the checksum is : sha1sum <Package Name> | cut -d" " -f1 | 94 | The command to find the checksum is: "sha1sum <Package Name> | cut -d" " -f1" |
94 | 86 | 95 | ||
95 | 87 | 96 | ||
96 | 88 | IBM XL FORTRAN Information | 97 | IBM XL FORTRAN Information |
97 | 89 | 98 | ||
98 | === modified file 'config.yaml' | |||
99 | --- config.yaml 2015-08-21 06:48:17 +0000 | |||
100 | +++ config.yaml 2015-08-26 08:29:13 +0000 | |||
101 | @@ -13,8 +13,12 @@ | |||
102 | 13 | type: boolean | 13 | type: boolean |
103 | 14 | default: False | 14 | default: False |
104 | 15 | description: | | 15 | description: | |
107 | 16 | IBM XL Fortran for Linux is an advanced,high-performance compiler that can be used for developing complex,computationally intensive programs, | 16 | The XL_FORTRAN software can only be used by |
108 | 17 | including interlanguage calls with C programs. | 17 | accepting the terms and conditions for IBM XL_FORTRAN License. |
109 | 18 | Setting this option to True | ||
110 | 19 | indicates that you have read and accepted the IBM XL_FORTRAN terms and | ||
111 | 20 | conditions found in the license file. The details about accessing | ||
112 | 21 | the license(s) can be found in the README. | ||
113 | 18 | fortran_path_name: | 22 | fortran_path_name: |
114 | 19 | type: string | 23 | type: string |
115 | 20 | default: "/opt/ibm" | 24 | default: "/opt/ibm" |
116 | 21 | 25 | ||
117 | === modified file 'hooks/config-changed' | |||
118 | --- hooks/config-changed 2015-08-21 05:32:04 +0000 | |||
119 | +++ hooks/config-changed 2015-08-26 08:29:13 +0000 | |||
120 | @@ -8,13 +8,15 @@ | |||
121 | 8 | #Check Fortran is installed or not | 8 | #Check Fortran is installed or not |
122 | 9 | is_fortran_installed() | 9 | is_fortran_installed() |
123 | 10 | { | 10 | { |
131 | 11 | if [ -d $FORTRAN_INSTALL_PATH ]; then | 11 | if [ -d $FORTRAN_INSTALL_PATH/xlf ]; then |
132 | 12 | echo "True" | 12 | echo "True" |
133 | 13 | juju-log "IBM XL Fortran: Fortran is installed" | 13 | juju-log "IBM XL Fortran: Fortran is installed" |
134 | 14 | else | 14 | else |
135 | 15 | echo "False" | 15 | echo "False" |
136 | 16 | juju-log "IBM XL Fortran: Fortran is not installed" | 16 | juju-log "IBM XL Fortran: Fortran is not installed" |
137 | 17 | fi | 17 | fi |
138 | 18 | |||
139 | 19 | |||
140 | 18 | } | 20 | } |
141 | 19 | 21 | ||
142 | 20 | #It will Remove IBM XL Fortran, if its installed | 22 | #It will Remove IBM XL Fortran, if its installed |
143 | @@ -30,8 +32,10 @@ | |||
144 | 30 | #remove packages | 32 | #remove packages |
145 | 31 | dpkg -P xlf.$xlf_version libxlf-devel.$xlf_version | 33 | dpkg -P xlf.$xlf_version libxlf-devel.$xlf_version |
146 | 32 | if ! [ -d $FORTRAN_INSTALL_PATH/xlf/$xlf_version/bin ]; then | 34 | if ! [ -d $FORTRAN_INSTALL_PATH/xlf/$xlf_version/bin ]; then |
149 | 33 | 35 | juju-log "IBM XL Fortran: Successfully uninstalled Fortran" | |
150 | 34 | juju-log "IBM XL Fortran: Sucessfully uninstalled Fortran" | 36 | cd $FORTRAN_INSTALL_PATH |
151 | 37 | rm -rf xlf | ||
152 | 38 | juju-log "IBM XL Fortran: Removed xlf folder" | ||
153 | 35 | status-set blocked "IBM XL Fortran license not accepted" | 39 | status-set blocked "IBM XL Fortran license not accepted" |
154 | 36 | 40 | ||
155 | 37 | else | 41 | else |
156 | @@ -40,8 +44,8 @@ | |||
157 | 40 | fi | 44 | fi |
158 | 41 | 45 | ||
159 | 42 | else | 46 | else |
162 | 43 | juju-log "IBM XL Fortran: Fortran is not installed" | 47 | juju-log "IBM XL Fortran: Fortran is not installed" |
163 | 44 | exit 0 | 48 | exit 0 |
164 | 45 | fi | 49 | fi |
165 | 46 | } | 50 | } |
166 | 47 | 51 | ||
167 | @@ -139,57 +143,56 @@ | |||
168 | 139 | #downlaod IBM XL Fortran package | 143 | #downlaod IBM XL Fortran package |
169 | 140 | download_Fortran | 144 | download_Fortran |
170 | 141 | 145 | ||
172 | 142 | #extract MFSVR package if download succeeded | 146 | #extract IBM XL Fortran package if download succeeded |
173 | 143 | if [ -f $ARCHIVE_DIR/$cfg_pkg_name ]; then | 147 | if [ -f $ARCHIVE_DIR/$cfg_pkg_name ]; then |
174 | 144 | juju-log "IBM XL Fortran: Extracting binary package" | 148 | juju-log "IBM XL Fortran: Extracting binary package" |
175 | 145 | status-set maintenance "Extracting IBM XL FORTRAN package" | 149 | status-set maintenance "Extracting IBM XL FORTRAN package" |
176 | 146 | cd $ARCHIVE_DIR | 150 | cd $ARCHIVE_DIR |
177 | 147 | if ! [ -d $ARCHIVE_DIR/Fortran ]; then | 151 | if ! [ -d $ARCHIVE_DIR/Fortran ]; then |
181 | 148 | mkdir Fortran | 152 | mkdir Fortran |
182 | 149 | chmod 777 Fortran | 153 | chmod 755 Fortran |
183 | 150 | tar -xzf $ARCHIVE_DIR/$cfg_pkg_name -C Fortran | 154 | tar -xzf $ARCHIVE_DIR/$cfg_pkg_name -C Fortran |
184 | 155 | if [ $? != 0 ]; then | ||
185 | 156 | juju-log "IBM XL Fortran: Unable to extract the Fortran package content. Verify whether the package is corrupt." | ||
186 | 157 | #Remove corrupt archive file | ||
187 | 158 | rm -rf $ARCHIVE_DIR/*.tar.gz | ||
188 | 159 | exit 0 | ||
189 | 160 | |||
190 | 161 | fi | ||
191 | 162 | |||
192 | 163 | fi | ||
193 | 164 | |||
194 | 165 | fi | ||
195 | 166 | |||
196 | 167 | juju-log "Starting Fortran installation" | ||
197 | 168 | #Check Fortran package availability | ||
198 | 169 | |||
199 | 170 | if [ -f $CHARM_DIR/files/archives/Fortran/install ]; then | ||
200 | 171 | juju-log "Fortran Packages available for installation."; | ||
201 | 172 | fortran_install_done=`is_fortran_installed` | ||
202 | 173 | if [ $fortran_install_done == False ]; then | ||
203 | 174 | status-set maintenance "Installing IBM XL FORTRAN package" | ||
204 | 175 | echo 1 | $CHARM_DIR/files/archives/Fortran/install | ||
205 | 176 | if [ $? == 0 ]; then | ||
206 | 177 | juju-log "IBM XL Fortran: Fortran is installed successfully" | ||
207 | 178 | status-set active "Installed IBM XL FORTRAN package successfully" | ||
208 | 179 | else | ||
209 | 180 | juju-log "IBM XL Fortran: Error while installing Fortran" | ||
210 | 181 | exit 1 | ||
211 | 182 | fi | ||
212 | 183 | |||
213 | 151 | else | 184 | else |
226 | 152 | juju-log "IBM XL Fortran: Fortran directoty is alredy exist" | 185 | juju-log "IBM XL Fortran: Fortran is alreay installed" |
227 | 153 | 186 | ||
228 | 154 | fi | 187 | fi |
229 | 155 | 188 | ||
230 | 156 | if [ $? != 0 ]; then | 189 | |
231 | 157 | juju-log "IBM XL Fortran: Unable to extract the Fortran package content. Verify whether the package is corrupt." | 190 | else |
232 | 158 | #Remove corrupt archive file | 191 | juju-log "IBM XL Fortran: Fortran Packages are missing. Please check README file."; |
233 | 159 | rm -rf $ARCHIVE_DIR/*.tar.gz | 192 | exit 1 |
234 | 160 | exit 0 | 193 | |
235 | 161 | 194 | ||
224 | 162 | fi | ||
225 | 163 | |||
236 | 164 | fi | 195 | fi |
237 | 165 | |||
238 | 166 | juju-log "IBM XL Fortran: Fortran package downloaded sucessfully." | ||
239 | 167 | |||
240 | 168 | |||
241 | 169 | fi | ||
242 | 170 | |||
243 | 171 | juju-log "Starting Fortran installation" | ||
244 | 172 | #Check Fortran package availability | ||
245 | 173 | |||
246 | 174 | if [ -f $CHARM_DIR/files/archives/Fortran/install ]; then | ||
247 | 175 | juju-log "Fortran Packages available for installation."; | ||
248 | 176 | if ! [ -d $FORTRAN_INSTALL_PATH/xlf/bin ]; then | ||
249 | 177 | status-set maintenance "Installing IBM XL FORTRAN package" | ||
250 | 178 | echo 1 | $CHARM_DIR/files/archives/Fortran/install | ||
251 | 179 | |||
252 | 180 | if [ $? == 0 ]; then | ||
253 | 181 | juju-log "IBM XL Fortran: Fortran is installed sucessfully" | ||
254 | 182 | status-set maintenance "Installed IBM XL FORTRAN package sucessfully" | ||
255 | 183 | else | ||
256 | 184 | juju-log "IBM XL Fortran: Error while installing Fortran" | ||
257 | 185 | exit 1 | ||
258 | 186 | fi | ||
259 | 187 | else | ||
260 | 188 | juju-log "IBM XL Fortran: Fortran is alreay installed" | ||
261 | 189 | fi | ||
262 | 190 | else | ||
263 | 191 | juju-log "IBM XL Fortran: Fortran Packages are missing. Please check README file."; | ||
264 | 192 | exit 1 | ||
265 | 193 | 196 | ||
266 | 194 | fi | 197 | fi |
267 | 195 | 198 | ||
268 | 196 | 199 | ||
269 | === modified file 'hooks/stop' | |||
270 | --- hooks/stop 2015-08-21 05:32:04 +0000 | |||
271 | +++ hooks/stop 2015-08-26 08:29:13 +0000 | |||
272 | @@ -2,11 +2,12 @@ | |||
273 | 2 | set -e | 2 | set -e |
274 | 3 | juju-log "starting stop hook" | 3 | juju-log "starting stop hook" |
275 | 4 | FORTRAN_PATH=$(config-get fortran_path_name) | 4 | FORTRAN_PATH=$(config-get fortran_path_name) |
282 | 5 | echo $FORTRAN_PATH | 5 | |
283 | 6 | rm -rf $FORTRAN_PATH | 6 | if [ -d $FORTRAN_PATH/xlf ]; then |
284 | 7 | 7 | rm -rf $FORTRAN_PATH/xlf | |
285 | 8 | if ! [-d $FORTRAN_PATH ]; then | 8 | else |
286 | 9 | juju-log "Fortran path removed sucessfully" | 9 | juju-log "Fortran is not installed" |
287 | 10 | fi | 10 | fi |
288 | 11 | |||
289 | 11 | 12 | ||
290 | 12 | juju-log "Stop hook completed" | 13 | juju-log "Stop hook completed" |