From nobody@FreeBSD.org  Sun Aug 18 03:44:55 2013
Return-Path: <nobody@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 E819AF9B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 18 Aug 2013 03:44:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id B74632C47
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 18 Aug 2013 03:44:55 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7I3itJq048816
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 18 Aug 2013 03:44:55 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7I3itlX048815;
	Sun, 18 Aug 2013 03:44:55 GMT
	(envelope-from nobody)
Message-Id: <201308180344.r7I3itlX048815@oldred.freebsd.org>
Date: Sun, 18 Aug 2013 03:44:55 GMT
From: Chie Taguchi <taguchi.ch@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: incompatibility between bsdpatch and gnupatch dealing of filename's delimiter
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181369
>Category:       bin
>Synopsis:       incompatibility between bsdpatch and gnupatch dealing of filename's delimiter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 18 03:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun Aug 18 06:30:00 UTC 2013
>Originator:     Chie Taguchi
>Release:        FreeBSD 10-CURRENT
>Organization:
>Environment:
FreeBSD raspberry-pi 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Tue Aug 13 03:22:23 JST 2013     user@arty:/usr/home/user/crochet-freebsd/work/obj/arm.armv6/usr/src.arm/sys/RPI-B-ELY  arm
>Description:
During my building, i got a patch error, following:

===>   Applying FreeBSD patch /usr/ports/x11-servers/xorg-server/files/patch-
Xserver-hw-xfree86-os-support-bsd-Makefile.in
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
rams/Xserver/hw/xfree86/os-support/bsd/Makefile.in 
|--- 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.
-----error-end


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.

>Fix:


>Release-Note:
>Audit-Trail:

From: DEV Nexen <devnexen@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: misc/181369
Date: Sun, 18 Aug 2013 07:22:18 +0100

 --001a11c21cb0a9aea204e432d967
 Content-Type: multipart/alternative; boundary=001a11c21cb0a9ae9e04e432d965
 
 --001a11c21cb0a9ae9e04e432d965
 Content-Type: text/plain; charset=ISO-8859-1
 
 
 
 --001a11c21cb0a9ae9e04e432d965
 Content-Type: text/html; charset=ISO-8859-1
 
 <div dir="ltr"><br></div>
 
 --001a11c21cb0a9ae9e04e432d965--
 --001a11c21cb0a9aea204e432d967
 Content-Type: text/plain; charset=US-ASCII; name="patch.txt"
 Content-Disposition: attachment; filename="patch.txt"
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_hkhvd9ht0
 
 LS0tIHV0aWwuYy5vcmlnCTIwMTMtMDgtMTcgMTQ6NTQ6NDQuMDAwMDAwMDAwICswMTAwCisrKyB1
 dGlsLmMJMjAxMy0wOC0xOCAwNzoxMzozOS4wMDAwMDAwMDAgKzAxMDAKQEAgLTQwMiwxMiArNDAy
 LDE2IEBACiAJbmFtZSA9IGZ1bGxuYW1lID0gdCA9IHNhdmVzdHIoYXQpOwogCiAJLyogU3RyaXAg
 b2ZmIHVwIHRvIGBzbGVhZGluZycgbGVhZGluZyBzbGFzaGVzIGFuZCBudWxsIHRlcm1pbmF0ZS4g
 Ki8KLQlmb3IgKDsgKnQgJiYgIWlzc3BhY2UoKHVuc2lnbmVkIGNoYXIpKnQpOyB0KyspCisJZm9y
 ICg7ICp0ICYmICp0IT0nXHQnICYmICp0IT0nXG4nOyB0KyspCisJCS8qIFJlcGxhY2UgYW55IHNw
 YWNlIGJ5IDB4MjAgKi8KKwkJaWYgKGlzc3BhY2UoKHVuc2lnbmVkIGNoYXIpICp0KSkKKwkJCWlm
 ICgqKHQrMSkgJiYgKCoodCsxKSA9PSAnXHQnKSkKKwkJCQlicmVhazsKKwkJCSp0ID0gMHgyMDsK
 IAkJaWYgKCp0ID09ICcvJykKIAkJCWlmICgtLXNsZWFkaW5nID49IDApCiAJCQkJbmFtZSA9IHQg
 KyAxOwogCSp0ID0gJ1wwJzsKLQogCS8qCiAJICogSWYgbm8gLXAgb3B0aW9uIHdhcyBnaXZlbiAo
 OTU3IGlzIHRoZSBkZWZhdWx0IHZhbHVlISksCiAJICogd2Ugd2VyZSBnaXZlbiBhIHJlbGF0aXZl
 IHBhdGhuYW1lLAo=
 --001a11c21cb0a9aea204e432d967--
>Unformatted:
