Bug 181271

Summary: [PATCH] let bsd.port.mk's makepatch support spaces in filenames
Product: Ports & Packages Reporter: Matthias Andree <mandree>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Open ---    
Severity: Affects Only Me CC: portmgr
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

Description Matthias Andree freebsd_committer 2013-08-13 19:30:00 UTC
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

To be applied in ports' head/Mk directory.
Comment 1 Edwin Groothuis freebsd_committer 2013-08-13 19:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Matthias Andree freebsd_committer 2013-08-13 19:56:18 UTC
This is a multi-part message in MIME format.
Comment 3 Matthias Andree freebsd_committer 2013-09-29 13:54:41 UTC
Comment 4 Bryan Drewery freebsd_committer 2013-09-29 14:20:44 UTC
Responsible Changed
From-To: portmgr->bdrewery

take to test. Note you have an extra 'echo rm' on the last line.
Comment 5 Bryan Drewery freebsd_committer 2013-09-29 14:41:46 UTC
This patch is fine with 1. removing the 'echo rm' 2. s/rm/${RM}/ and 3.
style cleanups. However, patch(1) doesn't work for me with files with
spaces on 9-stable r247421

Bryan Drewery
Comment 6 Matthias Andree freebsd_committer 2013-11-20 22:54:01 UTC
This is a multi-part message in MIME format.
Comment 7 Bryan Drewery freebsd_committer 2014-11-13 22:06:17 UTC
(In reply to Matthias Andree from comment #6)
> This is a multi-part message in MIME format.

Comment 8 Mathieu Arnold freebsd_committer 2015-06-13 03:00:22 UTC
Could you send an updated patch ?
Comment 9 Matthias Andree freebsd_committer 2019-09-04 16:50:26 UTC
invalid status change reverted
Comment 10 Matthias Andree freebsd_committer 2020-07-21 21:20:17 UTC
reopen. I figured the patch does not apply, not even with wiggle, so I'll need to reproduce its effects and heed comments #5 and #8.

Note that there's some somewhat newer stuff for portmgr@ in reviews.f.o to keep you from getting bored.