Browse Source

OS-4960 in-gate dmake should be used to build the platform

Reviewed by: John Levon <john.levon@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: John Levon <john.levon@joyent.com>
pull/688/merge
Robert Mustacchi 4 years ago
parent
commit
2655f721e6
  1. 10
      configure
  2. 2
      pkgsrc/dmake/prefix
  3. 8
      tools/build_illumos
  4. 65
      tools/clobber_illumos

10
configure vendored

@ -315,7 +315,7 @@ PKGPUBLISHER_REDIST="${PUBLISHER}"; export PKGPUBLISHER_REDIST
MAKEFLAGS=k; export MAKEFLAGS
UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
MULTI_PROTO="no"; export MULTI_PROTO
BUILD_TOOLS="\${CODEMGR_WS}/usr/src/tools/proto/root_\${MACH}-nd/opt";
BUILD_TOOLS="\$SRC/tools/proto/root_\${MACH}-nd/opt";
export BUILD_TOOLS
SPRO_ROOT=/opt/SUNWspro; export SPRO_ROOT
SPRO_VROOT=\$SPRO_ROOT; export SPRO_VROOT
@ -348,7 +348,13 @@ NM=/usr/bin/nm; export NM
STRIP=/usr/bin/strip; export STRIP
TSORT=/usr/bin/tsort; export TSORT
AR=/usr/bin/ar; export AR
MAKE="$conf_root/proto.strap/usr/bin/dmake"; export MAKE
#
# We override $MAKE in ./tools/build_illumos so we can properly
# bootstrap the tools build.
#
if [[ -z "\$MAKE" ]]; then
MAKE="\$SRC/tools/proto/root_i386-nd/opt/onbld/bin/i386/dmake"; export MAKE
fi
LEX=/opt/local/bin/lex; export LEX
YACC=/opt/local/bin/yacc; export YACC
BISON=/opt/local/bin/bison; export BISON

2
pkgsrc/dmake/prefix

@ -1 +1 @@
/opt/local
/usr

8
tools/build_illumos

@ -52,9 +52,17 @@ else
fi
gsed -i -e "s|^MAX_JOBS=.*$|MAX_JOBS=${MJ}; export MAX_JOBS|" illumos.sh
#
# illumos.sh sets the value of $MAKE by default, which is used by bldenv
# and nightly. By setting MAKE below to the bootstrap dmake, illumos.sh
# will honor the one in the environment and let us solve the chicken and
# egg problem that we have.
#
export MAKE=/opt/local/bin/dmake
ksh93 ./usr/src/tools/scripts/bldenv.sh illumos.sh \
'cd $CODEMGR_WS/usr/src && export PATH="$PATH:/opt/local/bin" && \
dmake setup && cd tools && dmake install'
export -n MAKE
printf "\nRunning illumos nightly(1).\n"
printf "This will take a while.\n"

65
tools/clobber_illumos

@ -15,27 +15,16 @@
#
#
# Attempt to clobber an illumos build. We need to make sure that we have
# a dmake available. The one that's in -extra is the one that we
# generally need. As a heuristic, we use its presence for determining
# whether or not we need it. This isn't perfect. Ideally we'd ship a set
# of onbld tools to always use this. However, this should work for most
# folks. You can't build illumos without the 0-extra-stramp. Therefore
# if the dmake from proto.strap is missing, illumos likely hasn't been
# built.
#
# This does mean that a user that manually removes things in proto.strap
# and then calls gmake clobber at the top level will result in build
# failures; however, we can at least let folks know about that. Ideally,
# this will be a rare case.
# Attempt to clobber an illumos build. We override $MAKE in the
# environment to explicitly point at the bootstrap dmake that we install
# as part of ./configure.
#
set -o pipefail
ci_wsroot=$(cd $(dirname $0)/../; pwd)
ci_arg0=$(basename $0)
ci_dmake=$ci_wsroot/proto.strap/usr/bin/dmake
ci_stamp=$ci_wsroot/0-illumos-stamp
ci_illumos=$ci_wsroot/projects/illumos/usr/src
ci_illumos="$ci_wsroot/projects/illumos/usr/src"
ci_dmake="/opt/local/bin/dmake"
export PATH=/usr/bin:/usr/sbin:/opt/local/bin:/opt/local/sbin
@ -60,48 +49,6 @@ function ci_verify_root
"file sample.configure.smartos"
}
#
# Verify if we have dmake available. If dmake hasn't been built, we
# won't consider clobbering illumos, but will inform the user. If,
# however, the 0-illumos-stamp file is present, that indicates that
# the workspace is in a bad state and the user will have to manually
# clobber illumos. We'll give them instructions on what to do, but exit
# 1.
#
function ci_check_dmake
{
[[ -f $ci_dmake && -x $ci_dmake ]] && return
if [[ ! -f $ci_stamp ]]; then
cat >&2 << EOF
dmake not found and 0-illumos-stamp is not present. Assuming that
illumos has never been built and skipping the clobber.
EOF
exit 0
fi
#
# So we have a stamp file, but no dmake. We're not certain about
# the state of this workspace, so advise the user on what to do.
#
cat >&2 << EOF
Warning: repository is in a state where an automated clobber cannot be
performed. You will need to manually clobber illumos or rebuild the
initial part of illumos-extra. To rebuild illumos-extra, run:
$ rm -f 0-extra-stamp
$ gmake 0-extra-stamp
At this point, it should be safe to run gmake clean / clobber again. If
you still have problems, please reach out to the SmartOS community by
either asking in #smartos on irc.freenode.net, e-mailing the
smartos-discuss mailng list, or filing a bug on
https://github.com/joyent/smartos-live/issues.
EOF
exit 1
}
#
# Do the hard work of actually running dmake clobber. We purposefully
# allow its exit status to propagate out of here.
@ -109,10 +56,10 @@ EOF
function ci_do_clobber
{
echo "Clobbering $ci_wsroot/projects/illumos"
export MAKE="$ci_dmake"
ksh93 $ci_illumos/tools/scripts/bldenv.sh $ci_illumos/../../illumos.sh \
'cd $CODEMGR_WS/usr/src && dmake clobber'
}
ci_verify_root
ci_check_dmake
ci_do_clobber

Loading…
Cancel
Save