From owner-svn-ports-all@freebsd.org Wed Jul 18 11:13:08 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60CEA1044F8D; Wed, 18 Jul 2018 11:13:08 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 951FD752E5; Wed, 18 Jul 2018 11:13:07 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6953519724; Wed, 18 Jul 2018 11:13:07 +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 w6IBD7pV017605; Wed, 18 Jul 2018 11:13:07 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6IBD6EX017603; Wed, 18 Jul 2018 11:13:06 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201807181113.w6IBD6EX017603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Wed, 18 Jul 2018 11:13:06 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r474850 - in head/Mk: . Scripts X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: in head/Mk: . Scripts X-SVN-Commit-Revision: 474850 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2018 11:13:08 -0000 Author: mat Date: Wed Jul 18 11:13:06 2018 New Revision: 474850 URL: https://svnweb.freebsd.org/changeset/ports/474850 Log: Add a license qa check to tell porters when their ports will be mostly useless. Reviewed by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D16103 Modified: head/Mk/Scripts/qa.sh (contents, props changed) head/Mk/bsd.port.mk (contents, props changed) Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Wed Jul 18 11:13:02 2018 (r474849) +++ head/Mk/Scripts/qa.sh Wed Jul 18 11:13:06 2018 (r474850) @@ -914,9 +914,34 @@ flavors() return ${rc} } +license() +{ + local autoaccept pkgmirror #distsell distmirror pkgsell + + if [ -n "$LICENSE" ]; then + case "$LICENSE_PERMS" in + auto-accept) autoaccept=1 ;; + #dist-mirror) distmirror=1 ;; + #dist-sell) distsell=1 ;; + pkg-mirror) pkgmirror=1 ;; + #pkg-sell) pkgsell=1 ;; + esac + + if [ -z "$autoaccept" ]; then + warn "License is not auto-accepted, packages will not be built, ports depending on this one will be ignored." + fi + if [ -z "$pkgmirror" ]; then + warn "License does not allow package to be distributed, ports depending on this one will be ignored" + fi + fi + + return 0 +} + checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors" +checks="$checks license" ret=0 cd ${STAGEDIR} || exit 1 Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Wed Jul 18 11:13:02 2018 (r474849) +++ head/Mk/bsd.port.mk Wed Jul 18 11:13:06 2018 (r474850) @@ -1631,6 +1631,8 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ PKGBASE=${PKGBASE} \ + LICENSE="${LICENSE}" \ + LICENSE_PERMS="${_LICENSE_PERMS}" \ PORTNAME=${PORTNAME} \ NO_ARCH=${NO_ARCH} \ "NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" \