From owner-svn-src-head@freebsd.org Mon Dec 19 17:31:36 2016 Return-Path: Delivered-To: svn-src-head@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 24CD1C88CEA; Mon, 19 Dec 2016 17:31:36 +0000 (UTC) (envelope-from emaste@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 E88DB1527; Mon, 19 Dec 2016 17:31:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBJHVZIR083760; Mon, 19 Dec 2016 17:31:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBJHVZHA083759; Mon, 19 Dec 2016 17:31:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201612191731.uBJHVZHA083759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Dec 2016 17:31:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310279 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 17:31:36 -0000 Author: emaste Date: Mon Dec 19 17:31:34 2016 New Revision: 310279 URL: https://svnweb.freebsd.org/changeset/base/310279 Log: newvers.sh: consider as modified SVN mixed revision and other cases The newvers -R option is intended to include build metadata (e.g. user, host, time) if the build is from an unmodified VCS tree. For subversion it considered a trailing 'M' as an indication of a modified tree, and any other version string as modified. Also include mixed revision checkouts (e.g. 123:126), switched (123S) and partial (123P) working copies as modified: the revision number is insufficient to uniquely determine which source was used for the build. Reported by: gjb Reviewed by: gjb MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8853 Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon Dec 19 17:10:30 2016 (r310278) +++ head/sys/conf/newvers.sh Mon Dec 19 17:31:34 2016 (r310279) @@ -197,12 +197,17 @@ fi if [ -n "$svnversion" ] ; then svn=`cd ${SYSDIR} && $svnversion 2>/dev/null` - if expr "$svn" : ".*M" >/dev/null; then - modified=true - fi case "$svn" in - [0-9]*) svn=" r${svn}" ;; - *) unset svn ;; + [0-9]*[MSP]|*:*) + svn=" r${svn}" + modified=true + ;; + [0-9]*) + svn=" r${svn}" + ;; + *) + unset svn + ;; esac fi @@ -270,7 +275,7 @@ if [ -n "$hg_cmd" ] ; then fi include_metadata=true -while getopts r opt; do +while getopts rR opt; do case "$opt" in r) include_metadata=