Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- /workspace/neilga/ohacds/webrev/usr/src/pkgdefs/jas.dvdimage.ksh-
+++ jas.dvdimage.ksh
1 1 #!/bin/ksh
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License (the License).
7 7 # You may not use this file except in compliance with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/CDDL.txt
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/CDDL.txt.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets [] replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22
23 23 #
24 24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 25 # Use is subject to license terms.
26 26 #
27 27 # ident "%Z%%M% %I% %E% SMI"
28 28 #
29 29 # This script is used by the build_dvds script to build the pieces
30 30 # of the DVD image that this workspace contributes to it. The name of
31 31 # the DVD image is obtained from the prefix of this script's name:
32 32 # <dvd image name>.dvdimage.ksh
33 33 #
34 34 # This script should contain a function named build_image_<ARCH>_<OS>
35 35 # for every ARCH/OS combination supported by the build, so for sparc
36 36 # Solaris 9 the function would be named build_image_sparc_9. These ARCH/OS
37 37 # specific functions typically call other functions to handle the areas of
38 38 # the DVD that are common to multiple OSes, like the installer and
39 39 # external shared components. These individual functions should be made
40 40 # robust enough to handle the situation where they are called more than once,
41 41 # which is highly likely if each OS function calls a common function.
42 42 #
43 43 # See build_dvds for the list of predefined variables and functions
44 44 # available to this script.
45 45 #
46 46
47 47 #
48 48 # Variables
49 49 #
50 50 AGENTS_DIR=${DVD}/Solaris_${ARCH}/Product/sun_cluster_agents
51 51 CLOSED_PKGDEFS_DIR=${WS}/usr/closed/pkgdefs
52 52 MACH=$([ "${ARCH}" = "sparc" ] && { echo ${ARCH}; } || { echo "i386"; })
53 53 ND=$([ "${DEBUG}" -eq 0 ] && echo "-nd")
54 54 PKGARCH=${WS}/packages/${MACH}/Sol_${OS}${ND}
55 55 PKGDEFS_DIR=${WS}/usr/src/pkgdefs
56 56 SOL=Solaris_${OS}
57 57
58 58 # DVD image of external products
59 59 DVDIMAGE_DIR=${PKGDEFS_DIR}/dvdimages/$(${BASENAME} ${DVD})
60 60
61 61 # Agent packages
62 62 PACKAGES_AGFA_IMPAX=SUNWscpax
63 63
64 64 PACKAGES_APACHE=SUNWscapc
65 65
66 66 PACKAGES_APACHE_TC=SUNWsctomcat
67 67
68 68 PACKAGES_DHC=SUNWscdhc
69 69
70 70 PACKAGES_DNS=SUNWscdns
71 71
72 72 PACKAGES_EBS=SUNWscebs
73 73
74 74 PACKAGES_HADB=SUNWschadb
75 75
76 76 PACKAGES_HADB=SUNWscids
77 77
78 78 PACKAGES_KERBEROS=SUNWsckrb5
79 79
80 80 PACKAGES_L10N="\
81 81 SUNWcscapc \
82 82 SUNWcscdns \
83 83 SUNWcschadb \
84 84 SUNWcschtt \
85 85 SUNWcsclc \
86 86 SUNWcscnfs \
87 87 SUNWcscor \
88 88 SUNWcscs1as \
89 89 SUNWcscs1mq \
90 90 SUNWcscsap \
91 91 SUNWcscsapdb \
92 92 SUNWcscsapenq \
93 93 SUNWcscsaprepl \
94 94 SUNWcscsapscs \
95 95 SUNWcscsapwebas \
96 96 SUNWcscsbl \
97 97 SUNWcscsyb \
98 98 SUNWcscwls \
99 99 SUNWdschadb \
100 100 SUNWdschtt \
101 101 SUNWdscs1as \
102 102 SUNWdscs1mq \
103 103 SUNWeschadb \
104 104 SUNWeschtt \
105 105 SUNWescs1as \
106 106 SUNWescs1mq \
107 107 SUNWfscapc \
108 108 SUNWfscdns \
109 109 SUNWfschadb \
110 110 SUNWfschtt \
111 111 SUNWfsclc \
112 112 SUNWfscnfs \
113 113 SUNWfscs1as \
114 114 SUNWfscs1mq \
115 115 SUNWfscsap \
116 116 SUNWfscsapdb \
117 117 SUNWfscsbl \
118 118 SUNWfscwls \
119 119 SUNWhschadb \
120 120 SUNWhschtt \
121 121 SUNWhscs1as \
122 122 SUNWhscs1mq \
123 123 SUNWjscapc \
124 124 SUNWjscdns \
125 125 SUNWjschadb \
126 126 SUNWjschtt \
127 127 SUNWjsclc \
128 128 SUNWjscnfs \
129 129 SUNWjscor \
130 130 SUNWjscs1as \
131 131 SUNWjscs1mq \
132 132 SUNWjscsap \
133 133 SUNWjscsapdb \
134 134 SUNWjscsapenq \
135 135 SUNWjscsaprepl \
136 136 SUNWjscsapscs \
137 137 SUNWjscsapwebas \
138 138 SUNWjscsbl \
139 139 SUNWjscsyb \
140 140 SUNWjscwls \
141 141 SUNWkschadb \
142 142 SUNWkschtt \
143 143 SUNWkscs1as \
144 144 SUNWkscs1mq"
145 145
146 146 PACKAGES_LIVECACHE=SUNWsclc
147 147
148 148 PACKAGES_MQI=SUNWscmqi
149 149
150 150 PACKAGES_MQS=SUNWscmqs
151 151
152 152 PACKAGES_MYS=SUNWscmys
153 153
154 154 PACKAGES_N1G_SPS=SUNWscsps
155 155
156 156 PACKAGES_NFS=SUNWscnfs
157 157
158 158 PACKAGES_ORACLE=SUNWscor
159 159
160 160 PACKAGES_ORACLE_9IAS=SUNWsc9ias
161 161
162 162 PACKAGES_POSTGRESQL=SUNWscPostgreSQL
163 163
164 164 PACKAGES_S1AS=SUNWscs1as
165 165
166 166 PACKAGES_S1MQ=SUNWscs1mq
167 167
168 168 PACKAGES_S1WS=SUNWschtt
169 169
170 170 PACKAGES_SAA=SUNWscsaa
171 171
172 172 PACKAGES_SAP=SUNWscsap
173 173
174 174 PACKAGES_SAPDB=SUNWscsapdb
175 175
176 176 PACKAGES_SAPWEBAS="\
177 177 SUNWscsapenq \
178 178 SUNWscsaprepl \
179 179 SUNWscsapscs \
180 180 SUNWscsapwebas"
181 181
182 182 PACKAGES_SIEBEL=SUNWscsbl
183 183
184 184 PACKAGES_SMB=SUNWscsmb
185 185
|
↓ open down ↓ |
185 lines elided |
↑ open up ↑ |
186 186 PACKAGES_SOLARIS_ZONES=SUNWsczone
187 187
188 188 PACKAGES_SUN_GRID_ENG=SUNWscsge
189 189
190 190 PACKAGES_SWIFT_GWAY=SUNWscsag
191 191
192 192 PACKAGES_SYBASE=SUNWscsyb
193 193
194 194 PACKAGES_WLS=SUNWscwls
195 195
196 +PACKAGES_XVM=SUNWscxvm
197 +
196 198 # Specify which agents are supported on which platforms
197 199 sparc_9_AGENTS="\
198 200 ${PACKAGES_AGFA_IMPAX} \
199 201 ${PACKAGES_APACHE} \
200 202 ${PACKAGES_APACHE_TC} \
201 203 ${PACKAGES_DHC} \
202 204 ${PACKAGES_DNS} \
203 205 ${PACKAGES_EBS} \
204 206 ${PACKAGES_HADB} \
205 207 ${PACKAGES_LIVECACHE} \
206 208 ${PACKAGES_MQI} \
207 209 ${PACKAGES_MQS} \
208 210 ${PACKAGES_MYS} \
209 211 ${PACKAGES_N1G_SPS} \
210 212 ${PACKAGES_NFS} \
211 213 ${PACKAGES_ORACLE} \
212 214 ${PACKAGES_ORACLE_9IAS} \
213 215 ${PACKAGES_POSTGRESQL} \
214 216 ${PACKAGES_S1AS} \
215 217 ${PACKAGES_S1MQ} \
216 218 ${PACKAGES_S1WS} \
217 219 ${PACKAGES_SAA} \
218 220 ${PACKAGES_SAP} \
219 221 ${PACKAGES_SAPDB} \
220 222 ${PACKAGES_SAPWEBAS} \
221 223 ${PACKAGES_SIEBEL} \
222 224 ${PACKAGES_SMB} \
223 225 ${PACKAGES_SUN_GRID_ENG} \
224 226 ${PACKAGES_SWIFT_GWAY} \
225 227 ${PACKAGES_SYBASE} \
226 228 ${PACKAGES_WLS}"
227 229
228 230 sparc_10_AGENTS="\
229 231 ${PACKAGES_APACHE} \
230 232 ${PACKAGES_APACHE_TC} \
231 233 ${PACKAGES_DHC} \
232 234 ${PACKAGES_DNS} \
233 235 ${PACKAGES_EBS} \
234 236 ${PACKAGES_HADB} \
235 237 ${PACKAGES_KERBEROS} \
236 238 ${PACKAGES_LIVECACHE} \
237 239 ${PACKAGES_MQI} \
238 240 ${PACKAGES_MQS} \
239 241 ${PACKAGES_MYS} \
240 242 ${PACKAGES_N1G_SPS} \
241 243 ${PACKAGES_NFS} \
242 244 ${PACKAGES_ORACLE} \
243 245 ${PACKAGES_ORACLE_9IAS} \
244 246 ${PACKAGES_POSTGRESQL} \
245 247 ${PACKAGES_S1AS} \
246 248 ${PACKAGES_S1MQ} \
247 249 ${PACKAGES_S1WS} \
248 250 ${PACKAGES_SAA} \
249 251 ${PACKAGES_SAP} \
250 252 ${PACKAGES_SAPDB} \
251 253 ${PACKAGES_SAPWEBAS} \
252 254 ${PACKAGES_SIEBEL} \
253 255 ${PACKAGES_SMB} \
254 256 ${PACKAGES_SOLARIS_ZONES} \
255 257 ${PACKAGES_SUN_GRID_ENG} \
256 258 ${PACKAGES_SWIFT_GWAY} \
257 259 ${PACKAGES_SYBASE} \
258 260 ${PACKAGES_WLS}"
259 261
260 262 # Support for S11 is unknown at this time, so include all agents
261 263 sparc_11_AGENTS="\
262 264 ${PACKAGES_AGFA_IMPAX} \
263 265 ${PACKAGES_APACHE} \
264 266 ${PACKAGES_APACHE_TC} \
265 267 ${PACKAGES_DHC} \
266 268 ${PACKAGES_DNS} \
267 269 ${PACKAGES_EBS} \
268 270 ${PACKAGES_HADB} \
269 271 ${PACKAGES_IDS} \
270 272 ${PACKAGES_KERBEROS} \
271 273 ${PACKAGES_L10N} \
272 274 ${PACKAGES_LIVECACHE} \
273 275 ${PACKAGES_MQI} \
274 276 ${PACKAGES_MQS} \
275 277 ${PACKAGES_MYS} \
276 278 ${PACKAGES_N1G_SPS} \
277 279 ${PACKAGES_NFS} \
278 280 ${PACKAGES_ORACLE} \
279 281 ${PACKAGES_ORACLE_9IAS} \
280 282 ${PACKAGES_POSTGRESQL} \
281 283 ${PACKAGES_S1AS} \
282 284 ${PACKAGES_S1MQ} \
283 285 ${PACKAGES_S1WS} \
284 286 ${PACKAGES_SAA} \
285 287 ${PACKAGES_SAP} \
286 288 ${PACKAGES_SAPDB} \
287 289 ${PACKAGES_SAPWEBAS} \
288 290 ${PACKAGES_SIEBEL} \
289 291 ${PACKAGES_SMB} \
290 292 ${PACKAGES_SOLARIS_ZONES} \
291 293 ${PACKAGES_SUN_GRID_ENG} \
292 294 ${PACKAGES_SWIFT_GWAY} \
293 295 ${PACKAGES_SYBASE} \
294 296 ${PACKAGES_WLS}"
295 297
296 298 i386_10_AGENTS="\
297 299 ${PACKAGES_APACHE} \
298 300 ${PACKAGES_APACHE_TC} \
299 301 ${PACKAGES_DHC} \
300 302 ${PACKAGES_DNS} \
301 303 ${PACKAGES_HADB} \
302 304 ${PACKAGES_KERBEROS} \
303 305 ${PACKAGES_LIVECACHE} \
304 306 ${PACKAGES_MQI} \
305 307 ${PACKAGES_MQS} \
306 308 ${PACKAGES_MYS} \
307 309 ${PACKAGES_N1G_SPS} \
308 310 ${PACKAGES_NFS} \
309 311 ${PACKAGES_ORACLE} \
310 312 ${PACKAGES_ORACLE_9IAS} \
311 313 ${PACKAGES_POSTGRESQL} \
|
↓ open down ↓ |
106 lines elided |
↑ open up ↑ |
312 314 ${PACKAGES_S1AS} \
313 315 ${PACKAGES_S1MQ} \
314 316 ${PACKAGES_S1WS} \
315 317 ${PACKAGES_SAP} \
316 318 ${PACKAGES_SAPDB} \
317 319 ${PACKAGES_SAPWEBAS} \
318 320 ${PACKAGES_SMB} \
319 321 ${PACKAGES_SOLARIS_ZONES} \
320 322 ${PACKAGES_SUN_GRID_ENG} \
321 323 ${PACKAGES_SYBASE} \
322 - ${PACKAGES_WLS}"
324 + ${PACKAGES_WLS} \
325 + ${PACKAGES_XVM}"
323 326
324 327 i386_11_AGENTS=${sparc_11_AGENTS}
325 328
326 329 AGENTS=$(eval echo \${${MACH}_${OS}_AGENTS})
327 330
328 331 #
329 332 # Functions
330 333 #
331 334 # Builds the external pieces of the image
332 335 # build_image_external()
333 336 build_image_external() {
334 337 # Check if this piece of the image has already been built
335 338 [ -h "${DVD}/Copyright" ] && return
336 339
337 340 echo "Adding the external pieces to the image"
338 341
339 342 # Create directories
340 343 ${MKDIR} ${DVD} || error "Can't create directory ${DVD}"
341 344
342 345 # Add dvdimage of symlinks to external products
343 346 (cd ${DVDIMAGE_DIR} && ${FIND} . -print | ${CPIO} -oc) | (cd ${DVD} &&
344 347 ${CPIO} -icdum)
345 348 }
346 349
347 350 # Builds the common pieces of the image
348 351 # build_image_common()
349 352 build_image_common() {
350 353 # Check if this piece of the image has already been built
351 354 [ -f "${AGENTS_DIR}/.producttoc" -a ! -h "${AGENTS_DIR}/.producttoc" ] && return
352 355
353 356 # Build the external pieces of the image
354 357 build_image_external
355 358
356 359 echo "Adding the common ${MACH} pieces to the image"
357 360
358 361 # Create directories
359 362 ${MKDIR} ${AGENTS_DIR} || error "Can't create directory ${AGENTS_DIR}"
360 363
361 364 # Add .producttoc to top level directory
362 365 copy ${PKGDEFS_DIR}/dot.producttoc.sun_cluster_agents.${MACH} ${AGENTS_DIR}/.producttoc
363 366 }
364 367
365 368 # Builds the solaris pieces of the image
366 369 # build_image_solaris()
367 370 build_image_solaris() {
368 371 # Check if this piece of the image has already been built
369 372 [ -f "${AGENTS_DIR}/${SOL}/Packages/.clustertoc" -a ! -h "${AGENTS_DIR}/${SOL}/Packages/.clustertoc" ] && return
370 373
371 374 # Build the common pieces of the image
372 375 build_image_common
373 376
374 377 echo "Adding the ${SOL} ${MACH} pieces to the image"
375 378
376 379 # Create directories
377 380 ${MKDIR} ${AGENTS_DIR}/${SOL}
378 381 ${MKDIR} ${AGENTS_DIR}/${SOL}/Packages
379 382
380 383 # Add .clustertoc to agents Packages directory
381 384 copy ${PKGDEFS_DIR}/dot.clustertoc ${AGENTS_DIR}/${SOL}/Packages/.clustertoc
382 385
383 386 # Add .order to agents Packages directory
384 387 copy ${PKGDEFS_DIR}/dot.order ${AGENTS_DIR}/${SOL}/Packages/.order
385 388
386 389 # Copy packages from package archive to agents Packages directory
387 390 [ -d "${PKGARCH}" ] || error "Package archive not found"
388 391
389 392 for pkg in ${AGENTS}
390 393 do
391 394 [ -h "${AGENTS_DIR}/${SOL}/Packages/${pkg}" ] && ${RM} -r ${AGENTS_DIR}/${SOL}/Packages/${pkg}
392 395 done
393 396
394 397 ${PKGTRANS} ${PKGARCH} ${AGENTS_DIR}/${SOL}/Packages ${AGENTS} || error "pkgtrans to ${AGENTS_DIR}/${SOL}/Packages failed"
395 398 }
396 399
397 400 # Builds the sparc solaris 9 pieces of the image
398 401 # build_image_sparc_9()
399 402 build_image_sparc_9() {
400 403 # Build the solaris pieces of the image
401 404 build_image_solaris
402 405 }
403 406
404 407 # Builds the sparc solaris 10 pieces of the image
405 408 # build_image_sparc_10()
406 409 build_image_sparc_10() {
407 410 # Build the solaris pieces of the image
408 411 build_image_solaris
409 412 }
410 413
411 414 # Builds the x86 solaris 10 pieces of the image
412 415 # build_image_x86_10()
413 416 build_image_x86_10() {
414 417 # Build the solaris pieces of the image
415 418 build_image_solaris
416 419 }
417 420
418 421 # Builds the sparc solaris 11 pieces of the image
419 422 # build_image_sparc_11()
420 423 build_image_sparc_11() {
421 424 # Build the solaris pieces of the image
422 425 build_image_solaris
423 426 }
424 427
425 428 # Builds the x86 solaris 11 pieces of the image
426 429 # build_image_x86_11()
427 430 build_image_x86_11() {
428 431 # Build the solaris pieces of the image
429 432 build_image_solaris
430 433 }
|
↓ open down ↓ |
98 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX