From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Aug 13 18:30:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7FEDFC61 for ; Tue, 13 Aug 2013 18:30:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 635452B3B for ; Tue, 13 Aug 2013 18:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7DIU0Tm077009 for ; Tue, 13 Aug 2013 18:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7DIU0Ov077008; Tue, 13 Aug 2013 18:30:00 GMT (envelope-from gnats) Resent-Date: Tue, 13 Aug 2013 18:30:00 GMT Resent-Message-Id: <201308131830.r7DIU0Ov077008@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, Matthias Andree Received: from apollo.emma.line.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B0C38BCB; Tue, 13 Aug 2013 18:28:04 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mandree by apollo.emma.line.org with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1V9JKF-000Bkh-LQ; Tue, 13 Aug 2013 20:28:11 +0200 Message-Id: Date: Tue, 13 Aug 2013 20:28:11 +0200 From: Matthias Andree To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/181271: [PATCH] let bsd.port.mk's makepatch support spaces in filenames Cc: Clement Laforet , "George V. Neville-Neil" , portmgr@FreeBSD.org X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Matthias Andree List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 18:30:00 -0000 >Number: 181271 >Category: ports >Synopsis: [PATCH] let bsd.port.mk's makepatch support spaces in filenames >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Aug 13 18:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Matthias Andree >Release: FreeBSD 9.1-RELEASE-p5 amd64 >Organization: >Environment: System: FreeBSD apollo.emma.line.org 9.1-RELEASE-p5 FreeBSD 9.1-RELEASE-p5 #0: Sat Jul 27 01:14:23 UTC 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 >Description: GNN discovered that "make makepatch" fails when encountering file or path names with spaces in them (for instance, ".../Eclipse UI/..."). See http://pastebin.com/BWfC3XNF - we see that the path names get broken into two where the blank is. | /usr/bin/diff -ud ./build/eclipse-4.2.0-I20120608-1400-src/plugins/org.eclipse.ui.workbench/Eclipse ./build/eclipse-4.2.0-I20120608-1400-src/plugins/org.eclipse.ui.workbench/Eclipse > /usr/home/gnn/svn/head-ports/java/eclipse-devel/files/patch-build__eclipse-4.2.0-I20120608-1400-src__plugins__org.eclipse.ui.workbench__Eclipse | /usr/bin/diff: ./build/eclipse-4.2.0-I20120608-1400-src/plugins/org.eclipse.ui.workbench/Eclipse: No such file or directory | /usr/bin/diff: ./build/eclipse-4.2.0-I20120608-1400-src/plugins/org.eclipse.ui.workbench/Eclipse: No such file or directory | /usr/bin/diff -ud UI/org/eclipse/ui/internal/keys/model/BindingModel.java.orig UI/org/eclipse/ui/internal/keys/model/BindingModel.java > /usr/home/gnn/svn/head-ports/java/eclipse-devel/filesUI__org__eclipse__ui__internal__keys__model__BindingModel.java | /usr/bin/diff: UI/org/eclipse/ui/internal/keys/model/BindingModel.java.orig: No such file or directory | /usr/bin/diff: UI/org/eclipse/ui/internal/keys/model/BindingModel.java: No such file or directory The patch enclosed below proofs "make makepatch" against spaces in filenames, by properly quoting shell variables, stripping space from the shell's $IFS special variable, and escaping blanks to double underscores in patch file names. GNN has tested this, it appears to be working for eclipse 4.2. Clement copied as last committer of the affected code so he can learn from our pain :-) Please either commit or approve of my committing the patch. A copy of the patch is available at http://people.freebsd.org/~mandree/b.p.m.makepatch-v2.patch To be applied in ports' head/Mk directory. >How-To-Repeat: >Fix: Index: bsd.port.mk =================================================================== --- bsd.port.mk (Revision 324676) +++ bsd.port.mk (Arbeitskopie) @@ -1134,15 +1134,16 @@ .if !target(makepatch) makepatch: @${MKDIR} ${FILESDIR} - @(cd ${PATCH_WRKSRC}; \ + @(cd ${PATCH_WRKSRC} && \ + IFS="`printf '\n\t'`" && \ for i in `find . -type f -name '*.orig'`; do \ - ORG=$$i; \ - NEW=$${i%.orig}; \ - OUT=${FILESDIR}`${ECHO} $${NEW} | \ - ${SED} -e 's|/|__|g' \ - -e 's|^\.__|/patch-|'`; \ - ${ECHO} ${DIFF} -ud $${ORG} $${NEW} '>' $${OUT}; \ - ${DIFF} -ud $${ORG} $${NEW} > $${OUT} || ${TRUE}; \ + ORG="$$i"; \ + NEW="$${i%.orig}"; \ + OUT="${FILESDIR}`${ECHO} $${NEW} | \ + ${SED} -e 's|[/ ]|__|g' \ + -e 's|^\.__|/patch-|'`"; \ + ${ECHO} ${DIFF} -ud "$${ORG}" "$${NEW}" '>' "$${OUT}"; \ + ${DIFF} -ud "$${ORG}" "$${NEW}" > "$${OUT}" || ${TRUE}; \ done \ ) .endif =================================================================== >Release-Note: >Audit-Trail: >Unformatted: