Bug 181369 - incompatibility between bsdpatch and gnupatch dealing of filename's delimiter
Summary: incompatibility between bsdpatch and gnupatch dealing of filename's delimiter
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
Depends on:
Reported: 2013-08-18 04:50 UTC by Chie Taguchi
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:

patch.txt (638 bytes, text/plain; charset=US-ASCII)
2013-08-18 07:22 UTC, David Carlier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chie Taguchi 2013-08-18 04:50:00 UTC
During my building, i got a patch error, following:

===>   Applying FreeBSD patch /usr/ports/x11-servers/xorg-server/files/patch-
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
|Index: programs/Xserver/hw/xfree86/os-support/bsd/Makefile.in 
|diff -u -p programs/Xserver/hw/xfree86/os-support/bsd/Makefile.in orig prog
|--- hw/xfree86/os-support/bsd/Makefile.in .orig        Tue Oct  4 01:46:14 2005
|+++ hw/xfree86/os-support/bsd/Makefile.in      Thu Jan 26 14:57:56 2006
File to patch: ^C
root@raspberry-pi:/usr/ports/x11-servers/xorg-server # => Patch patch-Xserv
er-hw-xfree86-os-support-bsd-Makefile.in failed to apply cleanly.

i find this error caused by a space after filename 'Makefile.in '.
and this error made by only bsdpatch, not gnupatch.
because of bsdpatch see filename's space is not a delimiter, but gnupatch
 see it a delimiter.
i think this difference maybe a specification for bsdpatch, not a bug,
 because bsdpatch can deal filename, inside-space.

but it is not good for developers to exist such incompatibility between
 bsdpatch and gnupatch.

How-To-Repeat: suffix a space at filename in any patchfile, example:

--- hw/xfree86/xorgconf.cpp.orig        Fri Dec 31 14:40:27 2004
+++ hw/xfree86/xorgconf.cpp     Fri Dec 31 14:40:28 2004

add a space 'hw/xfree86/xorgconf.cpp'-> 'hw/xfree86/xorgconf.cpp '

# patch < patchfile
it will fail to patch. but,
# gnupatch < patchfile
it will success to patch.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:30 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped