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
=== modified file 'README.md'
--- README.md 2015-08-21 07:05:52 +0000
+++ README.md 2015-08-26 08:29:13 +0000
@@ -1,8 +1,10 @@
1Charm for IBM XL FORTRAN for Linux 15.1.2, Evaluation1Charm for IBM XL FORTRAN for Linux 15.1.2, Evaluation
22
3
3Overview4Overview
4--------5--------
56
7
6IBM XL FORTRAN for Linux V15.1.2, Evaluation8IBM XL FORTRAN for Linux V15.1.2, Evaluation
79
8IBM XL FORTRAN for Linux, V15.1.2 is a standards-based, high-performance Fortran compiler with advanced optimization and performance-tuning features.10IBM XL FORTRAN for Linux, V15.1.2 is a standards-based, high-performance Fortran compiler with advanced optimization and performance-tuning features.
@@ -10,13 +12,18 @@
10For details on IBM XL FORTRAN, as well as information on purchasing the trial version,12For details on IBM XL FORTRAN, as well as information on purchasing the trial version,
11please visit: [Trial Download] [trial-xlf].13please visit: [Trial Download] [trial-xlf].
1214
13To get more details about the product and useful additional resources , please visit the product page15To get more details about the product and useful additional resources, please visit the product page
14[Product Page] [product-page] and [IBM Knowledge Center] [ibm-xlf-info]16[Product Page] [product-page] and [IBM Knowledge Center] [ibm-xlf-info]
1517
18
16Usage19Usage
17-----20-----
18Download IBM XL FORTRAN for Linux and upload it to your apache21
19repository. To download and install the code contained in this charm you must agree to the IBM license. 22Download your 60 day trial version for IBM XL Fortran for Linux and upload it to your apache
23repository. To download and install the code contained in this charm you must agree to the IBM license.
24The License files (`LicenseAgreement.pdf` and `license.pdf` ) can be found under the `files/archives` folder
25after extraction of IBM Fortran compiler software is successful.
26
2027
21# Creating the repositories in Apache28# Creating the repositories in Apache
22Run steps below with admin access29Run steps below with admin access
@@ -29,8 +36,8 @@
29 cd <apache-repository-directory>36 cd <apache-repository-directory>
30 mkdir ibm-xlf37 mkdir ibm-xlf
3138
32Place the downloaded IBM XL FORTRAN for Linux packages in the above directory39Place the downloaded IBM XL FORTRAN for Linux packages in the above directory and Configure Apache server to allow access to the repository.
33Configure Apache server to allow access to the repository.40
34Configure config.yaml with the repository url41Configure config.yaml with the repository url
35 42
36 Example : fortran_url: "http://<server-name>/<REPOSITORY_DIR>/fortran_url"43 Example : fortran_url: "http://<server-name>/<REPOSITORY_DIR>/fortran_url"
@@ -38,6 +45,7 @@
38 Verify repository is set correctly otherwise charm might throw errors.45 Verify repository is set correctly otherwise charm might throw errors.
3946
4047
48
41Deploy49Deploy
42------50------
4351
@@ -54,9 +62,10 @@
54 62
55If not,63If not,
56 64
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>
5866
59This 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.67This 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.
68
60 69
61Configuration70Configuration
62-------------71-------------
@@ -64,14 +73,14 @@
6473
65`xlfortran_url` 74`xlfortran_url`
6675
67URL to download IBM XL FORTRAN packages.The url would be in this format 76URL to download IBM XL FORTRAN packages. The url would be in this format
68http://<server-name>/<REPOSITORY_DIR>/ibm-xlf.If not set or set incorrectly, the charm77http://<server-name>/<REPOSITORY_DIR>/ibm-xlf. If not set or set incorrectly, the charm
69cannot install the IBM XL FORTRAN software.78cannot install the IBM XL FORTRAN software.
7079
71`accept-ibm-xlfortran-license`80`accept-ibm-xlfortran-license`
7281
73The IBM XL FORTRAN software can only be used by accepting the terms and conditions for IBM 82The IBM XL FORTRAN software can only be used by accepting the terms and conditions for IBM
74XL FORTRAN License.Setting this option to True indicates that you have read and accepted the83XL FORTRAN License. Setting this option to True indicates that you have read and accepted the
75IBM XL FORTRAN terms and conditions found in the license file.84IBM XL FORTRAN terms and conditions found in the license file.
7685
77`xlfortran_package_name`86`xlfortran_package_name`
@@ -82,7 +91,7 @@
8291
83Checksum value to check integrity of IBM XL FORTRAN package. The Charm uses92Checksum value to check integrity of IBM XL FORTRAN package. The Charm uses
84sha1sum to check the integrity. If empty, it does not carry out the integrity check.93sha1sum to check the integrity. If empty, it does not carry out the integrity check.
85The command to find the checksum is : sha1sum <Package Name> | cut -d" " -f194The command to find the checksum is: "sha1sum <Package Name> | cut -d" " -f1"
8695
8796
88IBM XL FORTRAN Information97IBM XL FORTRAN Information
8998
=== modified file 'config.yaml'
--- config.yaml 2015-08-21 06:48:17 +0000
+++ config.yaml 2015-08-26 08:29:13 +0000
@@ -13,8 +13,12 @@
13 type: boolean13 type: boolean
14 default: False14 default: False
15 description: |15 description: |
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
17 including interlanguage calls with C programs.17 accepting the terms and conditions for IBM XL_FORTRAN License.
18 Setting this option to True
19 indicates that you have read and accepted the IBM XL_FORTRAN terms and
20 conditions found in the license file. The details about accessing
21 the license(s) can be found in the README.
18 fortran_path_name:22 fortran_path_name:
19 type: string23 type: string
20 default: "/opt/ibm"24 default: "/opt/ibm"
2125
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2015-08-21 05:32:04 +0000
+++ hooks/config-changed 2015-08-26 08:29:13 +0000
@@ -8,13 +8,15 @@
8#Check Fortran is installed or not8#Check Fortran is installed or not
9is_fortran_installed()9is_fortran_installed()
10{10{
11 if [ -d $FORTRAN_INSTALL_PATH ]; then11 if [ -d $FORTRAN_INSTALL_PATH/xlf ]; then
12 echo "True"12 echo "True"
13 juju-log "IBM XL Fortran: Fortran is installed"13 juju-log "IBM XL Fortran: Fortran is installed"
14 else14 else
15 echo "False"15 echo "False"
16 juju-log "IBM XL Fortran: Fortran is not installed"16 juju-log "IBM XL Fortran: Fortran is not installed"
17 fi17 fi
18
19
18}20}
1921
20#It will Remove IBM XL Fortran, if its installed22#It will Remove IBM XL Fortran, if its installed
@@ -30,8 +32,10 @@
30 #remove packages32 #remove packages
31 dpkg -P xlf.$xlf_version libxlf-devel.$xlf_version33 dpkg -P xlf.$xlf_version libxlf-devel.$xlf_version
32 if ! [ -d $FORTRAN_INSTALL_PATH/xlf/$xlf_version/bin ]; then34 if ! [ -d $FORTRAN_INSTALL_PATH/xlf/$xlf_version/bin ]; then
33 35 juju-log "IBM XL Fortran: Successfully uninstalled Fortran"
34 juju-log "IBM XL Fortran: Sucessfully uninstalled Fortran"36 cd $FORTRAN_INSTALL_PATH
37 rm -rf xlf
38 juju-log "IBM XL Fortran: Removed xlf folder"
35 status-set blocked "IBM XL Fortran license not accepted" 39 status-set blocked "IBM XL Fortran license not accepted"
36 40
37 else41 else
@@ -40,8 +44,8 @@
40 fi44 fi
4145
42 else46 else
43 juju-log "IBM XL Fortran: Fortran is not installed"47 juju-log "IBM XL Fortran: Fortran is not installed"
44 exit 048 exit 0
45 fi49 fi
46}50}
4751
@@ -139,57 +143,56 @@
139 #downlaod IBM XL Fortran package143 #downlaod IBM XL Fortran package
140 download_Fortran144 download_Fortran
141 145
142 #extract MFSVR package if download succeeded146 #extract IBM XL Fortran package if download succeeded
143 if [ -f $ARCHIVE_DIR/$cfg_pkg_name ]; then147 if [ -f $ARCHIVE_DIR/$cfg_pkg_name ]; then
144 juju-log "IBM XL Fortran: Extracting binary package"148 juju-log "IBM XL Fortran: Extracting binary package"
145 status-set maintenance "Extracting IBM XL FORTRAN package"149 status-set maintenance "Extracting IBM XL FORTRAN package"
146 cd $ARCHIVE_DIR150 cd $ARCHIVE_DIR
147 if ! [ -d $ARCHIVE_DIR/Fortran ]; then151 if ! [ -d $ARCHIVE_DIR/Fortran ]; then
148 mkdir Fortran152 mkdir Fortran
149 chmod 777 Fortran153 chmod 755 Fortran
150 tar -xzf $ARCHIVE_DIR/$cfg_pkg_name -C Fortran154 tar -xzf $ARCHIVE_DIR/$cfg_pkg_name -C Fortran
155 if [ $? != 0 ]; then
156 juju-log "IBM XL Fortran: Unable to extract the Fortran package content. Verify whether the package is corrupt."
157 #Remove corrupt archive file
158 rm -rf $ARCHIVE_DIR/*.tar.gz
159 exit 0
160
161 fi
162
163 fi
164
165 fi
166
167 juju-log "Starting Fortran installation"
168 #Check Fortran package availability
169
170 if [ -f $CHARM_DIR/files/archives/Fortran/install ]; then
171 juju-log "Fortran Packages available for installation.";
172 fortran_install_done=`is_fortran_installed`
173 if [ $fortran_install_done == False ]; then
174 status-set maintenance "Installing IBM XL FORTRAN package"
175 echo 1 | $CHARM_DIR/files/archives/Fortran/install
176 if [ $? == 0 ]; then
177 juju-log "IBM XL Fortran: Fortran is installed successfully"
178 status-set active "Installed IBM XL FORTRAN package successfully"
179 else
180 juju-log "IBM XL Fortran: Error while installing Fortran"
181 exit 1
182 fi
183
151 else184 else
152 juju-log "IBM XL Fortran: Fortran directoty is alredy exist"185 juju-log "IBM XL Fortran: Fortran is alreay installed"
153 186
154 fi187 fi
155188
156 if [ $? != 0 ]; then189
157 juju-log "IBM XL Fortran: Unable to extract the Fortran package content. Verify whether the package is corrupt."190 else
158 #Remove corrupt archive file191 juju-log "IBM XL Fortran: Fortran Packages are missing. Please check README file.";
159 rm -rf $ARCHIVE_DIR/*.tar.gz192 exit 1
160 exit 0193
161 194
162 fi
163
164 fi195 fi
165
166 juju-log "IBM XL Fortran: Fortran package downloaded sucessfully."
167
168
169fi
170
171juju-log "Starting Fortran installation"
172#Check Fortran package availability
173
174if [ -f $CHARM_DIR/files/archives/Fortran/install ]; then
175 juju-log "Fortran Packages available for installation.";
176 if ! [ -d $FORTRAN_INSTALL_PATH/xlf/bin ]; then
177 status-set maintenance "Installing IBM XL FORTRAN package"
178 echo 1 | $CHARM_DIR/files/archives/Fortran/install
179
180 if [ $? == 0 ]; then
181 juju-log "IBM XL Fortran: Fortran is installed sucessfully"
182 status-set maintenance "Installed IBM XL FORTRAN package sucessfully"
183 else
184 juju-log "IBM XL Fortran: Error while installing Fortran"
185 exit 1
186 fi
187 else
188 juju-log "IBM XL Fortran: Fortran is alreay installed"
189 fi
190else
191 juju-log "IBM XL Fortran: Fortran Packages are missing. Please check README file.";
192 exit 1
193196
194fi197fi
195198
196199
=== modified file 'hooks/stop'
--- hooks/stop 2015-08-21 05:32:04 +0000
+++ hooks/stop 2015-08-26 08:29:13 +0000
@@ -2,11 +2,12 @@
2set -e2set -e
3juju-log "starting stop hook"3juju-log "starting stop hook"
4FORTRAN_PATH=$(config-get fortran_path_name)4FORTRAN_PATH=$(config-get fortran_path_name)
5echo $FORTRAN_PATH5
6rm -rf $FORTRAN_PATH6if [ -d $FORTRAN_PATH/xlf ]; then
77 rm -rf $FORTRAN_PATH/xlf
8if ! [-d $FORTRAN_PATH ]; then8else
9 juju-log "Fortran path removed sucessfully"9 juju-log "Fortran is not installed"
10fi10fi
11
1112
12juju-log "Stop hook completed"13juju-log "Stop hook completed"

Subscribers

People subscribed via source and target branches

to all changes: