From owner-p4-projects@FreeBSD.ORG Tue Aug 19 00:05:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DECAD106567F; Tue, 19 Aug 2008 00:05:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A29BB106564A for ; Tue, 19 Aug 2008 00:05:24 +0000 (UTC) (envelope-from alepulver@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 84D678FC0A for ; Tue, 19 Aug 2008 00:05:24 +0000 (UTC) (envelope-from alepulver@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7J05OVP066366 for ; Tue, 19 Aug 2008 00:05:24 GMT (envelope-from alepulver@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7J05Oim066364 for perforce@freebsd.org; Tue, 19 Aug 2008 00:05:24 GMT (envelope-from alepulver@freebsd.org) Date: Tue, 19 Aug 2008 00:05:24 GMT Message-Id: <200808190005.m7J05Oim066364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to alepulver@freebsd.org using -f From: Alejandro Pulver To: Perforce Change Reviews Cc: Subject: PERFORCE change 147792 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 00:05:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=147792 Change 147792 by alepulver@alepulver_deimos on 2008/08/19 00:04:41 - Fix saving/loading configuration. - Fix LICENSE_TEXT. - Update README's TODO list (features to test are working). - Modify test port to check new features. Affected files ... .. //depot/projects/soc2008/alepulver-portslicense/ports/Mk/README#6 edit .. //depot/projects/soc2008/alepulver-portslicense/ports/Mk/bsd.licenses.mk#6 edit .. //depot/projects/soc2008/alepulver-portslicense/ports/Mk/test-license-1/Makefile#3 edit Differences ... ==== //depot/projects/soc2008/alepulver-portslicense/ports/Mk/README#6 (text+ko) ==== @@ -88,10 +88,6 @@ to save), may require adding "ask-license" to _EXTRACT_SUSEQ (maybe can be done only if required, from bsd.licenses.mk) -Test/fix: -* SHA256 -* save/load maintaining other choices - Maybe: * additional targets (show-license, show-license-report, show-known-licenses, etc) ==== //depot/projects/soc2008/alepulver-portslicense/ports/Mk/bsd.licenses.mk#6 (text+ko) ==== @@ -375,10 +375,6 @@ . elif ${_LICENSE_STATUS} == "ask" @${ECHO_MSG} "===> License ${_LICENSE} needs agreement, will ask later (by ${_LICENSE_STATUS_FROM})" . endif -. if !defined(LICENSE_FILE) && defined(LICENSE_TEXT) -# XXX escape shell chars? - @${ECHO_CMD} ${LICENSE_TEXT} > ${_LICENSE_FILE} -. endif #.else # XXX dual/multiple licenses #.endif @@ -389,17 +385,24 @@ _LICENSES_CONFIG= no .endif -# XXX Check if this works # For config when user accepts _LICENSES_ACCEPTED_YES= ${_LICENSES_ACCEPTED} ${_LICENSE} -_LICENSES_REJECTED_YES= ${_LICENSES_REJECTED:N${_LICENSE}} +.for lic in ${_LICENSE} +_LICENSES_REJECTED_YES= ${_LICENSES_REJECTED:N${lic}} +.endfor # For config when user rejects -_LICENSES_ACCEPTED_NO= ${_LICENSES_ACCEPTED:N${_LICENSE}} +.for lic in ${_LICENSE} +_LICENSES_ACCEPTED_NO= ${_LICENSES_ACCEPTED:N${lic}} +.endfor _LICENSES_REJECTED_NO= ${_LICENSES_REJECTED} ${_LICENSE} # Display, ask and save preference if requested ask-license: +.if !defined(LICENSE_FILE) && defined(LICENSE_TEXT) +# XXX escape shell chars? + @${ECHO_CMD} ${LICENSE_TEXT} > ${_LICENSE_FILE} +.endif @if [ ! -f ${_LICENSE_FILE} ]; then \ ${ECHO_MSG} "===> License not found in \"${_LICENSE_FILE}\", aborting."; \ exit 1; \ @@ -438,7 +441,7 @@ ${ECHO_CMD} _LICENSES_REJECTED=${_LICENSES_REJECTED_YES}; \ if [ ${_LICENSE_TYPE} != "known" ]; then \ ${ECHO_CMD} _LICENSE_${_LICENSE}_CHK=`${SHA256} -q ${_LICENSE_FILE}`; \ - fi) > ${_LICENSE_FILE}; \ + fi) > ${_LICENSE_CFG}; \ ${ECHO_MSG} "===> License accepted by user and saved"; \ status=done; \ fi;; \ @@ -450,7 +453,7 @@ ${ECHO_CMD} _LICENSES_REJECTED=${_LICENSES_REJECTED_NO}; \ if [ ${_LICENSE_TYPE} != "known" ]; then \ ${ECHO_CMD} _LICENSE_${_LICENSE}_CHK=`${SHA256} -q ${_LICENSE_FILE}`; \ - fi) > ${_LICENSE_FILE}; \ + fi) > ${_LICENSE_CFG}; \ ${ECHO_MSG} "===> License rejected by user and saved"; \ exit 1; \ fi;; \ ==== //depot/projects/soc2008/alepulver-portslicense/ports/Mk/test-license-1/Makefile#3 (text+ko) ==== @@ -17,16 +17,14 @@ NO_BUILD= yes NO_WRKSUBDIR= yes -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/MyFile -#LICENSE_PERMS= no-pkg-sell no-dist-sell -#LICENSE_NAME= Berkeley Software Distribution License -#LICENSE_GROUPS= # -#LICENSE_PERMS= dist-redist pkg-redist auto-accept +LICENSE= MyLic +LICENSE_TEXT= This license is at www.example.com +LICENSE_PERMS= redist +LICENSE_NAME= My Example License +LICENSE_GROUPS= # do-extract: @${MKDIR} ${WRKDIR} - @${ECHO_CMD} "example" > ${LICENSE_FILE} do-install: