Merge lp:~sradhara/charms/trusty/ibm-xl-fortran/ibm-xl-fortranfix into lp:~ibmcharmers/charms/trusty/ibm-xl-fortran/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
Reviewer Review Type Date Requested Status
vsr Needs Fixing
Review via email: mp+268707@code.launchpad.net
To post a comment you must log in.
Revision history for this message
vsr (vsasi) :
review: Needs Fixing
44. By sunitha

IBM XL Fortran final chcek in

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 Charm for IBM XL FORTRAN for Linux 15.1.2, Evaluation
6
7+
8 Overview
9 --------
10
11+
12 IBM XL FORTRAN for Linux V15.1.2, Evaluation
13
14 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 For details on IBM XL FORTRAN, as well as information on purchasing the trial version,
17 please visit: [Trial Download] [trial-xlf].
18
19-To get more details about the product and useful additional resources , please visit the product page
20+To get more details about the product and useful additional resources, please visit the product page
21 [Product Page] [product-page] and [IBM Knowledge Center] [ibm-xlf-info]
22
23+
24 Usage
25 -----
26-Download IBM XL FORTRAN for Linux and upload it to your apache
27-repository. To download and install the code contained in this charm you must agree to the IBM license.
28+
29+Download your 60 day trial version for IBM XL Fortran for Linux and upload it to your apache
30+repository. To download and install the code contained in this charm you must agree to the IBM license.
31+The License files (`LicenseAgreement.pdf` and `license.pdf` ) can be found under the `files/archives` folder
32+after extraction of IBM Fortran compiler software is successful.
33+
34
35 # Creating the repositories in Apache
36 Run steps below with admin access
37@@ -29,8 +36,8 @@
38 cd <apache-repository-directory>
39 mkdir ibm-xlf
40
41-Place the downloaded IBM XL FORTRAN for Linux packages in the above directory
42-Configure Apache server to allow access to the repository.
43+Place the downloaded IBM XL FORTRAN for Linux packages in the above directory and Configure Apache server to allow access to the repository.
44+
45 Configure config.yaml with the repository url
46
47 Example : fortran_url: "http://<server-name>/<REPOSITORY_DIR>/fortran_url"
48@@ -38,6 +45,7 @@
49 Verify repository is set correctly otherwise charm might throw errors.
50
51
52+
53 Deploy
54 ------
55
56@@ -54,9 +62,10 @@
57
58 If not,
59
60- 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>
61-
62-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.
63+ 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+
65+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+
67
68 Configuration
69 -------------
70@@ -64,14 +73,14 @@
71
72 `xlfortran_url`
73
74-URL to download IBM XL FORTRAN packages.The url would be in this format
75-http://<server-name>/<REPOSITORY_DIR>/ibm-xlf.If not set or set incorrectly, the charm
76+URL to download IBM XL FORTRAN packages. The url would be in this format
77+http://<server-name>/<REPOSITORY_DIR>/ibm-xlf. If not set or set incorrectly, the charm
78 cannot install the IBM XL FORTRAN software.
79
80 `accept-ibm-xlfortran-license`
81
82 The IBM XL FORTRAN software can only be used by accepting the terms and conditions for IBM
83-XL FORTRAN License.Setting this option to True indicates that you have read and accepted the
84+XL FORTRAN License. Setting this option to True indicates that you have read and accepted the
85 IBM XL FORTRAN terms and conditions found in the license file.
86
87 `xlfortran_package_name`
88@@ -82,7 +91,7 @@
89
90 Checksum value to check integrity of IBM XL FORTRAN package. The Charm uses
91 sha1sum to check the integrity. If empty, it does not carry out the integrity check.
92-The command to find the checksum is : sha1sum <Package Name> | cut -d" " -f1
93+The command to find the checksum is: "sha1sum <Package Name> | cut -d" " -f1"
94
95
96 IBM XL FORTRAN Information
97
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 type: boolean
103 default: False
104 description: |
105- IBM XL Fortran for Linux is an advanced,high-performance compiler that can be used for developing complex,computationally intensive programs,
106- including interlanguage calls with C programs.
107+ The XL_FORTRAN software can only be used by
108+ accepting the terms and conditions for IBM XL_FORTRAN License.
109+ Setting this option to True
110+ indicates that you have read and accepted the IBM XL_FORTRAN terms and
111+ conditions found in the license file. The details about accessing
112+ the license(s) can be found in the README.
113 fortran_path_name:
114 type: string
115 default: "/opt/ibm"
116
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 #Check Fortran is installed or not
122 is_fortran_installed()
123 {
124- if [ -d $FORTRAN_INSTALL_PATH ]; then
125- echo "True"
126- juju-log "IBM XL Fortran: Fortran is installed"
127- else
128- echo "False"
129- juju-log "IBM XL Fortran: Fortran is not installed"
130- fi
131+ if [ -d $FORTRAN_INSTALL_PATH/xlf ]; then
132+ echo "True"
133+ juju-log "IBM XL Fortran: Fortran is installed"
134+ else
135+ echo "False"
136+ juju-log "IBM XL Fortran: Fortran is not installed"
137+ fi
138+
139+
140 }
141
142 #It will Remove IBM XL Fortran, if its installed
143@@ -30,8 +32,10 @@
144 #remove packages
145 dpkg -P xlf.$xlf_version libxlf-devel.$xlf_version
146 if ! [ -d $FORTRAN_INSTALL_PATH/xlf/$xlf_version/bin ]; then
147-
148- juju-log "IBM XL Fortran: Sucessfully uninstalled Fortran"
149+ juju-log "IBM XL Fortran: Successfully uninstalled Fortran"
150+ cd $FORTRAN_INSTALL_PATH
151+ rm -rf xlf
152+ juju-log "IBM XL Fortran: Removed xlf folder"
153 status-set blocked "IBM XL Fortran license not accepted"
154
155 else
156@@ -40,8 +44,8 @@
157 fi
158
159 else
160- juju-log "IBM XL Fortran: Fortran is not installed"
161- exit 0
162+ juju-log "IBM XL Fortran: Fortran is not installed"
163+ exit 0
164 fi
165 }
166
167@@ -139,57 +143,56 @@
168 #downlaod IBM XL Fortran package
169 download_Fortran
170
171- #extract MFSVR package if download succeeded
172+ #extract IBM XL Fortran package if download succeeded
173 if [ -f $ARCHIVE_DIR/$cfg_pkg_name ]; then
174 juju-log "IBM XL Fortran: Extracting binary package"
175 status-set maintenance "Extracting IBM XL FORTRAN package"
176 cd $ARCHIVE_DIR
177 if ! [ -d $ARCHIVE_DIR/Fortran ]; then
178- mkdir Fortran
179- chmod 777 Fortran
180- tar -xzf $ARCHIVE_DIR/$cfg_pkg_name -C Fortran
181+ mkdir Fortran
182+ chmod 755 Fortran
183+ tar -xzf $ARCHIVE_DIR/$cfg_pkg_name -C Fortran
184+ if [ $? != 0 ]; then
185+ juju-log "IBM XL Fortran: Unable to extract the Fortran package content. Verify whether the package is corrupt."
186+ #Remove corrupt archive file
187+ rm -rf $ARCHIVE_DIR/*.tar.gz
188+ exit 0
189+
190+ fi
191+
192+ fi
193+
194+ fi
195+
196+ juju-log "Starting Fortran installation"
197+ #Check Fortran package availability
198+
199+ if [ -f $CHARM_DIR/files/archives/Fortran/install ]; then
200+ juju-log "Fortran Packages available for installation.";
201+ fortran_install_done=`is_fortran_installed`
202+ if [ $fortran_install_done == False ]; then
203+ status-set maintenance "Installing IBM XL FORTRAN package"
204+ echo 1 | $CHARM_DIR/files/archives/Fortran/install
205+ if [ $? == 0 ]; then
206+ juju-log "IBM XL Fortran: Fortran is installed successfully"
207+ status-set active "Installed IBM XL FORTRAN package successfully"
208+ else
209+ juju-log "IBM XL Fortran: Error while installing Fortran"
210+ exit 1
211+ fi
212+
213 else
214- juju-log "IBM XL Fortran: Fortran directoty is alredy exist"
215-
216- fi
217-
218- if [ $? != 0 ]; then
219- juju-log "IBM XL Fortran: Unable to extract the Fortran package content. Verify whether the package is corrupt."
220- #Remove corrupt archive file
221- rm -rf $ARCHIVE_DIR/*.tar.gz
222- exit 0
223-
224- fi
225-
226+ juju-log "IBM XL Fortran: Fortran is alreay installed"
227+
228+ fi
229+
230+
231+ else
232+ juju-log "IBM XL Fortran: Fortran Packages are missing. Please check README file.";
233+ exit 1
234+
235+
236 fi
237-
238- juju-log "IBM XL Fortran: Fortran package downloaded sucessfully."
239-
240-
241-fi
242-
243-juju-log "Starting Fortran installation"
244-#Check Fortran package availability
245-
246-if [ -f $CHARM_DIR/files/archives/Fortran/install ]; then
247- juju-log "Fortran Packages available for installation.";
248- if ! [ -d $FORTRAN_INSTALL_PATH/xlf/bin ]; then
249- status-set maintenance "Installing IBM XL FORTRAN package"
250- echo 1 | $CHARM_DIR/files/archives/Fortran/install
251-
252- if [ $? == 0 ]; then
253- juju-log "IBM XL Fortran: Fortran is installed sucessfully"
254- status-set maintenance "Installed IBM XL FORTRAN package sucessfully"
255- else
256- juju-log "IBM XL Fortran: Error while installing Fortran"
257- exit 1
258- fi
259- else
260- juju-log "IBM XL Fortran: Fortran is alreay installed"
261- fi
262-else
263- juju-log "IBM XL Fortran: Fortran Packages are missing. Please check README file.";
264- exit 1
265
266 fi
267
268
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 set -e
274 juju-log "starting stop hook"
275 FORTRAN_PATH=$(config-get fortran_path_name)
276-echo $FORTRAN_PATH
277-rm -rf $FORTRAN_PATH
278-
279-if ! [-d $FORTRAN_PATH ]; then
280- juju-log "Fortran path removed sucessfully"
281-fi
282+
283+if [ -d $FORTRAN_PATH/xlf ]; then
284+ rm -rf $FORTRAN_PATH/xlf
285+else
286+ juju-log "Fortran is not installed"
287+fi
288+
289
290 juju-log "Stop hook completed"

Subscribers

People subscribed via source and target branches

to all changes: