From owner-svn-ports-head@freebsd.org Sun Jun 19 11:25:45 2016 Return-Path: Delivered-To: svn-ports-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 71AC1A7AC3B; Sun, 19 Jun 2016 11:25:45 +0000 (UTC) (envelope-from mat@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 2B19B1E4E; Sun, 19 Jun 2016 11:25:45 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5JBPiWP050494; Sun, 19 Jun 2016 11:25:44 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5JBPiIR050492; Sun, 19 Jun 2016 11:25:44 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201606191125.u5JBPiIR050492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Sun, 19 Jun 2016 11:25:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417113 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jun 2016 11:25:45 -0000 Author: mat Date: Sun Jun 19 11:25:44 2016 New Revision: 417113 URL: https://svnweb.freebsd.org/changeset/ports/417113 Log: Add a few checks for (MASTER|PATCH)_SITES groups. While make(1) is ok with variable names having quite a lot of strange characters in them, the fetch code mostly uses sh(1), where variable names can't include a dash (or pluses, or many other things). PR: 210251 210198 Submitted by: mat Exp-run by: antoine Sponsored by: The FreeBSD Foundation, Absolight Differential Revision: https://reviews.freebsd.org/D6779 Modified: head/Mk/bsd.port.mk (contents, props changed) head/Mk/bsd.sites.mk (contents, props changed) Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Sun Jun 19 11:25:39 2016 (r417112) +++ head/Mk/bsd.port.mk Sun Jun 19 11:25:44 2016 (r417113) @@ -2202,6 +2202,12 @@ _S_TEMP= ${_S:S/^${_S:C@/?:[^/:]+$@/@}// . if !empty(_S_TEMP) . for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} +. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} +check-makevars:: + @${ECHO_MSG} "The ${_S} MASTER_SITES line has" + @${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" + @${FALSE} +. endif . if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @@ -2219,6 +2225,12 @@ _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//: . if !empty(_S_TEMP) . for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} +. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} +check-makevars:: + @${ECHO_MSG} "The ${_S} PATCH_SITES line has" + @${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" + @${FALSE} +. endif . if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" Modified: head/Mk/bsd.sites.mk ============================================================================== --- head/Mk/bsd.sites.mk Sun Jun 19 11:25:39 2016 (r417112) +++ head/Mk/bsd.sites.mk Sun Jun 19 11:25:44 2016 (r417113) @@ -522,6 +522,15 @@ IGNORE?= Using master as GH_TAGNAME is i not "reroll" as soon as the branch is updated . endif . if defined(GH_TUPLE) +.for _tuple in ${GH_TUPLE} +_t_tmp=${_tuple} +.if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\4@:S/://:C/[a-zA-Z0-9_]//g} +check-makevars:: + @${ECHO_MSG} "The ${_tuple} GH_TUPLE line has" + @${ECHO_MSG} "a tag containing something else than [a-zA-Z0-9_]" + @${FALSE} +.endif +.endfor GH_ACCOUNT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\1\4@} GH_PROJECT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\2\4@} GH_TAGNAME+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:]*)?)@\3\4@}