diff options
author | Cy Schubert <cy@FreeBSD.org> | 2015-03-30 13:30:15 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2015-03-30 13:30:15 +0000 |
commit | 2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f (patch) | |
tree | 388af01c574ac107295ae453bab1e272bbfcda27 /contrib/ntp/flock-build | |
parent | a83592093c063d2b02127a1de7c7c93d5f600bd2 (diff) | |
parent | f7cba3a80d9ebefc57776fffd17a4ae68f72e494 (diff) | |
download | src-2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f.tar.gz src-2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f.zip |
MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)
Thanks to roberto for providing pointers to wedge this into HEAD.
Approved by: roberto
Notes
Notes:
svn path=/head/; revision=280849
Diffstat (limited to 'contrib/ntp/flock-build')
-rwxr-xr-x | contrib/ntp/flock-build | 137 |
1 files changed, 82 insertions, 55 deletions
diff --git a/contrib/ntp/flock-build b/contrib/ntp/flock-build index d80fc6d3d48c..b537ac349175 100755 --- a/contrib/ntp/flock-build +++ b/contrib/ntp/flock-build @@ -1,14 +1,32 @@ #! /bin/sh +IAM=`hostname || uname -n` +MYNAME=`IFS=. ; set $IAM ; echo $1` + +case "$1" in + '--one'|'-1') + shift + FB_FIRSTONLY=1 + LIST=$MYNAME + ;; + *) + FB_FIRSTONLY=0 +esac + BUILD_ARGS="$@" PARSE="--enable-parse-clocks" #PARSE= STD="--enable-simulator" -case "$SIMUL" in - '') PARALLEL_BUILDS=1 - ;; - *) PARALLEL_BUILDS=$SIMUL +case "$SIMUL::$FB_FIRSTONLY" in + ::*) + PARALLEL_BUILDS=1 + ;; + *::0) + PARALLEL_BUILDS=$SIMUL + ;; + *) + PARALLEL_BUILDS=1 esac case "$PARALLEL_BUILDS" in @@ -30,11 +48,14 @@ esac # Campus: # * baldwin sparc-sun-solaris2.10 # * bridgeport sparc-sun-solaris2.10 -# * cowbird freebsd-6.1 # * malarky sparc-sun-solaris2.10 # * pogo sparc-sun-solaris2.10 # * rackety freebsd-6.1 +if [ ! -r sntp/libevent/build-aux/config.guess ] ; then + echo "Error: bootstrap required." 1>&2 && exit 1 +fi + # HMS: we need $PWD because solaris produces /deacon/backroom when # we are in /backroom and in general there is no /deacon/backroom. c_d=${PWD:-`pwd`} @@ -42,7 +63,7 @@ c_d=${PWD:-`pwd`} SIG=`perl -e 'print rand'` case "$LIST" in - '') LIST="baldwin bridgeport cowbird malarky pogo rackety" ;; + '') LIST="pogo" ;; esac for i in $LIST @@ -51,56 +72,62 @@ do [ -f .buildkey-$i ] && SKIPTHIS=1 case "$SKIPTHIS" in 1) - echo flock-build running on $i? check LIST, skipping - ;; - 0) - echo $i - echo $SIG > .buildkey-$i - case "1" in - 0) - ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" & - ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS" & - ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks $BUILD_ARGS" & - ;; - 1) - cat > .flockbuild-$i-$SIG <<ENDQUOT -#!/bin/sh - -# depends on job control and expects to be invoked under ssh -tt - -cd $c_d -COUNT=0 - -./build $SIG $PARSE $STD $BUILD_ARGS & - -COUNT=\`expr \$COUNT + 1\` -echo $i started build \$COUNT of 4 -[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait - -./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS & - -COUNT=\`expr \$COUNT + 1\` -echo $i started build \$COUNT of 4 -[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait - -./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS & - -COUNT=\`expr \$COUNT + 1\` -echo $i started build \$COUNT of 4 -[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait - -./build $SIG $STD --disable-all-clocks $BUILD_ARGS & - -COUNT=\`expr \$COUNT + 1\` -echo $i started build \$COUNT of 4 -wait -echo \`date -u '+%H:%M:%S'\` $i flock-build $c_d done. -rm .buildkey-$i + echo flock-build running on $i? check LIST, skipping + ;; + 0) + echo $i + echo $SIG > .buildkey-$i + case "1" in + 0) + ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" & + ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" & + ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS" & + ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" & + ;; + 1) + cat > .flockbuild-$i-$SIG <<-ENDQUOT + #!/bin/sh + + # script uses job control and expects to be invoked + # in a ssh session started with the -tt option, + # which forces a pseudo-tty to be used. + + cd $c_d + COUNT=0 + + ./build $SIG $PARSE $STD $BUILD_ARGS & + + COUNT=\`expr \$COUNT + 1\` + echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 + [ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait + + case $FB_FIRSTONLY in + '0') + ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS & + + COUNT=\`expr \$COUNT + 1\` + echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 + [ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait + + ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS & + + COUNT=\`expr \$COUNT + 1\` + echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 + [ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait + + ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS & + + COUNT=\`expr \$COUNT + 1\` + echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4 + wait + esac + echo \`date -u '+%H:%M:%S'\` $i flock-build $c_d done. + rm .buildkey-$i ENDQUOT - chmod +x .flockbuild-$i-$SIG - ssh -tt $i "$c_d/.flockbuild-$i-$SIG ; \ - rm $c_d/.flockbuild-$i-$SIG" 2>/dev/null & - esac + chmod +x .flockbuild-$i-$SIG + ssh -tt $i "$c_d/.flockbuild-$i-$SIG ; \ + rm $c_d/.flockbuild-$i-$SIG" 2>/dev/null & + esac esac done echo `date -u '+%H:%M:%S'` flock-build launched |