6440 Build 106 installer fails to start in 512 MB environment
7975 LiveCD still has old branding - desktop background - in B111
--- a/.hgignore Tue Apr 14 18:16:13 2009 +0100
+++ b/.hgignore Tue Apr 14 15:57:23 2009 -0400
@@ -1,5 +1,6 @@
# Ignore compiled byte code, lint output, object files, shared objects,
-# VIM swap files, the entire proto area, packages, and webrevs
+# VIM swap files, the entire proto area, packages, webrevs, nightly logs,
+# generated packaging files, and static libraries
\.pyc
\.ln
\.o
@@ -11,3 +12,6 @@
^packages
^webrev
^log
+pkgdefs.*/copyright
+pkgdefs.*/pkginfo
+usr/src/lib/.*\.a
--- a/usr/src/cmd/distro_const/DC_defs.py Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/DC_defs.py Tue Apr 14 15:57:23 2009 -0400
@@ -118,10 +118,10 @@
# Path to the DC-manifest.rng and DC-manifest.defval.xml file.
# This is NOT the manifest user provides to building their images.
#
-DC_MANIFEST_DATA="/usr/share/distro_const/DC-manifest"
+DC_MANIFEST_DATA = "/usr/share/distro_const/DC-manifest"
-FINALIZER_ROLLBACK_SCRIPT="/usr/share/distro_const/finalizer_rollback.py"
-FINALIZER_CHECKPOINT_SCRIPT="/usr/share/distro_const/finalizer_checkpoint.py"
+FINALIZER_ROLLBACK_SCRIPT = "/usr/share/distro_const/finalizer_rollback.py"
+FINALIZER_CHECKPOINT_SCRIPT = "/usr/share/distro_const/finalizer_checkpoint.py"
#
# Build area directory structure definitions. We will create
@@ -138,8 +138,15 @@
LOGS = "/logs"
# boot root definitions
-BR_FILENAME = "/boot/boot_archive"
-DC_LOGGER_NAME="dc_logger"
+BR_NAME_SPARC = "boot_archive"
+BR_NAME_I386 = "x86.microroot"
+BR_BASEPATH = "/boot"
+BR_FILENAME_SPARC = BR_BASEPATH + "/" + BR_NAME_SPARC
+BR_FILENAME_X86 = BR_BASEPATH + "/" + BR_NAME_I386
+BR_FILENAME_AMD64 = BR_BASEPATH + "/amd64/" + BR_NAME_I386
+BR_FILENAME_ALL = BR_FILENAME_X86
+
+DC_LOGGER_NAME = "dc_logger"
# Name of the file containing info about the images.
# This file will live in the "root" of the image.
--- a/usr/src/cmd/distro_const/auto_install/ai_sparc_image.xml Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/auto_install/ai_sparc_image.xml Tue Apr 14 15:57:23 2009 -0400
@@ -498,6 +498,7 @@
<checkpoint
name="br-arch"
message="Boot root archiving"/>
+ <argslist>"sparc"</argslist>
</script>
<script name="/usr/share/distro_const/auto_install/ai_post_bootroot_pkg_image_mod">
<checkpoint
--- a/usr/src/cmd/distro_const/auto_install/ai_x86_image.xml Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/auto_install/ai_x86_image.xml Tue Apr 14 15:57:23 2009 -0400
@@ -530,6 +530,7 @@
<checkpoint
name="br-arch"
message="Boot root archiving"/>
+ <argslist>"all"</argslist>
</script>
<script name="/usr/share/distro_const/auto_install/ai_post_bootroot_pkg_image_mod">
<checkpoint
--- a/usr/src/cmd/distro_const/slim_cd/all_lang_slim_cd_x86.xml Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/slim_cd/all_lang_slim_cd_x86.xml Tue Apr 14 15:57:23 2009 -0400
@@ -189,17 +189,17 @@
<entry>
<title_suffix>with magnifier</title_suffix>
<line>kernel$ /platform/i86pc/kernel/$ISADIR/unix -B assistive_tech=magnifier</line>
- <line>module /boot/boot_archive</line>
+ <line>module /boot/$ISADIR/x86.microroot</line>
</entry>
<entry>
<title_suffix>with screen reader</title_suffix>
<line>kernel$ /platform/i86pc/kernel/$ISADIR/unix -B assistive_tech=reader</line>
- <line>module /boot/boot_archive</line>
+ <line>module /boot/$ISADIR/x86.microroot</line>
</entry>
<entry>
<title_suffix>Enable SSH</title_suffix>
<line>kernel$ /platform/i86pc/kernel/$ISADIR/unix -B livessh=enable</line>
- <line>module /boot/boot_archive</line>
+ <line>module /boot/$ISADIR/x86.microroot</line>
</entry>
</grub_menu_modifications>
<!--
@@ -349,7 +349,14 @@
<script name="/usr/share/distro_const/bootroot_archive.py">
<checkpoint
name="br-arch"
- message="Boot root archiving"/>
+ message="Boot root archiving (64-bit)"/>
+ <argslist>"amd64"</argslist>
+ </script>
+ <script name="/usr/share/distro_const/bootroot_archive_32.py">
+ <checkpoint
+ name="br-arch-32"
+ message="Boot root archiving (32-bit)"/>
+ <argslist>"x86"</argslist>
</script>
<script name="/usr/share/distro_const/slim_cd/slimcd_post_bootroot_pkg_image_mod">
<checkpoint
--- a/usr/src/cmd/distro_const/slim_cd/slim_cd_x86.xml Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/slim_cd/slim_cd_x86.xml Tue Apr 14 15:57:23 2009 -0400
@@ -184,17 +184,17 @@
<entry>
<title_suffix>with magnifier</title_suffix>
<line>kernel$ /platform/i86pc/kernel/$ISADIR/unix -B assistive_tech=magnifier</line>
- <line>module /boot/boot_archive</line>
+ <line>module /boot/$ISADIR/x86.microroot</line>
</entry>
<entry>
<title_suffix>with screen reader</title_suffix>
<line>kernel$ /platform/i86pc/kernel/$ISADIR/unix -B assistive_tech=reader</line>
- <line>module /boot/boot_archive</line>
+ <line>module /boot/$ISADIR/x86.microroot</line>
</entry>
<entry>
<title_suffix>Enable SSH</title_suffix>
<line>kernel$ /platform/i86pc/kernel/$ISADIR/unix -B livessh=enable</line>
- <line>module /boot/boot_archive</line>
+ <line>module /boot/$ISADIR/x86.microroot</line>
</entry>
</grub_menu_modifications>
<!--
@@ -344,7 +344,14 @@
<script name="/usr/share/distro_const/bootroot_archive.py">
<checkpoint
name="br-arch"
- message="Boot root archiving"/>
+ message="Boot root archiving (64-bit)"/>
+ <argslist>"amd64"</argslist>
+ </script>
+ <script name="/usr/share/distro_const/bootroot_archive_32.py">
+ <checkpoint
+ name="br-arch-32"
+ message="Boot root archiving (32-bit)"/>
+ <argslist>"x86"</argslist>
</script>
<script name="/usr/share/distro_const/slim_cd/slimcd_post_bootroot_pkg_image_mod">
<checkpoint
--- a/usr/src/cmd/distro_const/slim_cd/slimcd_gen_cd_content Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/slim_cd/slimcd_gen_cd_content Tue Apr 14 15:57:23 2009 -0400
@@ -84,6 +84,7 @@
IMG_CONTENT_FILE=".livecd-cdrom-content"
IMG_INFO_FILE=".image_info"
+BOOT_ARCHIVE_BASE="x86.microroot"
#
# The package image area is the "root" of the live CD
@@ -95,7 +96,9 @@
fi
${FIND} . ! \( -name '*.zlib' -o -name ${IMG_INFO_FILE} \
- -o -name ${IMG_CONTENT_FILE} \) -print > ${IMG_CONTENT_FILE}
+ -o -name ${IMG_CONTENT_FILE} -o -name ${BOOT_ARCHIVE_BASE} \) -print \
+ > ${IMG_CONTENT_FILE}
+
if [ "$?" != "0" ] ; then
print -u2 "$0: there's an error generating the image content list."
exit 1
--- a/usr/src/cmd/distro_const/slim_cd/slimcd_generic_live.xml Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/slim_cd/slimcd_generic_live.xml Tue Apr 14 15:57:23 2009 -0400
@@ -20,7 +20,7 @@
CDDL HEADER END
- Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ Copyright 2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Service profile customized for Live DVD usage.
@@ -134,7 +134,7 @@
<service name='network/rpc/keyserv' version='1' type='service'>
<instance name='default' enabled='false'/>
</service>
- <service name='network/routing/ndp' version='1' type='service'>
+ <service name='network/sendmail-client' version='1' type='service'>
<instance name='default' enabled='false'/>
</service>
<service name='network/shares/group' version='1' type='service'>
--- a/usr/src/cmd/distro_const/slim_cd/slimcd_pre_bootroot_pkg_image_mod Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/slim_cd/slimcd_pre_bootroot_pkg_image_mod Tue Apr 14 15:57:23 2009 -0400
@@ -21,7 +21,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -127,16 +127,6 @@
${PKG_IMG_PATH}/etc/gconf/schemas/panel-default-setup.entries
$RM ${TMP_DIR}/panel-default-setup.entries
-# Reconfigure nautilus to use smaller, live CD-specific background, saves memory
-$CP -p ${PKG_IMG_PATH}/etc/gconf/schemas/desktop_gnome_background.schemas \
- ${SAVE_PATH}/etc/gconf/schemas
-$SED -e '/.*opensolaris-default.jpg.*/s:opensolaris-default:opensolaris-livecd:' \
- ${PKG_IMG_PATH}/etc/gconf/schemas/desktop_gnome_background.schemas \
- > ${TMP_DIR}/desktop_gnome_background.schemas
-$CP ${TMP_DIR}/desktop_gnome_background.schemas \
- ${PKG_IMG_PATH}/etc/gconf/schemas/desktop_gnome_background.schemas
-$RM ${TMP_DIR}/desktop_gnome_background.schemas
-
# Modify /etc/system to make ZFS less mem hungry
$MKDIR -p ${SAVE_PATH}/etc
$CP -p ${PKG_IMG_PATH}/etc/system ${SAVE_PATH}/etc
@@ -193,9 +183,8 @@
# By giving the saved copy of panel-default-setup.entries a later
# timestamp than the global gconf cache we'll end up enabling the
# applet on first reboot when the desktop-cache/gconf-cache service
-# starts. Similarly for the desktop background.
+# starts.
$TOUCH ${SAVE_PATH}/etc/gconf/schemas/panel-default-setup.entries
-$TOUCH ${SAVE_PATH}/etc/gconf/schemas/desktop_gnome_background.schemas
#Remove the temp /dev/null
$RM ${PKG_IMG_PATH}/dev/null
--- a/usr/src/cmd/distro_const/utils/Makefile Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/utils/Makefile Tue Apr 14 15:57:23 2009 -0400
@@ -20,7 +20,7 @@
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -41,9 +41,9 @@
create_iso \
create_usb \
bootroot_configure \
+ bootroot_strip \
pre_bootroot_pkg_image_mod \
post_bootroot_pkg_image_mod \
- bootroot_configure \
$(PYMODULES)
# Note: PYCMODULES are not delivered.
--- a/usr/src/cmd/distro_const/utils/bootroot_archive.py Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/utils/bootroot_archive.py Tue Apr 14 15:57:23 2009 -0400
@@ -45,7 +45,10 @@
from osol_install.distro_const.DC_defs import BOOT_ROOT_COMPRESSION_LEVEL
from osol_install.distro_const.DC_defs import BOOT_ROOT_COMPRESSION_TYPE
from osol_install.distro_const.DC_defs import BOOT_ROOT_SIZE_PAD
-from osol_install.distro_const.DC_defs import BR_FILENAME
+from osol_install.distro_const.DC_defs import BR_FILENAME_SPARC
+from osol_install.distro_const.DC_defs import BR_FILENAME_X86
+from osol_install.distro_const.DC_defs import BR_FILENAME_AMD64
+from osol_install.distro_const.DC_defs import BR_FILENAME_ALL
from osol_install.distro_const.DC_defs import \
BOOT_ROOT_CONTENTS_BASE_INCLUDE_NOCOMPRESS
@@ -226,27 +229,46 @@
TMP_DIR: Temporary directory to contain the bootroot file
- BR_BUILD: Area where bootroot is put together.
+ BR_MASTER: Area where bootroot is put together.
MEDIA_DIR: Area where the media is put. (Not used)
+
+ KERNEL_ARCH: Machine type for archive
"""
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-if (len(sys.argv) != 6): # Don't forget sys.argv[0] is the script itself.
- raise Exception, (sys.argv[0] + ": Requires 5 args:\n" +
+if (len(sys.argv) != 7): # Don't forget sys.argv[0] is the script itself.
+ raise Exception, (sys.argv[0] + ": Requires 6 args:\n" +
" Reader socket, pkg_image area, tmp dir,\n"
- " bootroot build area, media area.")
+ " bootroot build area, media area, machine type")
# Collect input arguments from what this script sees as a commandline.
MFEST_SOCKET = sys.argv[1] # Manifest reader socket
PKG_IMG_MNT_PT = sys.argv[2] # package image area mountpoint
TMP_DIR = sys.argv[3] # temporary directory to contain bootroot file
-BR_BUILD = sys.argv[4] # Bootroot build area
+BR_MASTER = sys.argv[4] # Bootroot build area
+KERNEL_ARCH = sys.argv[6] # Machine type for this archive
+
+# Destination and name of bootroot file depends on platform and machine type
+is_sparc = False
-# Destination and name of bootroot file.
-is_sparc = (platform.platform().find('sparc') >= 0)
-
-BR_ARCHFILE = PKG_IMG_MNT_PT + BR_FILENAME
+if (KERNEL_ARCH == "sparc"):
+ BR_ARCHFILE = PKG_IMG_MNT_PT + BR_FILENAME_SPARC
+ BR_BUILD = BR_MASTER
+ strip_archive = False
+ is_sparc = True
+elif (KERNEL_ARCH == "x86"):
+ BR_ARCHFILE = PKG_IMG_MNT_PT + BR_FILENAME_X86
+ BR_BUILD = TMP_DIR + "/" + KERNEL_ARCH
+ strip_archive = True
+elif (KERNEL_ARCH == "amd64"):
+ BR_ARCHFILE = PKG_IMG_MNT_PT + BR_FILENAME_AMD64
+ BR_BUILD = TMP_DIR + "/" + KERNEL_ARCH
+ strip_archive = True
+else:
+ BR_ARCHFILE = PKG_IMG_MNT_PT + BR_FILENAME_ALL
+ BR_BUILD = BR_MASTER
+ strip_archive = False
# Location of the lofi file mountpoint, known only to this file.
BR_LOFI_MNT_PT = TMP_DIR + "/br_lofimnt"
@@ -285,17 +307,34 @@
os.remove(gz_arch_file)
if (os.path.exists(BR_ARCHFILE)):
os.remove(BR_ARCHFILE)
+if not (os.path.exists(os.path.dirname(BR_ARCHFILE))):
+ os.mkdir(os.path.dirname(BR_ARCHFILE))
+
+# If creating a single-architecture archive, copy full contents to temporary
+# area and strip unused architecture
+if strip_archive:
+ cmd = "/usr/share/distro_const/bootroot_strip "
+ cmd += BR_MASTER + " " + BR_BUILD + " " + KERNEL_ARCH
+ copy_status = os.system(cmd)
+ if (copy_status != 0):
+ raise Exception, (sys.argv[0] + ": Unable to strip bootroot: " +
+ os.strerror(copy_status >> 8))
print "Sizing bootroot requirements..."
# dir_size() returns size in bytes, need to convert to KB
bootroot_size = (dir_size(BR_BUILD)) / 1024
print " Raw uncompressed: %d MB." % (bootroot_size / 1024)
-# Add 10% to the reported size for overhead, and add padding size,
-# if specified. Padding size need to be converted to KB
-# Also need to make sure that the resulting size is an integer after
-# all the calculations
-bootroot_size = int(round(((bootroot_size * 1.1) + (padding * 1024)), 0))
+# Add 10% to the reported size for overhead (20% for smaller archives),
+# and add padding size, if specified. Padding size needs to be converted to KB.
+# Also need to make sure that the resulting size is an integer
+if (bootroot_size < 150000):
+ overhead = 1.2
+else:
+ overhead = 1.1
+
+bootroot_size = int(round((bootroot_size * overhead) + (padding * 1024)))
+
print "Creating bootroot archive with padded size of %d MB..." % (
(bootroot_size / 1024))
@@ -349,7 +388,7 @@
# Install the boot blocks. This only is done on a sparc image.
cmd = PKG_IMG_MNT_PT + LOFIADM + " " + PKG_IMG_MNT_PT + \
- BR_FILENAME + " | " + PKG_IMG_MNT_PT + SED + " s/lofi/rlofi/"
+ BR_FILENAME_SPARC + " | " + PKG_IMG_MNT_PT + SED + " s/lofi/rlofi/"
try:
phys_dev = Popen(cmd, shell=True,
stdout=PIPE).communicate()[0]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/distro_const/utils/bootroot_strip Tue Apr 14 15:57:23 2009 -0400
@@ -0,0 +1,86 @@
+#!/usr/bin/ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Main
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Strip a full x86/amd64 root archive into the machine-specific portion.
+#
+# Args:
+# MASTER_DIR: Area already populated with complete root contents
+#
+# BR_BUILD: Area where machine-specific archive is put together.
+#
+# KERNEL_ARCH: Architecture for which this image should be configured
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Verify argument count
+if [ $# != 3 ] ; then
+ print -u2 "$0: Requires 3 args: master root image, bootroot build area, kernel architecture"
+ exit 1
+fi
+
+MASTER_DIR=$1
+BR_BUILD=$2
+KERNEL_ARCH=$3
+
+# Define a few commands.
+CD=cd # Built into the shell
+CPIO=/usr/bin/cpio
+FIND=/usr/bin/find
+GREP=/usr/xpg4/bin/grep
+MKDIR=/usr/bin/mkdir
+RM=/usr/bin/rm
+XARGS=/usr/bin/xargs
+
+if [ ! -d ${BR_BUILD} ] ; then
+ ${MKDIR} ${BR_BUILD}
+fi
+
+
+# Start by duplicating entire master tree into build tree
+print "Duplicating ${MASTER_DIR} to ${BR_BUILD}"
+${CD} ${MASTER_DIR}
+${FIND} . | ${CPIO} -pmud ${BR_BUILD}
+
+${CD} ${BR_BUILD}
+
+# Basic idea here is that an x86 arch means we remove anything that's amd64
+# from /kernel, /platform, and /lib. Conversely, on amd64, we remove anything
+# from /kernel and /platform that's not a .conf file or in an amd64 directory
+
+if [ ${KERNEL_ARCH} == "x86" ]; then
+ print "Stripping amd64 components"
+ ${FIND} kernel platform lib -name amd64 | ${XARGS} ${RM} -rf
+elif [ ${KERNEL_ARCH} == "amd64" ]; then
+ print "Stripping i386 components"
+ ${FIND} kernel platform -type f -print | ${GREP} -v conf$ |
+ ${GREP} -v /amd64/ | ${XARGS} ${RM} -f
+else
+ print -u2 "$0: ${KERNEL_ARCH} is not a supported architecture"
+ exit 1
+fi
+
+exit 0
--- a/usr/src/cmd/distro_const/utils/grub_setup.py Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/distro_const/utils/grub_setup.py Tue Apr 14 15:57:23 2009 -0400
@@ -166,19 +166,19 @@
entry = []
entry.append("title " + release)
entry.append("\tkernel$ /platform/i86pc/kernel/$ISADIR/unix")
-entry.append("\tmodule /boot/boot_archive")
+entry.append("\tmodule$ /boot/$ISADIR/x86.microroot")
entries.append(entry)
entry = []
entry.append("title " + release + " VESA driver")
entry.append("\tkernel$ /platform/i86pc/kernel/$ISADIR/unix -B livemode=vesa")
-entry.append("\tmodule /boot/boot_archive")
+entry.append("\tmodule$ /boot/$ISADIR/x86.microroot")
entries.append(entry)
entry = []
entry.append("title " + release + " text console")
entry.append("\tkernel$ /platform/i86pc/kernel/$ISADIR/unix -B livemode=text")
-entry.append("\tmodule /boot/boot_archive")
+entry.append("\tmodule$ /boot/$ISADIR/x86.microroot")
entries.append(entry)
entry = []
--- a/usr/src/cmd/slim-install/Makefile Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/cmd/slim-install/Makefile Tue Apr 14 15:57:23 2009 -0400
@@ -19,13 +19,13 @@
# CDDL HEADER END
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
include $(SRC)/Makefile.master
-SUBDIRS= backdrop config finish license listusb listcd svc trace user/jack
+SUBDIRS= config finish license listusb listcd svc trace user/jack
.PARALLEL:
--- a/usr/src/cmd/slim-install/backdrop/Makefile Tue Apr 14 18:16:13 2009 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-#
-
-FILES= opensolaris-livecd.jpg
-
-include $(SRC)/cmd/Makefile.cmd
-
-FILEMODE= 444
-
-ROOTBACKDROPDIR= $(ROOT)/usr/share/pixmaps/backgrounds/opensolaris
-
-ROOTBACKDROPFILES= $(FILES:%=$(ROOTBACKDROPDIR)/%)
-
-all:
-
-install: all $(ROOTBACKDROPDIR) $(ROOTBACKDROPFILES)
-
-clobber clean:
-
-include $(SRC)/cmd/Makefile.targ
-
-$(ROOTBACKDROPDIR):
- $(INS.dir)
-
-$(ROOTBACKDROPDIR)/%: %
- $(INS.file)
-
Binary file usr/src/cmd/slim-install/backdrop/opensolaris-livecd.jpg has changed
--- a/usr/src/lib/libict_pymod/ict.py Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/lib/libict_pymod/ict.py Tue Apr 14 15:57:23 2009 -0400
@@ -1910,7 +1910,6 @@
# Cleanup the files and directories that were copied into
# the BASEDIR directory that are not needed by the installed OS.
file_cleanup_list = [
- "/boot/boot_archive",
"/.livecd",
"/.volumeid",
"/boot/grub/menu.lst",
--- a/usr/src/lib/liborchestrator/orchestrator_private.h Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/lib/liborchestrator/orchestrator_private.h Tue Apr 14 15:57:23 2009 -0400
@@ -180,6 +180,9 @@
/* If following file exists, we are in Automated Installer environment */
#define AUTOMATED_INSTALLER_MARK "/.autoinstall"
+/* Path to live CD root archive */
+#define ARCHIVE_PATH "/.cdrom/boot/%s/x86.microroot"
+
/*
* Debugging levels
*/
--- a/usr/src/lib/liborchestrator/perform_slim_install.c Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/lib/liborchestrator/perform_slim_install.c Tue Apr 14 15:57:23 2009 -0400
@@ -42,6 +42,7 @@
#include <netdb.h>
#include <locale.h>
#include <wait.h>
+#include <sys/systeminfo.h>
#include "td_lib.h"
#include "cl_database_parms.h"
@@ -1315,6 +1316,7 @@
int transfer_mode = OM_CPIO_TRANSFER;
int value;
void *exit_val;
+ char buf[20], arc[MAXPATHLEN];
(void) pthread_join(ti_thread, &exit_val);
@@ -1433,6 +1435,31 @@
} else {
om_log_print("CPIO transfer mechanism selected\n");
+ /*
+ * Add mounting the root archive that we're not booted from
+ * into the transfer tasks; do it there so that progress
+ * reporting can remain reasonably accurate.
+ */
+ if (sysinfo(SI_ARCHITECTURE_64, buf, sizeof (buf) == -1)) {
+ /* 32-bit, so we need to unpack 64-bit */
+ (void) snprintf(arc, sizeof (arc), ARCHIVE_PATH,
+ "amd64");
+ } else {
+ /* 64-bit, so we need to unpack 32-bit */
+ (void) snprintf(arc, sizeof (arc), ARCHIVE_PATH, "");
+ }
+ if (nvlist_add_string(*transfer_attr, TM_UNPACK_ARCHIVE, arc)
+ != 0) {
+ for (i = 0; i < transfer_attr_num; i++)
+ nvlist_free(transfer_attr[i]);
+ free(transfer_attr);
+
+ om_set_error(OM_NO_SPACE);
+ notify_error_status(OM_NO_SPACE);
+ status = -1;
+ pthread_exit((void *)&status);
+ }
+
status = TM_perform_transfer(*transfer_attr,
handle_TM_callback);
}
--- a/usr/src/lib/libtransfer/transfer_defs.py Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/lib/libtransfer/transfer_defs.py Tue Apr 14 15:57:23 2009 -0400
@@ -74,8 +74,8 @@
TM_IPS_REFRESH_CATALOG = tm_defines['TM_IPS_REFRESH_CATALOG'].strip('"')
TM_IPS_PROP_NAME = tm_defines['TM_IPS_PROP_NAME'].strip('"')
TM_IPS_PROP_VALUE = tm_defines['TM_IPS_PROP_VALUE'].strip('"')
-
TM_IPS_ALT_URL = tm_defines['TM_IPS_ALT_URL'].strip('"')
+TM_UNPACK_ARCHIVE = tm_defines['TM_UNPACK_ARCHIVE'].strip('"')
# The following is only useful for python code, not C code. So, it will
# only be defined here, instead of being defined in transfermod.h
--- a/usr/src/lib/libtransfer/transfer_mod.py Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/lib/libtransfer/transfer_mod.py Tue Apr 14 15:57:23 2009 -0400
@@ -35,6 +35,7 @@
import threading
import logging
import operator
+import tempfile
from stat import *
from subprocess import *
from osol_install.install_utils import *
@@ -55,7 +56,10 @@
PKG = "/usr/bin/pkg"
KBD_LAYOUT_FILE = "/usr/share/lib/keytables/type_6/kbd_layouts"
KBD_DEFAULTS_FILE = "etc/default/kbd"
-
+ MOUNT = "/usr/sbin/mount -o ro,nologging "
+ GZCAT = "/usr/bin/gzcat "
+ GZCAT_DST = "/var/run/boot_archive"
+
def __init__(self):
self.tm_lock = None
self.do_abort = 0
@@ -240,6 +244,7 @@
self.image_info = ""
self.distro_size = 0
self.log_handler = None
+ self.unpack_archive = None
# TODO: This is live media specific and shouldn't be part
# of transfer mod.
@@ -433,13 +438,13 @@
patt != None or
cp.clobber_files == 1 or cp.cpio_args != None or
cp.file_list != None):
- # create a file in the dst_mntpt area of
- # name flist<number> that will contain the
- # list of files to cpio
+ # create a temporary file that will
+ # contain the list of files to cpio
+ # temp files are /var/run/flist<number>
fent = Flist()
fent_list.append(fent)
old_cprefix = cp.chdir_prefix
- fent.name = self.dst_mntpt + "/flist" + str(i)
+ fent.name = "/var/run/flist" + str(i)
fent.open()
i = i + 1
self.dbg_msg(" File list tempfile:" +
@@ -618,8 +623,34 @@
os.unlink(self.dst_mntpt + "/" + line.rstrip())
skip_file.close()
+
+ def run_command(self, cmd):
+ try:
+ rt = call(cmd, shell=True)
+ if rt < 0:
+ raise TAbort("Command " + cmd +
+ " terminated with signal", -rt)
+ elif rt > 0:
+ raise TAbort("Command " + cmd + " failed", rt)
+ except OSError, e:
+ raise TAbort("Execution of " + cmd + " failed", e)
+ def mount_archive(self, mntdir):
+ self.run_command(TM_defs.GZCAT + self.unpack_archive + " > " +
+ TM_defs.GZCAT_DST)
+ self.run_command(TM_defs.MOUNT + TM_defs.GZCAT_DST + " " +
+ mntdir)
+
def cpio_transfer_entire_directory(self):
+ # If an unpack archive was specified, mount it first and
+ # prepend it to the list of prefixes in order to ensure its
+ # contents can be overlaid by contents from the running instance
+ if (self.unpack_archive != None):
+ mntdir = tempfile.mkdtemp(dir="/var/run")
+ self.mount_archive(mntdir)
+ self.cpio_prefixes.insert(0,
+ Cpio_spec(chdir_prefix=mntdir, cpio_dir="."))
+
fent_list = self.build_cpio_entire_file_list()
self.cpio_transfer_filelist(fent_list, TM_E_CPIO_ENTIRE_FAILED)
for fent in fent_list:
@@ -634,7 +665,7 @@
#
# Now process each entry in the list. cpio is executed with the
- # -V option where it prints a dot for each pathname processed.
+ # -V option so that it prints a dot for each pathname processed.
# This is needed to provide the ability to abort midway.
#
@@ -646,8 +677,7 @@
pmon.startmonitor(self.dst_mntpt, self.distro_size,
"Transferring Contents", params.percent, 95)
- # There may be more than 1 file with a list of files to
- # cpio. If so, cycle through them.
+ # Walk file lists, cpio'ing each in turn.
for fent in fent_list:
self.check_abort()
@@ -722,6 +752,8 @@
self.cpio_args = val
elif opt == TM_PYTHON_LOG_HANDLER:
self.log_handler = val
+ elif opt == TM_UNPACK_ARCHIVE:
+ self.unpack_archive = val
else:
raise TValueError("Invalid attribute " +
str(opt), TM_E_INVALID_TRANSFER_TYPE_ATTR)
--- a/usr/src/lib/libtransfer/transfermod.h Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/lib/libtransfer/transfermod.h Tue Apr 14 15:57:23 2009 -0400
@@ -69,6 +69,7 @@
#define TM_IPS_PROP_NAME "TM_IPS_PROP_NAME"
#define TM_IPS_PROP_VALUE "TM_IPS_PROP_VALUE"
#define TM_IPS_VERBOSE_MODE "TM_IPS_VERBOSE_MODE"
+#define TM_UNPACK_ARCHIVE "TM_UNPACK_ARCHIVE"
#define TM_PERFORM_CPIO 0
#define TM_PERFORM_IPS 1
--- a/usr/src/pkgdefs/SUNWdistro-const/prototype_com Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/pkgdefs/SUNWdistro-const/prototype_com Tue Apr 14 15:57:23 2009 -0400
@@ -88,37 +88,39 @@
d none usr/share/distro_const 0755 root bin
d none usr/share/distro_const/auto_install 0755 root bin
d none usr/share/distro_const/slim_cd 0755 root bin
-f none usr/share/distro_const/mkrepo 0555 root bin
-f none usr/share/distro_const/bootroot_initialize.py 0555 root bin
-f none usr/share/distro_const/bootroot_configure 0555 root bin
+f none usr/share/distro_const/auto_install/ai_bootroot_configure 0555 root bin
+f none usr/share/distro_const/auto_install/ai_generic_live.xml 0444 root sys
+f none usr/share/distro_const/auto_install/ai_post_bootroot_configure 0555 root bin
+f none usr/share/distro_const/auto_install/ai_post_bootroot_pkg_image_mod 0555 root bin
+f none usr/share/distro_const/auto_install/ai_pre_bootroot_pkg_image_mod 0555 root bin
+f none usr/share/distro_const/auto_install/ai_sparc_image.xml 0444 root sys
+f none usr/share/distro_const/auto_install/ai_x86_image.xml 0444 root sys
f none usr/share/distro_const/bootroot_archive.py 0555 root bin
-f none usr/share/distro_const/pre_bootroot_pkg_image_mod 0555 root bin
-f none usr/share/distro_const/post_bootroot_pkg_image_mod 0555 root bin
-f none usr/share/distro_const/grub_setup.py 0555 root bin
+s none usr/share/distro_const/bootroot_archive_32=bootroot_archive.py
+f none usr/share/distro_const/bootroot_configure 0555 root bin
+f none usr/share/distro_const/bootroot_initialize.py 0555 root bin
+f none usr/share/distro_const/bootroot_strip 0555 root bin
f none usr/share/distro_const/create_iso 0555 root bin
f none usr/share/distro_const/create_usb 0555 root bin
f none usr/share/distro_const/DC-manifest.defval.xml 0444 root sys
f none usr/share/distro_const/DC-manifest.rng 0444 root sys
f none usr/share/distro_const/finalizer_checkpoint.py 0555 root bin
f none usr/share/distro_const/finalizer_rollback.py 0555 root bin
-f none usr/share/distro_const/slim_cd/slimcd_generic_live.xml 0444 root sys
-f none usr/share/distro_const/slim_cd/slimcd_iso.sort 0444 root sys
-f none usr/share/distro_const/slim_cd/slim_cd_x86.xml 0444 root sys
+f none usr/share/distro_const/grub_setup.py 0555 root bin
+f none usr/share/distro_const/mkrepo 0555 root bin
+f none usr/share/distro_const/post_bootroot_pkg_image_mod 0555 root bin
+f none usr/share/distro_const/pre_bootroot_pkg_image_mod 0555 root bin
f none usr/share/distro_const/slim_cd/all_lang_slim_cd_x86.xml 0444 root sys
f none usr/share/distro_const/slim_cd/slimcd_bootroot_configure 0555 root bin
-f none usr/share/distro_const/slim_cd/slimcd_pre_bootroot_pkg_image_mod 0555 root bin
+f none usr/share/distro_const/slim_cd/slimcd_gen_cd_content 0555 root bin
+f none usr/share/distro_const/slim_cd/slimcd_generic_live.xml 0444 root sys
+f none usr/share/distro_const/slim_cd/slimcd_iso.sort 0444 root sys
f none usr/share/distro_const/slim_cd/slimcd_post_bootroot_pkg_image_mod 0555 root bin
-f none usr/share/distro_const/slim_cd/slimcd_gen_cd_content 0555 root bin
-f none usr/share/distro_const/auto_install/ai_generic_live.xml 0444 root sys
-f none usr/share/distro_const/auto_install/ai_x86_image.xml 0444 root sys
-f none usr/share/distro_const/auto_install/ai_sparc_image.xml 0444 root sys
-f none usr/share/distro_const/auto_install/ai_bootroot_configure 0555 root bin
-f none usr/share/distro_const/auto_install/ai_post_bootroot_configure 0555 root bin
-f none usr/share/distro_const/auto_install/ai_post_bootroot_pkg_image_mod 0555 root bin
-f none usr/share/distro_const/auto_install/ai_pre_bootroot_pkg_image_mod 0555 root bin
+f none usr/share/distro_const/slim_cd/slimcd_pre_bootroot_pkg_image_mod 0555 root bin
+f none usr/share/distro_const/slim_cd/slim_cd_x86.xml 0444 root sys
#
-# Distribution Constructor Documentations
+# Distribution Constructor Documentation
#
d none usr/share/doc 0755 root other
d none usr/share/doc/distro_const 0755 root bin
--- a/usr/src/pkgdefs/SUNWslim-utils/prototype_com Tue Apr 14 18:16:13 2009 +0100
+++ b/usr/src/pkgdefs/SUNWslim-utils/prototype_com Tue Apr 14 15:57:23 2009 -0400
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
@@ -39,10 +39,6 @@
f none usr/sbin/iotrace 755 root bin
f none usr/sbin/set_lang 555 root bin
d none usr/share 755 root sys
-d none usr/share/pixmaps 755 root other
-d none usr/share/pixmaps/backgrounds 755 root bin
-d none usr/share/pixmaps/backgrounds/opensolaris 755 root bin
-f none usr/share/pixmaps/backgrounds/opensolaris/opensolaris-livecd.jpg 644 root bin
d none sbin 755 root sys
f none sbin/listusb 555 root bin
f none sbin/listcd 555 root bin