From owner-svn-src-head@freebsd.org Sat Aug 29 15:30:22 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C44F3B384A; Sat, 29 Aug 2020 15:30:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bf0ld71jTz4dbW; Sat, 29 Aug 2020 15:30:21 +0000 (UTC) (envelope-from gjb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D586727A33; Sat, 29 Aug 2020 15:30:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07TFUL7W017630; Sat, 29 Aug 2020 15:30:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07TFULLm017629; Sat, 29 Aug 2020 15:30:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202008291530.07TFULLm017629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 29 Aug 2020 15:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364957 - head/release X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 364957 X-SVN-Commit-Repository: base 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.33 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: Sat, 29 Aug 2020 15:30:22 -0000 Author: gjb Date: Sat Aug 29 15:30:21 2020 New Revision: 364957 URL: https://svnweb.freebsd.org/changeset/base/364957 Log: Avoid the build from falling over if devel/git is not installed on the system. Set a null branch/hash in this case, to avoid undefined GITREV/GITBRANCH variables from falling over in other areas. Reported by: many Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: head/release/Makefile.inc1 Modified: head/release/Makefile.inc1 ============================================================================== --- head/release/Makefile.inc1 Sat Aug 29 15:13:07 2020 (r364956) +++ head/release/Makefile.inc1 Sat Aug 29 15:30:21 2020 (r364957) @@ -10,10 +10,8 @@ GIT_CMD= ${_P}/git . endif . endif .endfor -.if !defined(GIT_CMD) && empty(GIT_CMD) -. error "Git binary not found. Set GIT_CMD appropriately." -.endif +.if !empty(GIT_CMD) && exists(${GIT_CMD}) # Set the git branch and hash to export where needed. .if !defined(GITBRANCH) || empty(GITBRANCH) GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbrev-ref HEAD 2>/dev/null | sed -e 's/\^\///' @@ -21,6 +19,12 @@ GITBRANCH!= ${GIT_CMD} -C ${.CURDIR} rev-parse --abbre .endif .if !defined(GITREV) || empty(GITREV) GITREV!= ${GIT_CMD} -C ${.CURDIR} rev-parse --verify --short HEAD 2>/dev/null || true +.export GITREV +.endif +.else +GITBRANCH= nullbranch +GITREV= nullhash +.export GITBRANCH .export GITREV .endif