summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorjmcp <James.McPherson@Sun.COM>2010-04-21 22:25:54 -0700
committerjmcp <James.McPherson@Sun.COM>2010-04-21 22:25:54 -0700
commitb83ec4ed825d984ca8f038544e15b4ca0eac82c7 (patch)
treea683d94cd41e75bb6b3a6ae2006bb13d1ae61ccc /usr/src
parent7c18cbb1c3de6cbb7674959dd3923911deaece51 (diff)
downloadillumos-gate-b83ec4ed825d984ca8f038544e15b4ca0eac82c7.tar.gz
6593513 make nightly -O cheaper
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/Makefile.master21
-rw-r--r--usr/src/lib/Makefile.lib10
-rw-r--r--usr/src/pkg/manifests/developer-build-onbld.mf6
-rw-r--r--usr/src/tools/install.bin/install.bin.c168
-rw-r--r--usr/src/tools/scripts/Makefile6
-rw-r--r--usr/src/tools/scripts/bfudrop.sh205
-rw-r--r--usr/src/tools/scripts/bindrop.sh36
-rw-r--r--usr/src/tools/scripts/bldenv.sh35
-rw-r--r--usr/src/tools/scripts/mktpl.pl15
-rw-r--r--usr/src/tools/scripts/nightly.123
-rw-r--r--usr/src/tools/scripts/nightly.sh218
-rw-r--r--usr/src/tools/scripts/onblddrop.sh93
-rw-r--r--usr/src/tools/scripts/sdrop.sh83
-rw-r--r--usr/src/uts/Makefile.uts8
14 files changed, 252 insertions, 675 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 8e00c4f366..c03b0ba574 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -20,8 +20,7 @@
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
# Makefile.master, global definitions for system source
@@ -90,6 +89,16 @@ INTEL_BLD= $(INTEL_BLD_1:i386=)
STRIP_COMMENTS= $(INTERNAL_RELEASE_BUILD)
+# Are we building tonic closedbins? Unless you have used the
+# -O flag to nightly or bldenv, leave the definition of TONICBUILD
+# as $(POUND_SIGN).
+#
+# IF YOU CHANGE CLOSEDROOT, you MUST change install.bin
+# to match the new definition.
+TONICBUILD= $(POUND_SIGN)
+$(TONICBUILD)CLOSEDROOT= $(ROOT)-closed
+
+
# set __GNUC= in the environment to build 32-bit with the gcc compiler.
# The default is to use the Sun Studio compiler for all processor types.
__GNUC= $(POUND_SIGN)
@@ -218,6 +227,12 @@ MANIFEST_CHECK= \
SVCCFG_CONFIGD_PATH=$(SRC)/cmd/svc/configd/svc.configd-native \
$(SRC)/cmd/svc/svccfg/svccfg-native validate $<
+#
+# IMPORTANT:: If you change any of INS.file, INS.dir, INS.rename,
+# INS.link or INS.symlink here, then you must also change the
+# corresponding override definitions in $CLOSED/Makefile.tonic.
+# If you do not do this, then the closedbins build for the OpenSolaris
+# community will break. PS, the gatekeepers will be upset too.
INS.file= $(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $<
INS.dir= $(INS) -s -d -m $(DIRMODE) $@
# installs and renames at once
@@ -227,6 +242,8 @@ INS.rename= $(INS.file); $(MV) $(@D)/$(<F) $@
# install a link
INSLINKTARGET= $<
INS.link= $(RM) $@; $(LN) $(INSLINKTARGET) $@
+INS.symlink= $(RM) $@; $(SYMLINK) $(INSLINKTARGET) $@
+
#
# Python bakes the mtime of the .py file into the compiled .pyc and
# rebuilds if the baked-in mtime != the mtime of the source file
diff --git a/usr/src/lib/Makefile.lib b/usr/src/lib/Makefile.lib
index d8f31410a8..6d244ae4b3 100644
--- a/usr/src/lib/Makefile.lib
+++ b/usr/src/lib/Makefile.lib
@@ -18,8 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
# Definitions common to libraries.
@@ -160,6 +159,13 @@ BUILD.SO= $(CC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
BUILDCCC.SO= $(CCC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
# default dynamic library symlink
+# IMPORTANT:: If you change INS.liblink OR INS.liblink64 here, then you
+# MUST also change the corresponding override definitions in
+# $CLOSED/Makefile.tonic.
+#
+# If you do not do this, then the closedbins build for the OpenSolaris
+# community will break. PS, the gatekeepers will be upset too.
+#
INS.liblink= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@
INS.liblinkccc= -$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKSCCC)$(VERS) $@
diff --git a/usr/src/pkg/manifests/developer-build-onbld.mf b/usr/src/pkg/manifests/developer-build-onbld.mf
index 9916d3e40d..cc54f9dbb8 100644
--- a/usr/src/pkg/manifests/developer-build-onbld.mf
+++ b/usr/src/pkg/manifests/developer-build-onbld.mf
@@ -20,8 +20,7 @@
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
set name=pkg.fmri value=pkg:/developer/build/onbld@$(PKGVERS)
@@ -86,7 +85,6 @@ $(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/tokenize mode=0555
$(sparc_ONLY)file path=opt/onbld/bin/$(ARCH)/tokenize.exe mode=0555
file path=opt/onbld/bin/Install mode=0555
file path=opt/onbld/bin/bfu mode=0555
-file path=opt/onbld/bin/bfudrop mode=0555
file path=opt/onbld/bin/bindrop mode=0555
file path=opt/onbld/bin/bldenv mode=0555
file path=opt/onbld/bin/bringovercheck mode=0555
@@ -122,7 +120,6 @@ file path=opt/onbld/bin/mkclosed mode=0555
file path=opt/onbld/bin/mkreadme_osol mode=0555
file path=opt/onbld/bin/mktpl mode=0555
file path=opt/onbld/bin/nightly mode=0555
-file path=opt/onbld/bin/onblddrop mode=0555
file path=opt/onbld/bin/onu mode=0555
file path=opt/onbld/bin/protocmp.terse mode=0555
file path=opt/onbld/bin/rtichk mode=0555
@@ -131,7 +128,6 @@ file path=opt/onbld/bin/sccscp mode=0555
file path=opt/onbld/bin/sccshist mode=0555
file path=opt/onbld/bin/sccsmv mode=0555
file path=opt/onbld/bin/sccsrm mode=0555
-file path=opt/onbld/bin/sdrop mode=0555
file path=opt/onbld/bin/signit mode=0555
file path=opt/onbld/bin/signproto mode=0555
file path=opt/onbld/bin/validate_flg mode=0555
diff --git a/usr/src/tools/install.bin/install.bin.c b/usr/src/tools/install.bin/install.bin.c
index 51ba5dbb95..dfae83f700 100644
--- a/usr/src/tools/install.bin/install.bin.c
+++ b/usr/src/tools/install.bin/install.bin.c
@@ -19,12 +19,9 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <stdio.h>
#include <stdlib.h>
@@ -43,14 +40,21 @@
#define FILE_BUFF 40960
-int supress = 0;
+static int suppress = 0;
+
+static void usage(void);
+static void file_copy(char *src_file, char *dest_file);
+static void chown_file(const char *file, const char *group, const char *owner);
+static void formclosed(char *root, char *closedroot);
+static char *find_basename(const char *str);
+static int creatdir(char *fn);
void
usage(void)
{
(void) fprintf(stderr,
- "usage: install [-sd][-m mode][-g group][-u owner] "
+ "usage: install [-sdO][-m mode][-g group][-u owner] "
"-f dir file ...\n");
}
@@ -63,29 +67,32 @@ file_copy(char *src_file, char *dest_file)
static char file_buff[FILE_BUFF];
if ((src_fd = open(src_file, O_RDONLY)) == -1) {
- perror(src_file);
+ (void) fprintf(stderr, "install:file_copy: %s failed "
+ "(%d): %s\n", src_file, errno, strerror(errno));
exit(1);
}
if ((dest_fd = open(dest_file, O_CREAT|O_WRONLY|O_TRUNC, 0755)) == -1) {
- perror(dest_file);
+ (void) fprintf(stderr, "install:file_copy: %s failed "
+ "(%d): %s\n", dest_file, errno, strerror(errno));
exit(1);
}
while ((count = read(src_fd, file_buff, FILE_BUFF)) > 0) {
- write(dest_fd, file_buff, count);
+ (void) write(dest_fd, file_buff, count);
}
if (count == -1) {
- perror("file_copy(read)");
+ (void) fprintf(stderr, "install:file_copy:read failed "
+ "(%d): %s\n", errno, strerror(errno));
exit(1);
}
- if (!supress)
+ if (!suppress)
(void) printf("%s installed as %s\n", src_file, dest_file);
- close(src_fd);
- close(dest_fd);
+ (void) close(src_fd);
+ (void) close(dest_fd);
}
@@ -111,11 +118,30 @@ chown_file(const char *file, const char *group, const char *owner)
}
if (chown(file, own, grp) == -1) {
- perror("chown");
+ (void) fprintf(stderr, "install:chown_file: failed "
+ "(%d): %s\n", errno, strerror(errno));
exit(1);
}
}
+
+void
+formclosed(char *root, char *closedroot)
+{
+ int wholelen, residlen;
+ char *temp;
+
+ wholelen = strlen(root);
+ temp = strstr(strstr(root, "proto/root_"), "/");
+ temp++;
+ temp = strstr(temp, "/");
+ residlen = strlen(temp);
+ (void) strlcpy(closedroot, root, wholelen - residlen + 1);
+ (void) strlcat(closedroot, "-closed", MAXPATHLEN);
+ (void) strlcat(closedroot, temp, MAXPATHLEN);
+}
+
+
char *
find_basename(const char *str)
{
@@ -130,6 +156,20 @@ find_basename(const char *str)
return ((char *)str);
}
+int
+creatdir(char *fn) {
+
+ errno = 0;
+
+ if (mkdirp(fn, 0755) == -1) {
+ if (errno != EEXIST)
+ return (errno);
+ } else if (!suppress) {
+ (void) printf("directory %s created\n", fn);
+ }
+ return (0);
+}
+
int
main(int argc, char **argv)
@@ -143,9 +183,12 @@ main(int argc, char **argv)
char *ins_file = NULL;
int mode = -1;
char dest_file[MAXPATHLEN];
+ char shadow_dest[MAXPATHLEN];
+ char shadow_dirb[MAXPATHLEN];
+ int tonic = 0;
+ int rv = 0;
-
- while ((c = getopt(argc, argv, "f:sm:du:g:")) != EOF) {
+ while ((c = getopt(argc, argv, "f:sm:du:g:O")) != EOF) {
switch (c) {
case 'f':
dirb = optarg;
@@ -163,7 +206,10 @@ main(int argc, char **argv)
mode = strtol(optarg, NULL, 8);
break;
case 's':
- supress = 1;
+ suppress = 1;
+ break;
+ case 'O':
+ tonic = 1;
break;
case '?':
errflg++;
@@ -187,50 +233,86 @@ main(int argc, char **argv)
return (1);
}
-
for (c = optind; c < argc; c++) {
ins_file = argv[c];
if (dirflg) {
- struct stat buf;
-
- if (stat(ins_file, &buf) == 0) {
- if ((buf.st_mode & S_IFMT) == S_IFDIR)
- continue;
- } else {
- if (errno != ENOENT) {
- perror("install: stat");
- return (1);
+ if (tonic) {
+ formclosed(ins_file, shadow_dest);
+ rv = creatdir(shadow_dest);
+ if (rv) {
+ (void) fprintf(stderr,
+ "install: tonic creatdir "
+ "%s (%d): (%s)\n",
+ shadow_dest, errno,
+ strerror(errno));
+ return (rv);
}
}
-
- (void) strcpy(dest_file, ins_file);
-
- if (mkdirp(dest_file, 0755) == -1) {
- if (!supress) {
- (void) printf(
- "install: mkdirp of %s failed\n",
- dest_file);
- }
- } else if (!supress) {
- (void) printf("directory %s created\n",
- dest_file);
+ rv = creatdir(ins_file);
+ if (rv) {
+ (void) fprintf(stderr,
+ "install: creatdir %s (%d): %s\n",
+ ins_file, errno, strerror(errno));
+ return (rv);
}
+ (void) strlcpy(dest_file, ins_file, MAXPATHLEN);
+
} else {
(void) strcat(strcat(strcpy(dest_file, dirb), "/"),
find_basename(ins_file));
file_copy(ins_file, dest_file);
+
+ if (tonic) {
+ formclosed(dirb, shadow_dirb);
+ /*
+ * The standard directories in the proto
+ * area are created as part of "make setup",
+ * but that doesn't create them in the
+ * closed proto area. So if the target
+ * directory doesn't exist, we need to
+ * create it now.
+ */
+ rv = creatdir(shadow_dirb);
+ if (rv) {
+ (void) fprintf(stderr,
+ "install: tonic creatdir(f) "
+ "%s (%d): %s\n",
+ shadow_dirb, errno,
+ strerror(errno));
+ return (rv);
+ }
+ (void) strcat(strcat(strcpy(shadow_dest,
+ shadow_dirb), "/"),
+ find_basename(ins_file));
+ file_copy(ins_file, shadow_dest);
+ }
}
- if (group || owner)
+ if (group || owner) {
chown_file(dest_file, group, owner);
-
+ if (tonic)
+ chown_file(shadow_dest, group, owner);
+ }
if (mode != -1) {
- umask(0);
+ (void) umask(0);
if (chmod(dest_file, mode) == -1) {
- perror("chmod");
+ (void) fprintf(stderr,
+ "install: chmod of %s to mode %o failed "
+ "(%d): %s\n",
+ dest_file, mode, errno, strerror(errno));
return (1);
}
+ if (tonic) {
+ if (chmod(shadow_dest, mode) == -1) {
+ (void) fprintf(stderr,
+ "install: tonic chmod of %s "
+ "to mode %o failed (%d): %s\n",
+ shadow_dest, mode,
+ errno, strerror(errno));
+ return (1);
+ }
+ }
}
}
return (0);
diff --git a/usr/src/tools/scripts/Makefile b/usr/src/tools/scripts/Makefile
index bdb3466153..b7c77143b6 100644
--- a/usr/src/tools/scripts/Makefile
+++ b/usr/src/tools/scripts/Makefile
@@ -19,8 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
#
SHELL=/usr/bin/ksh93
@@ -28,7 +27,6 @@ SHELL=/usr/bin/ksh93
SHFILES= \
Install \
bfu \
- bfudrop \
bindrop \
bldenv \
build_cscope \
@@ -46,7 +44,6 @@ SHFILES= \
mkbfu \
mkclosed \
nightly \
- onblddrop \
onu \
protocmp.terse \
sccscheck \
@@ -54,7 +51,6 @@ SHFILES= \
sccshist \
sccsmv \
sccsrm \
- sdrop \
webrev \
which_scm \
ws \
diff --git a/usr/src/tools/scripts/bfudrop.sh b/usr/src/tools/scripts/bfudrop.sh
deleted file mode 100644
index a1a6939913..0000000000
--- a/usr/src/tools/scripts/bfudrop.sh
+++ /dev/null
@@ -1,205 +0,0 @@
-#! /usr/bin/ksh -p
-#
-# 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 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Create a set of BFU archives for posting, then deliver them as a
-# tarball, including binary license files.
-#
-# usage: bfudrop [-n] open-proto closed-bins build-id
-# -n extract non-debug closed binaries.
-# (open-proto and build-id are not modified.)
-# open-proto absolute path to open-only proto area.
-# closed-bins name of closed-bins tarball (bzipped, in $CODEMGR_WS)
-# build-ID identifier for the archives, e.g.,
-# "nightly-osol".
-#
-
-usage="bfudrop [-n] open-proto closed-bins build-ID"
-
-function fail {
- print -u2 "bfudrop: $@"
- exit 1
-}
-
-[[ -n "$SRC" ]] || fail "SRC must be set."
-[[ -n "$CODEMGR_WS" ]] || fail "CODEMGR_WS must be set."
-[[ -n "$CPIODIR" ]] || fail "CPIODIR must be set."
-
-#
-# Directory that we assemble everything in. Includes these
-# subdirectories:
-# tmp scratch directory
-# root_$MACH combined proto area
-# archives-<build-ID> copy of archives plus license files
-#
-stagedir=$(mktemp -dt bfudropXXXXX)
-
-[[ -n "$stagedir" ]] || fail "can't create staging directory."
-
-scratchdir="$stagedir/tmp"
-cpio_log="$stagedir/cpio.log"
-
-#
-# Wrapper over cpio to filter out "NNN blocks" messages.
-#
-function cpio_filt {
- integer cpio_stat
-
- cpio "$@" > "$cpio_log" 2>&1
- cpio_stat=$?
- cat "$cpio_log" | awk '$0 !~ /[0-9]+ blocks/ { print }'
- return $cpio_stat
-}
-
-#
-# Generate README.BFU-ARCHIVES.$MACH from boilerplate and the contents
-# of the bfu archives.
-# usage: cd archivedir; mkreadme destdir
-#
-function mkreadme {
- destdir="$1"
- readme="$destdir/README.BFU-ARCHIVES.$MACH"
- sed -e s/@ISA@/$MACH/ -e s/@DELIVERY@/BFU-ARCHIVES/ \
- "$SRC/tools/opensolaris/README.binaries.tmpl" > "$readme"
- for f in *; do
- print "==== $f ====" >> "$readme"
- #
- # The cpio table of contents includes directories, and
- # we just want files. So unpack the cpio file into a
- # temp directory, do a find(1) to get the table of
- # contents, and remove the temp directory.
- #
- mkdir -p "$scratchdir" || fail "can't create $scratchdir."
- case $f in
- *.gz) cat=gzcat;;
- *.Z) cat=zcat;;
- *.bz2) cat=bzcat;;
- *) cat=cat;;
- esac
- if ! $cat $f | (cd "$scratchdir"; cpio_filt -id); then
- fail "can't get contents for $f"
- fi
- #
- # "find *" will miss dot files, but we don't expect
- # any. "find ." would catch them, but we'd have to
- # clean up the resulting list (remove the "./").
- #
- (cd "$scratchdir"; find * -type f -print) | sort >> "$readme"
- rm -rf "$scratchdir"
- done
-}
-
-nondebug=n
-while getopts n flag; do
- case $flag in
- n)
- nondebug=y
- ;;
- ?)
- print -u2 "usage: $usage"
- exit 1
- ;;
- esac
-done
-shift $(($OPTIND - 1))
-
-if [[ $# -ne 3 ]]; then
- print -u2 "usage: $usage"
- exit 1
-fi
-srcroot="$1"
-closedtb="$2"
-build="$3"
-subdir="archives-$build"
-
-cpioparent="$(dirname $CPIODIR)"
-export CPIODIR="$cpioparent/$build"
-
-[[ -n "$MACH" ]] || MACH=$(uname -p)
-export MACH
-tarfile="$CODEMGR_WS/on-bfu-$build.$MACH.tar"
-
-newproto="$stagedir/root_$MACH"
-
-cd "$CODEMGR_WS"
-
-[[ -d "$srcroot" ]] || fail "can't find $srcroot."
-[[ -f "$closedtb" ]] || fail "can't find $closedtb."
-
-#
-# Copy the source proto area to a temp area and unpack the closed
-# binaries on top. The source proto area is left alone so as not to
-# break future incremental builds.
-#
-
-mkdir -p "$newproto" || fail "can't create $newproto."
-(cd "$srcroot"; find . -depth -print | cpio_filt -pdm "$newproto")
-[[ $? -eq 0 ]] || fail "can't copy original proto area."
-
-mkdir -p "$scratchdir" || fail "can't create $scratchdir"
-(cd "$scratchdir"; bzcat "$CODEMGR_WS/$closedtb" | tar xf -)
-[[ $? -eq 0 ]] || fail "can't unpack closed binaries."
-closed_root="$scratchdir/closed/root_$MACH"
-[[ "$nondebug" = y ]] && closed_root="$closed_root-nd"
-if [[ ! -d "$closed_root" ]]; then
- fail "can't find $(basename $closed_root) in closed binaries."
-fi
-(cd "$closed_root"; find . -depth -print | cpio_filt -pdmu "$newproto")
-[[ $? -eq 0 ]] || fail "can't copy closed binaries."
-rm -rf "$scratchdir"
-
-#
-# Generate the actual archives.
-#
-CLOSED_IS_PRESENT="no" ROOT="$newproto" makebfu
-
-#
-# Bundle up the archives and license files.
-#
-
-mkdir -p "$stagedir/$subdir/$MACH" || \
- fail "can't create $stagedir/$subdir/$MACH."
-
-archvdir=$CPIODIR
-[[ -d "$archvdir" ]] || fail "can't find $archvdir."
-
-# copy archives
-(cd "$archvdir"; tar cf - .) | (cd "$stagedir/$subdir/$MACH"; tar xf -)
-
-# Insert binary license files.
-cp -p "$SRC/tools/opensolaris/BINARYLICENSE.txt" "$stagedir/$subdir" || \
- fail "can't add BINARYLICENSE.txt"
-(cd "$archvdir"; mkreadme "$stagedir/$subdir") || exit 1
-cp -p "$CODEMGR_WS/THIRDPARTYLICENSE.BFU-ARCHIVES" "$stagedir/$subdir" || \
- fail "can't add THIRDPARTYLICENSE.BFU-ARCHIVES."
-
-(cd "$stagedir"; tar cf "$tarfile" "$subdir") || fail "can't create $tarfile."
-bzip2 -f "$tarfile" || fail "can't compress $tarfile".
-
-rm -rf "$stagedir"
-
-exit 0
diff --git a/usr/src/tools/scripts/bindrop.sh b/usr/src/tools/scripts/bindrop.sh
index e9a5b01d89..58bd05edc5 100644
--- a/usr/src/tools/scripts/bindrop.sh
+++ b/usr/src/tools/scripts/bindrop.sh
@@ -21,8 +21,7 @@
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Create an encumbered binaries tarball from a full build proto area,
# less the contents of an OpenSolaris proto area. Special handling
@@ -30,7 +29,7 @@
# Engineering.
#
-usage="bindrop [-n] full-root open-root basename"
+usage="bindrop [-n] basename"
isa=`uname -p`
@@ -78,22 +77,21 @@ while getopts n flag; do
done
shift $(($OPTIND - 1))
-if [[ $# -ne 3 ]]; then
+if [[ $# -ne 1 ]]; then
print -u2 "usage: $usage"
exit 1
fi
-full="$1"
-open="$2"
-tarfile="$CODEMGR_WS/$3.$isa.tar"
+tarfile="$CODEMGR_WS/$1.$isa.tar"
rootdir="root_$isa"
+suffix=""
if [[ "$nondebug" = y ]]; then
rootdir="root_$isa-nd"
+ suffix="-nd"
fi
-[[ -d "$full" ]] || fail "can't find $full."
-[[ -d "$open" ]] || fail "can't find $open."
+[[ -d "${ROOT}${suffix}-closed" ]] || fail "can't find closed root proto area."
tmpdir=$(mktemp -dt bindropXXXXX)
[[ -n "$tmpdir" ]] || fail "can't create temporary directory."
@@ -107,9 +105,9 @@ needdirs=$(mktemp -t needdirsXXXXX)
[[ -n "$needdirs" ]] || fail "can't create temporary directory list file."
#
-# Copy the full tree into a temp directory.
+# Copy the closed root parallel tree into a temp directory.
#
-(cd "$full"; tar cf - .) | (cd "$tmpdir/closed/$rootdir"; tar xpf -)
+(cd "${ROOT}${suffix}-closed"; tar cf - .) | (cd "$tmpdir/closed/$rootdir"; tar xpf -)
#
# Remove internal ON crypto signing certs
@@ -219,12 +217,6 @@ for f in $delete; do
done
#
-# Remove files that the open tree already has.
-#
-(cd "$open"; find . -type f -print -o -type l -print) > "$tmpdir/deleteme"
-(cd "$tmpdir/closed/$rootdir"; cat "$tmpdir/deleteme" | xargs rm -f)
-
-#
# Remove any header files. If they're in the closed tree, they're
# probably not freely redistributable.
#
@@ -233,7 +225,6 @@ done
-a \! -name localedef.h \
-exec rm -f {} \;)
-
#
# Remove empty directories that the open tree doesn't need.
#
@@ -262,15 +253,6 @@ MACH=$(uname -p)
rm "$needdirs"
#
-# Up above we removed the files that were already in the open tree.
-# But that blew away the minimal closed binaries that are needed to do
-# an open build, so restore them here.
-#
-
-mkclosed "$isa" "$full" "$tmpdir/closed/$rootdir" || \
- fail "can't restore minimal binaries."
-
-#
# Exclude signed crypto binaries; they are delivered in their
# own tarball.
#
diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv.sh
index 8156aeae58..19a249fa99 100644
--- a/usr/src/tools/scripts/bldenv.sh
+++ b/usr/src/tools/scripts/bldenv.sh
@@ -21,8 +21,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Uses supplied "env" file, based on /opt/onbld/etc/env, to set shell variables
# before spawning a shell for doing a release-style builds interactively
@@ -267,8 +266,8 @@ NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
while getopts '+0AaBCDdFfGIilMmNnOopRrS:tUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
do
case "$FLAG" in
- O) flags.O=true ;;
- +O) flags.O=false ;;
+ O) flags.O=true ;;
+ +O) flags.O=false ;;
o) flags.o=true ;;
+o) flags.o=false ;;
t) flags.t=true ;;
@@ -304,14 +303,7 @@ else
unset EXTRA_CFLAGS
fi
-if ${flags.O} ; then
- export MULTI_PROTO="yes"
- if [[ "$CLOSED_IS_PRESENT" == "yes" ]]; then
- print "CLOSED_IS_PRESENT is 'no' (because of '-O')"
- fi
- export CLOSED_IS_PRESENT=no
- export ON_CLOSED_BINS="$CODEMGR_WS/closed.skel"
-fi
+[[ "${flags.O}" ]] && export MULTI_PROTO="yes"
# update build-type variables
CPIODIR="${CPIODIR}${SUFFIX}"
@@ -418,17 +410,30 @@ ENVCPPFLAGS4=
PARENT_ROOT=
PARENT_TOOLS_ROOT=
-"${flags.O}" && export ROOT="$ROOT-open"
-
if [[ "$MULTI_PROTO" != "yes" && "$MULTI_PROTO" != "no" ]]; then
printf \
- 'WARNING: invalid value for MULTI_PROTO (%s);setting to "no".\n' \
+ 'WARNING: invalid value for MULTI_PROTO (%s); setting to "no".\n' \
"$MULTI_PROTO"
export MULTI_PROTO="no"
fi
[[ "$MULTI_PROTO" == "yes" ]] && export ROOT="${ROOT}${SUFFIX}"
+export TONICBUILD="#"
+
+if "${flags.O}" ; then
+ if [[ "$CLOSED_IS_PRESENT" != "yes" ]]; then
+ print "OpenSolaris closed binary generation requires "
+ print "closed tree"
+ exit 1
+ fi
+ print "Generating OpenSolaris deliverables"
+ # We only need CLOSEDROOT in the env for convenience. Makefile.master
+ # figures out what it needs when it matters.
+ export CLOSEDROOT="${ROOT}-closed"
+ export TONICBUILD=""
+fi
+
ENVLDLIBS1="-L$ROOT/lib -L$ROOT/usr/lib"
ENVCPPFLAGS1="-I$ROOT/usr/include"
MAKEFLAGS=e
diff --git a/usr/src/tools/scripts/mktpl.pl b/usr/src/tools/scripts/mktpl.pl
index efd2c298be..15787e2288 100644
--- a/usr/src/tools/scripts/mktpl.pl
+++ b/usr/src/tools/scripts/mktpl.pl
@@ -21,8 +21,7 @@
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -121,12 +120,9 @@ chdir($top) or die "Can't chdir to $top: $!\n";
$top = getcwd();
my $isclosed = qr"^usr/closed";
-my $istools = qr"^usr/src/tools";
my $iscrypto = qr"(^usr/src/common/crypto)|(^usr/src/lib/pkcs11)";
my @closedlist;
-my @toolslist;
-my @bfulist;
my @cryptolist;
open(IX, "<$indexfile") or die "Can't open $indexfile: $!\n";
@@ -139,13 +135,6 @@ while (<IX>) {
if ($lic =~ /$iscrypto/ && signedcrypto($lic)) {
push @cryptolist, $lic;
}
- if (! $opt_c) {
- if ($lic =~ /$istools/) {
- push @toolslist, $lic;
- } else {
- push @bfulist, $lic;
- }
- }
}
close IX;
@@ -154,8 +143,6 @@ close IX;
#
maketpl("ON-BINARIES", @closedlist);
-maketpl("ON-BUILD-TOOLS", @toolslist);
-maketpl("BFU-ARCHIVES", @bfulist);
maketpl("ON-CRYPTO", @cryptolist);
exit $exitstatus;
diff --git a/usr/src/tools/scripts/nightly.1 b/usr/src/tools/scripts/nightly.1
index 21626665c9..eb26780ec2 100644
--- a/usr/src/tools/scripts/nightly.1
+++ b/usr/src/tools/scripts/nightly.1
@@ -1,4 +1,3 @@
-.\" " CDDL HEADER START
.\" "
.\" " The contents of this file are subject to the terms of the
.\" " Common Development and Distribution License (the "License").
@@ -17,9 +16,9 @@
.\" "
.\" " CDDL HEADER END
.\" "
-.\" "Copyright 2010 Sun Microsystems, Inc. All rights reserved."
-.\" "Use is subject to license terms."
-.TH nightly 1 "14 Jan 2010"
+.\" "Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+.\" "
+.TH nightly 1 "21 April 2010"
.SH NAME
.I nightly
\- build an OS-Net consolidation overnight
@@ -244,12 +243,10 @@ a time.
.B Miscellaneous options
.TP 10
.B \-O
-generate deliverables for OpenSolaris. Tarballs containing a source
-snapshot, binaries of closed-source components, compiled ON tools
-(SUNWonbld), and BFU archives are put in $CODEMGR_WS. A tarball
-containing signed cryptographic binaries is put in the parent
-directory of $PKGARCHIVE (by default they are put in
-$CODEMGR_WS/packages/$MACH).
+generate deliverables for OpenSolaris. Tarballs containing binaries
+of closed-source components are put in $CODEMGR_WS. A tarball containing
+signed cryptographic binaries is put in the parent directory of
+$PKGARCHIVE (by default they are put in $CODEMGR_WS/packages/$MACH).
.TP 10
.B \-V VERS
set the build version string to VERS, overriding VERSION
@@ -345,9 +342,9 @@ If $MULTI_PROTO is "no", $ROOT may contain a DEBUG or non-DEBUG
build. If $MULTI_PROTO is "yes", $ROOT contains the DEBUG build and
$ROOT-nd contains the non-DEBUG build.
.LP
-For OpenSolaris deliveries (\fB\-O\fR), $ROOT-open contains the DEBUG
-build of just the open source tree, and $ROOT-open-nd contains the
-non-DEBUG build.
+For OpenSolaris deliveries (\fB\-O\fR), $ROOT-closed contains a parallel
+proto area containing the DEBUG build of just usr/closed components, and
+$ROOT-nd-closed contains the non-DEBUG equivalent.
.RE
.LP
.B TOOLS_ROOT
diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh
index dba297d0e6..fb9a15eb22 100644
--- a/usr/src/tools/scripts/nightly.sh
+++ b/usr/src/tools/scripts/nightly.sh
@@ -21,8 +21,7 @@
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
#
# Based on the nightly script from the integration folks,
# Mostly modified and owned by mike_s.
@@ -167,35 +166,12 @@ function crypto_from_proto {
}
#
-# Print the tag string used to identify a build (e.g., "DEBUG
-# open-only")
-# usage: tagstring debug-part open-part
-#
-function tagstring {
- debug_part=$1
- open_part=$2
-
- if [ -n "$open_part" ]; then
- echo "$debug_part $open_part"
- else
- echo "$debug_part"
- fi
-}
-
-#
# Function to do a DEBUG and non-DEBUG build. Needed because we might
# need to do another for the source build, and since we only deliver DEBUG or
# non-DEBUG packages.
#
-# usage: normal_build [-O]
+# usage: normal_build
#
-# -O OpenSolaris delivery build. Put the proto area and
-# packages in -open directories. Use skeleton closed binaries.
-# Don't generate archives--that needs to be done later, after
-# we've generated the closed binaries. Use the signed binaries
-# from the earlier full build.
-#
-
function normal_build {
typeset orig_p_FLAG="$p_FLAG"
@@ -205,37 +181,14 @@ function normal_build {
typeset gencrypto=no
suffix=""
- open_only=""
[ -n "$CODESIGN_USER" ] && gencrypto=yes
- if (( $# == 1 )); then
- if [ "$1" = "-O" ]; then
- suffix="-open"
- open_only="open-only"
- p_FLAG=n
- a_FLAG=n
- gencrypto=no
- if [ -n "$CODESIGN_USER" ]; then
- #
- # Crypto doesn't get signed in the
- # open-only build (no closed tree ->
- # no internal signing -> no signing
- # for off-SWAN). So use the earlier
- # signed crypto.
- #
- crypto_in=$PKGARCHIVE/../on-crypto.$MACH.tar.bz2
- crypto_signer=""
- fi
- fi
- fi
-
# non-DEBUG build begins
if [ "$F_FLAG" = "n" ]; then
set_non_debug_build_flags
- mytag=`tagstring "non-DEBUG" "$open_only"`
CODESIGN_USER="$crypto_signer" \
- build "$mytag" "$suffix-nd" "-nd" "$MULTI_PROTO" \
+ build "non-DEBUG" "$suffix-nd" "-nd" "$MULTI_PROTO" \
$(ndcrypto "$crypto_in")
if [ "$build_ok" = "y" -a "$X_FLAG" = "y" -a \
"$p_FLAG" = "y" ]; then
@@ -245,7 +198,6 @@ function normal_build {
if [[ "$gencrypto" = yes && "$build_ok" = y ]]; then
crypto_from_proto non-DEBUG -nd
fi
-
else
echo "\n==== No non-DEBUG $open_only build ====\n" >> "$LOGFILE"
fi
@@ -256,9 +208,8 @@ function normal_build {
if [ "$D_FLAG" = "y" ]; then
set_debug_build_flags
- mytag=`tagstring "DEBUG" "$open_only"`
CODESIGN_USER="$crypto_signer" \
- build "$mytag" "$suffix" "" "$MULTI_PROTO" "$crypto_in"
+ build "DEBUG" "$suffix" "" "$MULTI_PROTO" "$crypto_in"
if [ "$build_ok" = "y" -a "$X_FLAG" = "y" -a \
"$p_FLAG" = "y" ]; then
copy_ihv_pkgs DEBUG ""
@@ -267,7 +218,6 @@ function normal_build {
if [[ "$gencrypto" = yes && "$build_ok" = y ]]; then
crypto_from_proto DEBUG ""
fi
-
else
echo "\n==== No DEBUG $open_only build ====\n" >> "$LOGFILE"
fi
@@ -709,6 +659,11 @@ function build {
ORIGROOT=$ROOT
[ $MULTIPROTO = no ] || export ROOT=$ROOT$SUFFIX
+ if [[ "$O_FLAG" = y ]]; then
+ echo "\nSetting CLOSEDROOT= ${ROOT}-closed\n" >> $LOGFILE
+ export CLOSEDROOT=${ROOT}-closed
+ fi
+
export ENVLDLIBS1=`myldlibs $ROOT`
export ENVCPPFLAGS1=`myheaders $ROOT`
@@ -1028,7 +983,7 @@ function copy_ihv_proto {
fi
echo "copying $IA32_IHV_ROOT to $ROOT\n" >> $LOGFILE
cd $IA32_IHV_ROOT
- tar -cf - . | (cd $ROOT; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
+ tar cf - . | (cd $ROOT; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
else
echo "$IA32_IHV_ROOT: not found" >> $LOGFILE
fi
@@ -1050,7 +1005,7 @@ function copy_ihv_proto {
echo "$IA32_IHV_ROOT{-nd,}: not found" >> $LOGFILE
return
fi
- tar -cf - . | (cd $ROOT-nd; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
+ tar cf - . | (cd $ROOT-nd; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
fi
}
@@ -1067,7 +1022,7 @@ function copy_ihv_pkgs {
>> $LOGFILE
if [ -d "$IA32_IHV_PKGS" ]; then
cd $IA32_IHV_PKGS
- tar -cf - * | \
+ tar cf - * | \
(cd $PKGARCHIVE; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
else
echo "$IA32_IHV_PKGS: not found" >> $LOGFILE
@@ -1077,7 +1032,7 @@ function copy_ihv_pkgs {
>> $LOGFILE
if [ -d "$IA32_IHV_BINARY_PKGS" ]; then
cd $IA32_IHV_BINARY_PKGS
- tar -cf - * | \
+ tar cf - * | \
(cd $PKGARCHIVE; umask 0; tar xpf - ) 2>&1 >> $LOGFILE
else
echo "$IA32_IHV_BINARY_PKGS: not found" >> $LOGFILE
@@ -1803,6 +1758,12 @@ if [[ "$O_FLAG" = y && -z "$CODESIGN_USER" ]]; then
fi
fi
+if [[ "$O_FLAG" = y ]]; then
+ export TONICBUILD=""
+else
+ export TONICBUILD="#"
+fi
+
if [ "${SUNWSPRO}" != "" ]; then
PATH="${SUNWSPRO}/bin:$PATH"
export PATH
@@ -2106,15 +2067,16 @@ function create_lock {
#
function allprotos {
roots="$ROOT $TOOLS_PROTO"
- if [ $O_FLAG = y ]; then
- # OpenSolaris deliveries require separate proto areas.
- [ $D_FLAG = y ] && roots="$roots $ROOT-open"
- [ $F_FLAG = n ] && roots="$roots $ROOT-open-nd"
- fi
+
if [[ $D_FLAG = y && $F_FLAG = n ]]; then
[ $MULTI_PROTO = yes ] && roots="$roots $ROOT-nd"
fi
+ if [[ $O_FLAG = y ]]; then
+ roots="$roots $ROOT-closed"
+ [ $MULTI_PROTO = yes ] && roots="$roots $ROOT-nd-closed"
+ fi
+
echo $roots
}
@@ -2797,10 +2759,18 @@ if [ "$n_FLAG" = "n" ]; then
#
CLOSED_IS_PRESENT="$orig_closed_is_present"
check_closed_tree
+
else
echo "\n==== No bringover to $CODEMGR_WS ====\n" >> $LOGFILE
fi
+if [[ "$O_FLAG" = y && "$CLOSED_IS_PRESENT" != "yes" ]]; then
+ build_ok=n
+ echo "OpenSolaris binary deliverables need usr/closed." \
+ | tee -a "$mail_msg_file" >> $LOGFILE
+ exit 1
+fi
+
if [ "$CLOSED_IS_PRESENT" = no ]; then
#
# Not all consolidations have a closed tree, and even if they
@@ -2948,54 +2918,6 @@ if [ "$O_FLAG" = y -a "$build_ok" = y ]; then
fi
fi
-#
-# If OpenSolaris deliverables were requested, do the open-only build
-# now, so that it happens at roughly the same point as the source
-# product builds. This lets us take advantage of checks that come
-# later (e.g., the core file check).
-#
-if [ "$O_FLAG" = y -a "$build_ok" = y ]; then
- #
- # Generate skeleton (minimal) closed binaries for open-only
- # build. There's no need to distinguish DEBUG from non-DEBUG
- # binaries, but it simplifies file management to have separate
- # trees.
- #
-
- echo "\n==== Generating skeleton closed binaries for" \
- "open-only build ====\n" | \
- tee -a $LOGFILE >> $mail_msg_file
-
- rm -rf $CODEMGR_WS/closed.skel
- if [ "$D_FLAG" = y ]; then
- mkclosed $MACH $ROOT $CODEMGR_WS/closed.skel/root_$MACH \
- >>$LOGFILE 2>&1
- if (( $? != 0 )) ; then
- echo "Couldn't create skeleton DEBUG closed binaries." |
- tee -a $mail_msg_file >> $LOGFILE
- fi
- fi
- if [ "$F_FLAG" = n ]; then
- mkclosed $MACH $ROOT-nd $CODEMGR_WS/closed.skel/root_$MACH-nd \
- >>$LOGFILE 2>&1
- if (( $? != 0 )) ; then
- echo "Couldn't create skeleton non-DEBUG closed binaries." |
- tee -a $mail_msg_file >> $LOGFILE
- fi
- fi
-
- ORIG_CLOSED_IS_PRESENT=$CLOSED_IS_PRESENT
- export CLOSED_IS_PRESENT=no
-
- ORIG_ON_CLOSED_BINS="$ON_CLOSED_BINS"
- export ON_CLOSED_BINS=$CODEMGR_WS/closed.skel
-
- normal_build -O
-
- ON_CLOSED_BINS=$ORIG_ON_CLOSED_BINS
- CLOSED_IS_PRESENT=$ORIG_CLOSED_IS_PRESENT
-fi
-
ORIG_SRC=$SRC
BINARCHIVE=${CODEMGR_WS}/bin-${MACH}.cpio.Z
@@ -3049,35 +2971,34 @@ if [ "$SO_FLAG" = "y" -a $build_ok = y ]; then
fi
if [ "$SO_FLAG" = "y" -a $build_ok = y ]; then
- SRC=$OPEN_SRCDIR/usr/src
-
- # Try not to clobber any user-provided closed binaries.
- export ON_CLOSED_BINS=$CODEMGR_WS/closed$$
- echo "\n==== Copying skeleton closed binaries to" \
- "$ON_CLOSED_BINS ====\n" | \
- tee -a $mail_msg_file >> $LOGFILE
+ echo "\n==== Generating skeleton closed binaries for" \
+ "open-only build ====\n" | \
+ tee -a $LOGFILE >> $mail_msg_file
+ rm -rf $CODEMGR_WS/closed.skel
if [ "$D_FLAG" = y ]; then
- mkclosed $MACH $ROOT $ON_CLOSED_BINS/root_$MACH >>$LOGFILE 2>&1
+ mkclosed $MACH $ROOT $CODEMGR_WS/closed.skel/root_$MACH \
+ >>$LOGFILE 2>&1
if (( $? != 0 )) ; then
- build_ok=n
- echo "Couldn't create DEBUG closed binaries." |
+ echo "Couldn't create skeleton DEBUG closed binaries." |
tee -a $mail_msg_file >> $LOGFILE
fi
fi
if [ "$F_FLAG" = n ]; then
root=$ROOT
[ "$MULTI_PROTO" = yes ] && root=$ROOT-nd
- mkclosed $MACH $root $ON_CLOSED_BINS/root_$MACH-nd \
+ mkclosed $MACH $root $CODEMGR_WS/closed.skel/root_$MACH-nd \
>>$LOGFILE 2>&1
if (( $? != 0 )) ; then
- build_ok=n
- echo "Couldn't create non-DEBUG closed binaries." |
+ echo "Couldn't create skeleton non-DEBUG closed binaries." |
tee -a $mail_msg_file >> $LOGFILE
fi
fi
-
+
+ SRC=$OPEN_SRCDIR/usr/src
+ # Try not to clobber any user-provided closed binaries.
+ export ON_CLOSED_BINS=$CODEMGR_WS/closed.skel
export CLOSED_IS_PRESENT=no
fi
@@ -3484,7 +3405,10 @@ function crypto_passthrough {
fi
}
-if [ "$O_FLAG" = y -a "$build_ok" = y ]; then
+# If we are doing an OpenSolaris _source_ build (-S O) then we do
+# not have usr/closed available to us to generate closedbins from,
+# so skip this part.
+if [ "$SO_FLAG" = n -a "$O_FLAG" = y -a "$build_ok" = y ]; then
echo "\n==== Generating OpenSolaris tarballs ====\n" | \
tee -a $mail_msg_file >> $LOGFILE
@@ -3502,30 +3426,20 @@ if [ "$O_FLAG" = y -a "$build_ok" = y ]; then
echo "Generating closed binaries tarball(s)..." >> $LOGFILE
closed_basename=on-closed-bins
if [ "$D_FLAG" = y ]; then
- bindrop "$ROOT" "$ROOT-open" "$closed_basename" \
- >>"$LOGFILE" 2>&1
+ bindrop "$closed_basename" >>"$LOGFILE" 2>&1
if (( $? != 0 )) ; then
echo "Couldn't create DEBUG closed binaries." |
tee -a $mail_msg_file >> $LOGFILE
fi
fi
if [ "$F_FLAG" = n ]; then
- bindrop -n "$ROOT-nd" "$ROOT-open-nd" "$closed_basename-nd" \
- >>"$LOGFILE" 2>&1
+ bindrop -n "$closed_basename-nd" >>"$LOGFILE" 2>&1
if (( $? != 0 )) ; then
echo "Couldn't create non-DEBUG closed binaries." |
tee -a $mail_msg_file >> $LOGFILE
fi
fi
- echo "Generating onbld tools tarball..." >> $LOGFILE
- PKGARCHIVE=$PKGARCHIVE_ORIG
- onblddrop >> $LOGFILE 2>&1
- if (( $? != 0 )) ; then
- echo "Couldn't create onbld tools tarball." |
- tee -a $mail_msg_file >> $LOGFILE
- fi
-
echo "Generating README.opensolaris..." >> $LOGFILE
cat $SRC/tools/opensolaris/README.opensolaris.tmpl | \
mkreadme_osol $CODEMGR_WS/README.opensolaris >> $LOGFILE 2>&1
@@ -3534,34 +3448,6 @@ if [ "$O_FLAG" = y -a "$build_ok" = y ]; then
tee -a $mail_msg_file >> $LOGFILE
fi
- # This step walks the source tree, so it must come after
- # findunref. It depends on README.opensolaris.
- echo "Generating source tarball..." >> $LOGFILE
- sdrop >>$LOGFILE 2>&1
- if (( $? != 0 )) ; then
- echo "Couldn't create source tarball." |
- tee -a "$mail_msg_file" >> "$LOGFILE"
- fi
-
- # This step depends on the closed binaries tarballs.
- echo "Generating BFU tarball(s)..." >> $LOGFILE
- if [ "$D_FLAG" = y ]; then
- makebfu_filt bfudrop "$ROOT-open" \
- "$closed_basename.$MACH.tar.bz2" nightly-osol
- if (( $? != 0 )) ; then
- echo "Couldn't create DEBUG archives tarball." |
- tee -a $mail_msg_file >> $LOGFILE
- fi
- fi
- if [ "$F_FLAG" = n ]; then
- makebfu_filt bfudrop -n "$ROOT-open-nd" \
- "$closed_basename-nd.$MACH.tar.bz2" nightly-osol-nd
- if (( $? != 0 )) ; then
- echo "Couldn't create non-DEBUG archives tarball." |
- tee -a $mail_msg_file >> $LOGFILE
- fi
- fi
-
if [ -n "$ON_CRYPTO_BINS" ]; then
crypto_passthrough
fi
diff --git a/usr/src/tools/scripts/onblddrop.sh b/usr/src/tools/scripts/onblddrop.sh
deleted file mode 100644
index 38b24005a1..0000000000
--- a/usr/src/tools/scripts/onblddrop.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#! /bin/ksh -p
-#
-# 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 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Make onbld tarball for OpenSolaris. Besides the files delivered
-# in the package, we include licensing files.
-#
-
-fail() {
- echo $*
- exit 1
-}
-
-#
-# Directory that we assemble everything in. Everything goes into
-# $subdir so that it unpacks cleanly.
-#
-stagedir=$(mktemp -dt onblddropXXXXX)
-subdir=onbld
-
-[ -n "$SRC" ] || fail "Please set SRC."
-[ -n "$CODEMGR_WS" ] || fail "Please set CODEMGR_WS."
-[ -n "$TOOLS_PROTO" ] || fail "Please set TOOLS_PROTO."
-
-[ -n "$MAKE" ] || export MAKE=make
-
-isa=`uname -p`
-tarfile=$CODEMGR_WS/SUNWonbld.$isa.tar
-
-#
-# Generate the README from boilerplate and the contents of the
-# SUNWonbld tree.
-# usage: mkreadme targetdir
-#
-mkreadme() {
- targetdir=$1
- readme=README.ON-BUILD-TOOLS.$isa
- sed -e s/@ISA@/$isa/ -e s/@DELIVERY@/ON-BUILD-TOOLS/ \
- $SRC/tools/opensolaris/README.binaries.tmpl > $targetdir/$readme
- (cd $targetdir; find opt -type f -print | \
- sort >> $targetdir/$readme)
-}
-
-[ -n "$stagedir" ] || fail "Can't create staging directory."
-mkdir -p $stagedir/$subdir || fail "Can't create $stagedir/$subdir."
-
-cd $CODEMGR_WS
-# $MAKE -e to make sure TOOLS_PROTO is used.
-(cd usr/src/tools; $MAKE -e install) || fail "Can't build tools."
-
-#
-# There is no on-disk package format, and the tools are built and
-# delivered independently of the rest of the consolidation, including
-# leaving them out of the consolidation incorporation to facilitate
-# tools upgrade. If using the OpenSolaris deliverables, the closest
-# we can get is a tarball of the proto area with all of the files that
-# would have been packaged.
-#
-(cd $TOOLS_PROTO; tar cf - $(find opt -type f)) | \
- (cd $stagedir/$subdir; tar xf -)
-
-mkreadme $stagedir/$subdir
-cp -p $CODEMGR_WS/THIRDPARTYLICENSE.ON-BUILD-TOOLS $stagedir/$subdir || \
- fail "Can't add THIRDPARTYLICENSE.ON-BUILD-TOOLS."
-
-(cd $stagedir; tar cf $tarfile $subdir) || fail "Can't create $tarfile."
-bzip2 -f $tarfile || fail "Can't compress $tarfile".
-
-rm -rf $stagedir
diff --git a/usr/src/tools/scripts/sdrop.sh b/usr/src/tools/scripts/sdrop.sh
deleted file mode 100644
index 494b6511bc..0000000000
--- a/usr/src/tools/scripts/sdrop.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/ksh -p
-#
-# 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
-#
-
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# Source drop generator.
-#
-
-PATH=$(dirname $(whence $0)):$PATH
-export PATH
-
-tmpdir=$(mktemp -dt sdropXXXXX)
-
-cleanup() {
- [ -n "$tmpdir" ] && rm -rf $tmpdir
-}
-
-fail() {
- echo $*
- cleanup
- exit 1
-}
-
-[ -n "$CODEMGR_WS" ] || fail "Please define CODEMGR_WS."
-[ -n "$tmpdir" ] || fail "Can't create temp directory."
-
-tarfile=$CODEMGR_WS/on-src.tar
-
-cd $CODEMGR_WS
-which_scm | read SCM_TYPE junk || exit 1
-
-#
-# Copy anything that's registered with source control, except for deleted files,
-# into a temp directory. Then tar that up.
-#
-case "$SCM_TYPE" in
-mercurial)
- hg locate -X deleted_files/ | cpio -pd $tmpdir
- ;;
-teamware)
- find usr/src -name 's\.*' -a -type f -print | \
- sed -e 's,SCCS\/s.,,' | \
- grep -v '/\.del-*' | \
- cpio -pd $tmpdir
- ;;
-unknown)
- fail "Unknown type of SCM in use."
- ;;
-*)
- fail "Unsupported SCM type: $SCM_TYPE"
- ;;
-esac
-[ $? -eq 0 ] || fail "Couldn't populate temp directory $tmpdir."
-
-cp README.opensolaris $tmpdir || fail "Couldn't copy README.opensolaris."
-
-(cd $tmpdir; tar cf $tarfile .) || fail "Couldn't create $tarfile."
-bzip2 -f $tarfile || fail "Couldn't bzip2 $tarfile."
-
-cleanup
diff --git a/usr/src/uts/Makefile.uts b/usr/src/uts/Makefile.uts
index 41cdc7bb65..bc90d534a2 100644
--- a/usr/src/uts/Makefile.uts
+++ b/usr/src/uts/Makefile.uts
@@ -20,8 +20,7 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
#
#
@@ -572,6 +571,11 @@ include $(SRC)/Makefile.psm
# while the replacement of the SUNW,SPARCstation-10,SX directory by
# a symbolic link is being propagated.
#
+# IMPORTANT:: if you change any of these INS.mumble rules, then you MUST also
+# change the corresponding override definitions in $CLOSED/Makefile.tonic.
+# If you do not do this, then the closedbins build for the OpenSolaris
+# community will break. PS, the gatekeepers will be upset too.
+#
INS.slink1= $(RM) -r $@; $(SYMLINK) $(PLATFORM) $@
INS.slink2= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/$(@F) $@
INS.slink3= $(RM) -r $@; $(SYMLINK) $(IMPLEMENTED_PLATFORM) $@