From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 21 06:30:03 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 770B31065679 for ; Wed, 21 Jul 2010 06:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8041D8FC25 for ; Wed, 21 Jul 2010 06:30:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6L6U28O091007 for ; Wed, 21 Jul 2010 06:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6L6U2cn091005; Wed, 21 Jul 2010 06:30:02 GMT (envelope-from gnats) Resent-Date: Wed, 21 Jul 2010 06:30:02 GMT Resent-Message-Id: <201007210630.o6L6U2cn091005@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anonymous Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A493D10656DB for ; Wed, 21 Jul 2010 06:20:23 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9088FC19 for ; Wed, 21 Jul 2010 06:20:22 +0000 (UTC) Received: by ewy26 with SMTP id 26so2342817ewy.13 for ; Tue, 20 Jul 2010 23:20:22 -0700 (PDT) Received: by 10.213.26.75 with SMTP id d11mr5504681ebc.27.1279693221674; Tue, 20 Jul 2010 23:20:21 -0700 (PDT) Received: from localhost ([95.143.193.145]) by mx.google.com with ESMTPS id v8sm52822699eeh.14.2010.07.20.23.20.19 (version=SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 23:20:20 -0700 (PDT) Message-Id: <86iq494auj.fsf@gmail.com> Date: Wed, 21 Jul 2010 10:17:55 +0400 From: Anonymous To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/148808: [patch] Mk/bsd.licenses.mk: fix filename collisions X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 06:30:03 -0000 >Number: 148808 >Category: ports >Synopsis: [patch] Mk/bsd.licenses.mk: fix filename collisions >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 21 06:30:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Anonymous >Release: FreeBSD 9.0-CURRENT amd64 >Organization: >Environment: tested by ashish@ for "single" type, http://docs.freebsd.org/cgi/mid.cgi?86lj95pm4r.fsf >Description: We shouldn't trust vendor that their license filename is unique and will not cause collisions for different licenses as well as for _LICENSE_REPORT. The patch also makes it clear what license file belongs to what license in an installed package, e.g. MIT, BSD, GPLv2, etc. A rough list of ports that already overwrite _LICENSE_REPORT by LICENSE_FILE, may do so when license framework is used or worked around by renaming: $ ( cd ${PORTSDIR-/usr/ports} && \ find . -type f -name Makefile\* -exec \ egrep -H 'WRK(DIR|SRC).*LICENSE([[:space:]]|$)' {} + | sed 's|^\./||; s|/Makefile.*||' ) >How-To-Repeat: >Fix: --- a.diff begins here --- Index: Mk/bsd.licenses.mk =================================================================== RCS file: /a/.cvsup/ports/Mk/bsd.licenses.mk,v retrieving revision 1.2 diff -u -p -r1.2 bsd.licenses.mk --- Mk/bsd.licenses.mk 26 May 2010 02:20:27 -0000 1.2 +++ Mk/bsd.licenses.mk 20 Jul 2010 19:20:41 -0000 @@ -723,11 +723,11 @@ PLIST_FILES+= ${_LICENSE_DIR_REL}/${_LIC PLIST_DIRS+= ${_LICENSE_DIR_REL} .if ${_LICENSE_COMB} == "single" -PLIST_FILES+= ${_LICENSE_DIR_REL}/${_LICENSE_FILE:T} +PLIST_FILES+= ${_LICENSE_DIR_REL}/${_LICENSE} .else . for lic in ${_LICENSE} . if defined(_LICENSE_FILE_${lic}) -PLIST_FILES+= ${_LICENSE_DIR_REL}/${_LICENSE_FILE_${lic}:T} +PLIST_FILES+= ${_LICENSE_DIR_REL}/${lic} . endif . endfor .endif @@ -737,10 +737,10 @@ install-license: @${INSTALL_DATA} ${_LICENSE_CATALOG_TMP} ${_LICENSE_CATALOG} @${INSTALL_DATA} ${_LICENSE_REPORT_TMP} ${_LICENSE_REPORT} .if ${_LICENSE_COMB} == "single" - @${INSTALL_DATA} ${_LICENSE_FILE} ${_LICENSE_DIR} + @${INSTALL_DATA} ${_LICENSE_FILE} ${_LICENSE_DIR}/${_LICENSE} .else . for lic in ${_LICENSE} - @${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${_LICENSE_DIR} + @${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${_LICENSE_DIR}/${lic} . endfor .endif # XXX @dirrmtry entry must be here (no way to do with PLIST_* vars) --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: