Date: Wed, 21 Jul 2010 10:17:55 +0400 From: Anonymous <swell.k@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/148808: [patch] Mk/bsd.licenses.mk: fix filename collisions Message-ID: <86iq494auj.fsf@gmail.com> Resent-Message-ID: <201007210630.o6L6U2cn091005@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86iq494auj.fsf>