Bug 181271 - [PATCH] let bsd.port.mk's makepatch support spaces in filenames
Summary: [PATCH] let bsd.port.mk's makepatch support spaces in filenames
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
Depends on:
Reported: 2013-08-13 19:30 UTC by Matthias Andree
Modified: 2019-09-04 16:50 UTC (History)
1 user (show)

See Also:

file.diff (978 bytes, patch)
2013-08-13 19:30 UTC, Matthias Andree
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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