From owner-svn-src-vendor@freebsd.org Sun May 29 02:22:13 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE585B52CD8; Sun, 29 May 2016 02:22:13 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B88E21BE6; Sun, 29 May 2016 02:22:13 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4T2MCuu012248; Sun, 29 May 2016 02:22:12 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4T2MCNd012247; Sun, 29 May 2016 02:22:12 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201605290222.u4T2MCNd012247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Sun, 29 May 2016 02:22:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r300929 - vendor/Juniper/libxo X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 02:22:14 -0000 Author: phil Date: Sun May 29 02:22:12 2016 New Revision: 300929 URL: https://svnweb.freebsd.org/changeset/base/300929 Log: Update import script Reviewed by: sjg (mentor) Approved by: sjg Modified: vendor/Juniper/libxo/import.sh Modified: vendor/Juniper/libxo/import.sh ============================================================================== --- vendor/Juniper/libxo/import.sh Sun May 29 02:11:10 2016 (r300928) +++ vendor/Juniper/libxo/import.sh Sun May 29 02:22:12 2016 (r300929) @@ -13,11 +13,6 @@ # PROJECT=libxo -MAKEOBJDIRPREFIX=/tank/home/phil/work/bsd/base/head/obj/ -export MAKEOBJDIRPREFIX -EDITOR=vi -VISUAL=vi -export EDITOR VISUAL #"global" vars # Set SVN variables @@ -39,9 +34,19 @@ Cd() { info "Directory =" `pwd` } +siginfo() { + if [ ! -z "$CMD" ]; then + info "CMD is $CMD" + fi +} + +trap 'siginfo' SIGINFO +trap 'siginfo' SIGCONT + run() { desc="$1" cmd="$2" + CMD="$2" if [ "$DOC" = doc ]; then echo " == $desc" @@ -95,6 +100,7 @@ option_parsing() { -p) PROJECT=$2; shift 2;; -P) PR=$2; shift 2;; -r) REVIEWER=$2; shift 2;; + -u) UPDATE=no; shift;; -v) VERS=$2; shift 2;; -y) OKAY=yes; shift;; @@ -122,6 +128,17 @@ shift $? Cd `dirname $0` CWD=`pwd` +TOP=`echo $CWD | sed 's:/vendor/.*::'` +info "TOP = $TOP" + +Cd $TOP +HEAD=$TOP/head +info "HEAD = $HEAD" + +mkdir -p ../obj +MAKEOBJDIRPREFIX=`cd ../obj; pwd` +export MAKEOBJDIRPREFIX + if [ -z "$VENDOR_DIR" ]; then VENDOR_DIR=`echo $CWD | sed 's:.*/vendor/::'` fi @@ -131,9 +148,20 @@ fi info "CWD = $CWD" info "VENDOR_DIR = $VENDOR_DIR" info "VERS = $VERS" +DATESTAMP=`date "+%Y-%m-%d-%H-%M"` [ -z "$VERS" ] && Error "missing version argument (-v)" +run "show any local changes" "diff -rbu $CWD/dist $HEAD/contrib/libxo" + +Cd $HEAD +run "updating all" "svn update" + +if [ ! -z "$UPDATE" ]; then + run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP.before make -DNO_CLEAN MK_TESTS=no buildworld" +fi + +Cd $CWD mkdir -p ~/tars # We use the source tarball from git since it has no frills @@ -229,7 +257,7 @@ run "making list of files in existing tr "(cd dist && $RSVN list -R) | grep -v '/$' | sort > $TF.old" run "making list of files in incoming tree" \ - "(cd $BASE && find . -type f ) | cut -c 3- | $SEDNUKE | sort > $TF.new" + "(echo 'x .svnignore' ; cd $BASE && find . -type f ) | cut -c 3- | $SEDNUKE | sort > $TF.new" run "making list of deleted files" "comm -23 $TF.old $TF.new | tee $TF.rmlist" run "making list of new files" "comm -13 $TF.old $TF.new | tee $TF.addlist" @@ -260,9 +288,7 @@ run "build for real" \ # Move over and build the source tree -Cd $CWD/../../../head -HEAD=`pwd` -info "HEAD = $HEAD" +Cd $HEAD run "copying xo_config.h" "(echo '/* \$FreeBSD\$ */' ; cat $CWD/dist/build/libxo/xo_config.h ) > $HEAD/lib/libxo/xo_config.h" run "copying add.man" "(echo '.\\\" \$FreeBSD\$' ; cat $CWD/dist/build/libxo/add.man ) > $HEAD/lib/libxo/add.man" @@ -273,8 +299,7 @@ run "copying add.man" "(echo '.\\\" \$Fr #run "making build dir '$dir'" "make LIBXOSRC=$CWD/dist" #done -DATESTAMP=`date "+%Y-%m-%d-%H-%M"` -run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP make -DNO_CLEAN buildworld LIBXOSRC=$CWD/dist" +run "building the entire world" "script $MAKEOBJDIRPREFIX/out.$DATESTAMP make -DNO_CLEAN MK_TESTS=no buildworld LIBXOSRC=$CWD/dist" # Okay, so now it all builds!! Now we can start committing....