Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- /workspace/neilga/ohacds-xvm/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_BUILD=$([ ! -d "${WS}/usr/closed" ] && echo "#")
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_IDS=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=$(eval ${CLOSED_BUILD} echo 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=$(eval ${CLOSED_BUILD} echo 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_AGFA_IMPAX} \
230 232 ${PACKAGES_APACHE} \
231 233 ${PACKAGES_APACHE_TC} \
232 234 ${PACKAGES_DHC} \
233 235 ${PACKAGES_DNS} \
234 236 ${PACKAGES_EBS} \
235 237 ${PACKAGES_HADB} \
236 238 ${PACKAGES_IDS} \
237 239 ${PACKAGES_KERBEROS} \
238 240 ${PACKAGES_LIVECACHE} \
239 241 ${PACKAGES_MQI} \
240 242 ${PACKAGES_MQS} \
241 243 ${PACKAGES_MYS} \
242 244 ${PACKAGES_N1G_SPS} \
243 245 ${PACKAGES_NFS} \
244 246 ${PACKAGES_ORACLE} \
245 247 ${PACKAGES_ORACLE_9IAS} \
246 248 ${PACKAGES_POSTGRESQL} \
247 249 ${PACKAGES_S1AS} \
248 250 ${PACKAGES_S1MQ} \
249 251 ${PACKAGES_S1WS} \
250 252 ${PACKAGES_SAA} \
251 253 ${PACKAGES_SAP} \
252 254 ${PACKAGES_SAPDB} \
253 255 ${PACKAGES_SAPWEBAS} \
254 256 ${PACKAGES_SIEBEL} \
255 257 ${PACKAGES_SMB} \
256 258 ${PACKAGES_SOLARIS_ZONES} \
257 259 ${PACKAGES_SUN_GRID_ENG} \
258 260 ${PACKAGES_SWIFT_GWAY} \
259 261 ${PACKAGES_SYBASE} \
260 262 ${PACKAGES_WLS}"
261 263
262 264 # Support for S11 is unknown at this time, so include all agents
263 265 sparc_11_AGENTS="\
264 266 ${PACKAGES_AGFA_IMPAX} \
265 267 ${PACKAGES_APACHE} \
266 268 ${PACKAGES_APACHE_TC} \
267 269 ${PACKAGES_DHC} \
268 270 ${PACKAGES_DNS} \
269 271 ${PACKAGES_EBS} \
270 272 ${PACKAGES_HADB} \
271 273 ${PACKAGES_IDS} \
272 274 ${PACKAGES_KERBEROS} \
273 275 ${PACKAGES_L10N} \
274 276 ${PACKAGES_LIVECACHE} \
275 277 ${PACKAGES_MQI} \
276 278 ${PACKAGES_MQS} \
277 279 ${PACKAGES_MYS} \
278 280 ${PACKAGES_N1G_SPS} \
279 281 ${PACKAGES_NFS} \
280 282 ${PACKAGES_ORACLE} \
281 283 ${PACKAGES_ORACLE_9IAS} \
282 284 ${PACKAGES_POSTGRESQL} \
283 285 ${PACKAGES_S1AS} \
284 286 ${PACKAGES_S1MQ} \
285 287 ${PACKAGES_S1WS} \
286 288 ${PACKAGES_SAA} \
287 289 ${PACKAGES_SAP} \
288 290 ${PACKAGES_SAPDB} \
289 291 ${PACKAGES_SAPWEBAS} \
290 292 ${PACKAGES_SIEBEL} \
291 293 ${PACKAGES_SMB} \
292 294 ${PACKAGES_SOLARIS_ZONES} \
293 295 ${PACKAGES_SUN_GRID_ENG} \
294 296 ${PACKAGES_SWIFT_GWAY} \
295 297 ${PACKAGES_SYBASE} \
296 298 ${PACKAGES_WLS}"
297 299
298 300 i386_10_AGENTS="\
299 301 ${PACKAGES_APACHE} \
300 302 ${PACKAGES_APACHE_TC} \
301 303 ${PACKAGES_DHC} \
302 304 ${PACKAGES_DNS} \
303 305 ${PACKAGES_HADB} \
304 306 ${PACKAGES_IDS} \
305 307 ${PACKAGES_KERBEROS} \
306 308 ${PACKAGES_LIVECACHE} \
307 309 ${PACKAGES_MQI} \
308 310 ${PACKAGES_MQS} \
309 311 ${PACKAGES_MYS} \
310 312 ${PACKAGES_N1G_SPS} \
311 313 ${PACKAGES_NFS} \
312 314 ${PACKAGES_ORACLE} \
313 315 ${PACKAGES_ORACLE_9IAS} \
314 316 ${PACKAGES_POSTGRESQL} \
315 317 ${PACKAGES_S1AS} \
316 318 ${PACKAGES_S1MQ} \
|
↓ open down ↓ |
111 lines elided |
↑ open up ↑ |
317 319 ${PACKAGES_S1WS} \
318 320 ${PACKAGES_SAP} \
319 321 ${PACKAGES_SAPDB} \
320 322 ${PACKAGES_SAPWEBAS} \
321 323 ${PACKAGES_SMB} \
322 324 ${PACKAGES_SOLARIS_ZONES} \
323 325 ${PACKAGES_SUN_GRID_ENG} \
324 326 ${PACKAGES_SYBASE} \
325 327 ${PACKAGES_WLS}"
326 328
327 -i386_11_AGENTS=${sparc_11_AGENTS}
329 +i386_11_AGENTS="\
330 + ${sparc_11_AGENTS} \
331 + ${PACKAGES_XVM}"
328 332
329 333 AGENTS=$(eval echo \${${MACH}_${OS}_AGENTS})
330 334
331 335 #
332 336 # Functions
333 337 #
334 338 # Builds the external pieces of the image
335 339 # build_image_external()
336 340 build_image_external() {
337 341 # Check if this piece of the image has already been built
338 342 [ -e "${DVD}/.cdtoc" ] && return
339 343
340 344 echo "Adding the external pieces to the image"
341 345
342 346 # Create directories
343 347 ${MKDIR} ${DVD} || error "Can't create directory ${DVD}"
344 348
345 349 # Add dvdimage of symlinks to external products
346 350 (cd ${DVDIMAGE_DIR} && ${FIND} . -print | ${CPIO} -oc) | (cd ${DVD} &&
347 351 ${CPIO} -icdum)
348 352 }
349 353
350 354 # Builds the common pieces of the image
351 355 # build_image_common()
352 356 build_image_common() {
353 357 # Check if this piece of the image has already been built
354 358 [ -f "${AGENTS_DIR}/.producttoc" -a ! -h "${AGENTS_DIR}/.producttoc" ] && return
355 359
356 360 # Build the external pieces of the image
357 361 build_image_external
358 362
359 363 echo "Adding the common ${MACH} pieces to the image"
360 364
361 365 # Create directories
362 366 ${MKDIR} ${AGENTS_DIR} || error "Can't create directory ${AGENTS_DIR}"
363 367
364 368 # Add .producttoc to top level directory
365 369 copy ${PKGDEFS_DIR}/dot.producttoc.sun_cluster_agents.${MACH} ${AGENTS_DIR}/.producttoc
366 370 }
367 371
368 372 # Builds the solaris pieces of the image
369 373 # build_image_solaris()
370 374 build_image_solaris() {
371 375 # Check if this piece of the image has already been built
372 376 [ -f "${AGENTS_DIR}/${SOL}/Packages/.clustertoc" -a ! -h "${AGENTS_DIR}/${SOL}/Packages/.clustertoc" ] && return
373 377
374 378 # Build the common pieces of the image
375 379 build_image_common
376 380
377 381 echo "Adding the ${SOL} ${MACH} pieces to the image"
378 382
379 383 # Create directories
380 384 ${MKDIR} ${AGENTS_DIR}/${SOL}
381 385 ${MKDIR} ${AGENTS_DIR}/${SOL}/Packages
382 386
383 387 # Add .clustertoc to agents Packages directory
384 388 copy ${PKGDEFS_DIR}/dot.clustertoc ${AGENTS_DIR}/${SOL}/Packages/.clustertoc
385 389
386 390 # Add .order to agents Packages directory
387 391 copy ${PKGDEFS_DIR}/dot.order ${AGENTS_DIR}/${SOL}/Packages/.order
388 392
389 393 # Copy packages from package archive to agents Packages directory
390 394 [ -d "${PKGARCH}" ] || error "Package archive not found"
391 395
392 396 for pkg in ${AGENTS}
393 397 do
394 398 [ -h "${AGENTS_DIR}/${SOL}/Packages/${pkg}" ] && ${RM} ${AGENTS_DIR}/${SOL}/Packages/${pkg}
395 399 done
396 400
397 401 ${PKGTRANS} ${PKGARCH} ${AGENTS_DIR}/${SOL}/Packages ${AGENTS} || error "pkgtrans to ${AGENTS_DIR}/${SOL}/Packages failed"
398 402 }
399 403
400 404 # Builds the sparc solaris 9 pieces of the image
401 405 # build_image_sparc_9()
402 406 build_image_sparc_9() {
403 407 # Build the solaris pieces of the image
404 408 build_image_solaris
405 409 }
406 410
407 411 # Builds the sparc solaris 10 pieces of the image
408 412 # build_image_sparc_10()
409 413 build_image_sparc_10() {
410 414 # Build the solaris pieces of the image
411 415 build_image_solaris
412 416 }
413 417
414 418 # Builds the x86 solaris 10 pieces of the image
415 419 # build_image_x86_10()
416 420 build_image_x86_10() {
417 421 # Build the solaris pieces of the image
418 422 build_image_solaris
419 423 }
420 424
421 425 # Builds the sparc solaris 11 pieces of the image
422 426 # build_image_sparc_11()
423 427 build_image_sparc_11() {
424 428 # Build the solaris pieces of the image
425 429 build_image_solaris
426 430 }
427 431
428 432 # Builds the x86 solaris 11 pieces of the image
429 433 # build_image_x86_11()
430 434 build_image_x86_11() {
431 435 # Build the solaris pieces of the image
432 436 build_image_solaris
433 437 }
|
↓ open down ↓ |
96 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX