From MAILER-DAEMON Thu Apr 05 18:36:07 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SFvHi-0006kT-VR
	for mharc-bug-patch@gnu.org; Thu, 05 Apr 2012 18:36:06 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55130)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SFny9-0000Ef-1m
	for bug-patch@gnu.org; Thu, 05 Apr 2012 10:47:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SFny4-0008Gn-FI
	for bug-patch@gnu.org; Thu, 05 Apr 2012 10:47:22 -0400
Received: from cantor2.suse.de ([195.135.220.15]:35482 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SFny4-0008CY-8d
	for bug-patch@gnu.org; Thu, 05 Apr 2012 10:47:20 -0400
Received: from relay1.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 7A5EBA0FED
	for <bug-patch@gnu.org>; Thu,  5 Apr 2012 16:47:09 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: bug-patch@gnu.org
Date: Thu, 5 Apr 2012 16:47:08 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201204051647.08472.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
X-Mailman-Approved-At: Thu, 05 Apr 2012 18:36:04 -0400
Subject: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 05 Apr 2012 14:47:30 -0000

Hi developers,

Last stable release of GNU patch was over 2 years ago. Last alpha 
snapshot was 1 year ago. Maybe it's time for another alpha snapshot at 
least, and preferably a stable release? It's a little sad to see all the 
development efforts that went into the project during the past 2 years 
and users aren't benefiting from these.

Thanks,
-- 
Jean Delvare
Suse L3


From MAILER-DAEMON Fri Apr 06 08:10:12 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SG7zY-00034t-T1
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 08:10:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57439)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SG7zR-00033P-Js
	for bug-patch@gnu.org; Fri, 06 Apr 2012 08:10:12 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SG7zO-0005pQ-Jt
	for bug-patch@gnu.org; Fri, 06 Apr 2012 08:10:05 -0400
Received: from cantor2.suse.de ([195.135.220.15]:38145 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SG7zO-0005n6-DQ
	for bug-patch@gnu.org; Fri, 06 Apr 2012 08:10:02 -0400
Received: from relay1.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 077A9915A2;
	Fri,  6 Apr 2012 14:10:00 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: Jim Meyering <meyering@redhat.com>, Andreas Gruenbacher <agruen@linbit.com>
Date: Fri, 6 Apr 2012 14:09:58 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201204061409.58919.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
Cc: bug-patch@gnu.org
Subject: [bug-patch] Broken patch commit: don't warn twice about the same
	invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 12:10:12 -0000

Hi Jim, Andreas,

This commit of yours to the patch repository:

commit e0f707523cab26f74ec23f4a20a27add8702ed5b
Author: Jim Meyering <meyering@redhat.com>
Date:   Thu Feb 17 09:59:56 2011 +0100

    don't warn twice about the same invalid file name

    * src/pch.c (name_is_valid): Don't warn about the same name twice.
    * tests/bad-filenames (emit_patch): Exercise the new code.

is broken. bad[] holds pointers to the name strings, and these get freed 
when switching to the next hunk in the patch file (if I read the code 
properly...) So you end up accessing freed memory. Valgrind complains 
about that and the code will eventually fail, as was reported by an 
openSUSE user:

https://bugzilla.novell.com/show_bug.cgi?id=755136

I don't think the code even actually does what it is supposed to, as it 
can only store 2 bad names (the slots are never freed), while a given 
patch file could contain a lot more. I tried to fix it but couldn't come 
up with something easy and elegant, it seems that implementing it 
properly would need a lot more code. As this feature doesn't strike me 
as a fundamental one, I'll just revert the commit for now, and I suggest 
you do the same.

Thanks,
-- 
Jean Delvare
Suse L3


From MAILER-DAEMON Fri Apr 06 09:07:04 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SG8sa-0002DC-Al
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 09:07:04 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55046)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SG8sS-0002CV-6g
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:07:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SG8sM-0002lb-O6
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:06:55 -0400
Received: from mail-lb0-f169.google.com ([209.85.217.169]:55865)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SG8sM-0002kq-9s
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:06:50 -0400
Received: by lbao2 with SMTP id o2so760280lba.0
	for <bug-patch@gnu.org>; Fri, 06 Apr 2012 06:06:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=KfLfT6/0ZIHgSQXTQHNxyTkG+c8XMHyH1cvppw0HZbw=;
	b=wjEu15tQfJ87/qqjsoDkSu1giK+AbOATMPiAb1mCf4nb5UPGPROFvg8NCI/EYDIigE
	wN4Vkwl+MsiGiUbfWejh/l4PMJHQOni+bE8yX3pv/bY1cd+BYk3BM3GS0qXxJ+sU2hDS
	AmRTvTml+1SnKtzsefBMQPXaBvqj/StdlpY0uzF0hs8tTVEfJqlR3HwtXZuZMpA3r93c
	Pik0NIBMkGrZIWMESOP6OkI0QD/oEqoZtyUODhSVskzu20dCAg3GNfnh4YCX5vGMgXzF
	sy66LdaQOxRcx1FABpzS7VKsnSsXQrMRKw01u+zp3OBFbspXnYCZVXZi6FL4SElbGye7
	Ia6g==
MIME-Version: 1.0
Received: by 10.152.131.74 with SMTP id ok10mr8577103lab.17.1333717607379;
	Fri, 06 Apr 2012 06:06:47 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Fri, 6 Apr 2012 06:06:47 -0700 (PDT)
In-Reply-To: <201204061409.58919.jdelvare@suse.de>
References: <201204061409.58919.jdelvare@suse.de>
Date: Fri, 6 Apr 2012 15:06:47 +0200
Message-ID: <CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Jean Delvare <jdelvare@suse.de>
Content-Type: multipart/mixed; boundary=f46d04339db437f32304bd0254ba
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.217.169
Cc: Jim Meyering <meyering@redhat.com>, bug-patch@gnu.org
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
 same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 13:07:02 -0000

--f46d04339db437f32304bd0254ba
Content-Type: text/plain; charset=ISO-8859-1

Jean,

Am 6. April 2012 14:09 schrieb Jean Delvare <jdelvare@suse.de>:
> This commit [...] is broken.
> bad[] holds pointers to the name strings, and these get freed
> when switching to the next hunk in the patch file (if I read the code
> properly...) So you end up accessing freed memory. Valgrind complains
> about that and the code will eventually fail, as was reported by an
> openSUSE user:
>
> https://bugzilla.novell.com/show_bug.cgi?id=755136
>
> I don't think the code even actually does what it is supposed to, as it
> can only store 2 bad names (the slots are never freed), while a given
> patch file could contain a lot more.

Thanks. We are actually only interested in each patch here, not in all the
patches that could be in the same input file. How about the attached change
for a fix?

Andreas

--f46d04339db437f32304bd0254ba
Content-Type: text/x-patch; charset=US-ASCII; 
	name="0001-Fix-use-after-free-bug-in-name_is_valid.patch"
Content-Disposition: attachment; 
	filename="0001-Fix-use-after-free-bug-in-name_is_valid.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h0p8ywe41

RnJvbSA1OTNkNzk5NzcwNmU1MjMwNjllMGYxYzFhMzMzMGU5MjAxYWFiNDQyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBbmRyZWFzIEdydWVuYmFjaGVyIDxhZ3J1ZW5AbGluYml0LmNv
bT4KRGF0ZTogRnJpLCA2IEFwciAyMDEyIDE0OjQzOjMzICswMjAwClN1YmplY3Q6IFtQQVRDSF0g
Rml4IHVzZS1hZnRlci1mcmVlIGJ1ZyBpbiBuYW1lX2lzX3ZhbGlkKCkKCiogc3JjL2NvbW1vbi5o
IChBUlJBWV9TSVpFKTogTmV3IG1hY3JvLgoqIHNyYy9wY2guYyAoaW52YWxpZF9uYW1lcyk6IE5l
dyBnbG9iYWwgdmFyaWFibGUgZm9yIHJlbWVtYmVyaW5nIGJhZCBuYW1lcy4KKGludHVpdF9kaWZm
X3R5cGUpOiBSZXNldCBpbnZhbGlkX25hbWVzIGZvciBlYWNoIG5ldyBwYXRjaDsgdGhlIG5hbWVz
IGZyb20gdGhlCnByZXZpb3VzIHBhdGNoIGhhdmUgYWxyZWFkeSBiZWVuIGZyZWVkLgoobmFtZV9p
c192YWxpZCk6IFVzZSBpbnZhbGlkX25hbWVzLiAgTWFrZSB0aGUgY29kZSAic2FmZXIiIGFuZCBh
dm9pZApkdXBsaWNhdGlvbi4KLS0tCiBzcmMvY29tbW9uLmggfCAgICAxICsKIHNyYy9wY2guYyAg
ICB8ICAgNTIgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0t
LS0tLQogMiBmaWxlcyBjaGFuZ2VkLCAzMiBpbnNlcnRpb25zKCspLCAyMSBkZWxldGlvbnMoLSkK
CmRpZmYgLS1naXQgYS9zcmMvY29tbW9uLmggYi9zcmMvY29tbW9uLmgKaW5kZXggZDkxZjY5Ni4u
YmM5M2U1OSAxMDA2NDQKLS0tIGEvc3JjL2NvbW1vbi5oCisrKyBiL3NyYy9jb21tb24uaApAQCAt
NjIsNiArNjIsNyBAQAogCiAjZGVmaW5lIHN0ckVRKHMxLHMyKSAoIXN0cmNtcChzMSwgczIpKQog
I2RlZmluZSBzdHJuRVEoczEsczIsbCkgKCFzdHJuY21wKHMxLCBzMiwgbCkpCisjZGVmaW5lIEFS
UkFZX1NJWkUoYSkgKHNpemVvZiAoYSkgLyBzaXplb2YgKChhKVswXSkpCiAKIC8qIHR5cGVkZWZz
ICovCiAKZGlmZiAtLWdpdCBhL3NyYy9wY2guYyBiL3NyYy9wY2guYwppbmRleCA2YjA2MDVlLi5h
MDdmMjkxIDEwMDY0NAotLS0gYS9zcmMvcGNoLmMKKysrIGIvc3JjL3BjaC5jCkBAIC00Miw2ICs0
Miw3IEBAIHN0YXRpYyBpbnQgcF9zYXlzX25vbmV4aXN0ZW50WzJdOwkvKiBbMF0gZm9yIG9sZCBm
aWxlLCBbMV0gZm9yIG5ldzoKIAkJMiBmb3Igbm9uZXhpc3RlbnQgKi8KIHN0YXRpYyBpbnQgcF9y
ZmM5MzRfbmVzdGluZzsJCS8qIFJGQyA5MzQgbmVzdGluZyBsZXZlbCAqLwogc3RhdGljIGNoYXIg
KnBfbmFtZVszXTsJCQkvKiBmaWxlbmFtZXMgaW4gcGF0Y2ggaGVhZGVycyAqLworc3RhdGljIGNo
YXIgY29uc3QgKmludmFsaWRfbmFtZXNbMl07CiBib29sIHBfY29weVsyXTsJCQkJLyogRG9lcyB0
aGlzIHBhdGNoIGNyZWF0ZSBhIGNvcHk/ICovCiBib29sIHBfcmVuYW1lWzJdOwkJCS8qIERvZXMg
dGhpcyBwYXRjaCByZW5hbWUgYSBmaWxlPyAqLwogc3RhdGljIGNoYXIgKnBfdGltZXN0clsyXTsJ
CS8qIHRpbWVzdGFtcHMgYXMgc3RyaW5ncyAqLwpAQCAtMzc5LDM0ICszODAsNDEgQEAgc2tpcF9o
ZXhfZGlnaXRzIChjaGFyIGNvbnN0ICpzdHIpCiBzdGF0aWMgYm9vbAogbmFtZV9pc192YWxpZCAo
Y2hhciBjb25zdCAqbmFtZSkKIHsKLSAgc3RhdGljIGNoYXIgY29uc3QgKmJhZFsyXTsKICAgY2hh
ciBjb25zdCAqbjsKKyAgaW50IGk7CisgIGJvb2wgaXNfdmFsaWQgPSB0cnVlOwogCi0gIGlmIChi
YWRbMF0gJiYgISBzdHJjbXAgKGJhZFswXSwgbmFtZSkpCi0gICAgcmV0dXJuIGZhbHNlOwotICBp
ZiAoYmFkWzFdICYmICEgc3RyY21wIChiYWRbMV0sIG5hbWUpKQotICAgIHJldHVybiBmYWxzZTsK
KyAgZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUgKGludmFsaWRfbmFtZXMpOyBpKyspCisgICAg
eworICAgICAgaWYgKCEgaW52YWxpZF9uYW1lc1tpXSkKKwlicmVhazsKKyAgICAgIGlmICghIHN0
cmNtcCAoaW52YWxpZF9uYW1lc1tpXSwgbmFtZSkpCisJcmV0dXJuIGZhbHNlOworICAgIH0KIAog
ICBpZiAoSVNfQUJTT0xVVEVfRklMRV9OQU1FIChuYW1lKSkKKyAgICBpc192YWxpZCA9IGZhbHNl
OworICBlbHNlCisgICAgZm9yIChuID0gbmFtZTsgKm47ICkKKyAgICAgIHsKKwlpZiAoKm4gPT0g
Jy4nICYmICorK24gPT0gJy4nICYmICggISAqKytuIHx8IElTU0xBU0ggKCpuKSkpCisJICB7CisJ
ICAgIGlzX3ZhbGlkID0gZmFsc2U7CisJICAgIGJyZWFrOworCSAgfQorCXdoaWxlICgqbiAmJiAh
IElTU0xBU0ggKCpuKSkKKwkgIG4rKzsKKwl3aGlsZSAoSVNTTEFTSCAoKm4pKQorCSAgbisrOwor
ICAgICAgfQorCisgIGlmICghIGlzX3ZhbGlkKQogICAgIHsKICAgICAgIHNheSAoIklnbm9yaW5n
IHBvdGVudGlhbGx5IGRhbmdlcm91cyBmaWxlIG5hbWUgJXNcbiIsIHF1b3RlYXJnIChuYW1lKSk7
Ci0gICAgICBiYWRbISEgYmFkWzBdXSA9IG5hbWU7Ci0gICAgICByZXR1cm4gZmFsc2U7Ci0gICAg
fQotICBmb3IgKG4gPSBuYW1lOyAqbjsgKQotICAgIHsKLSAgICAgIGlmICgqbiA9PSAnLicgJiYg
KisrbiA9PSAnLicgJiYgKCAhICorK24gfHwgSVNTTEFTSCAoKm4pKSkKLSAgICAgICAgewotCSAg
c2F5ICgiSWdub3JpbmcgcG90ZW50aWFsbHkgZGFuZ2Vyb3VzIGZpbGUgbmFtZSAlc1xuIiwgcXVv
dGVhcmcgKG5hbWUpKTsKLQkgIGJhZFshISBiYWRbMF1dID0gbmFtZTsKLQkgIHJldHVybiBmYWxz
ZTsKLQl9Ci0gICAgICB3aGlsZSAoKm4gJiYgISBJU1NMQVNIICgqbikpCi0JbisrOwotICAgICAg
d2hpbGUgKElTU0xBU0ggKCpuKSkKLQluKys7CisgICAgICBpZiAoaSA8IEFSUkFZX1NJWkUgKGlu
dmFsaWRfbmFtZXMpKQorCWludmFsaWRfbmFtZXNbaV0gPSBuYW1lOwogICAgIH0KLSAgcmV0dXJu
IHRydWU7CisgIHJldHVybiBpc192YWxpZDsKIH0KIAogLyogRGV0ZXJtaW5lIHdoYXQga2luZCBv
ZiBkaWZmIGlzIGluIHRoZSByZW1haW5pbmcgcGFydCBvZiB0aGUgcGF0Y2ggZmlsZS4gKi8KQEAg
LTQzNCw2ICs0NDIsOCBAQCBpbnR1aXRfZGlmZl90eXBlIChib29sIG5lZWRfaGVhZGVyLCBtb2Rl
X3QgKnBfZmlsZV90eXBlKQogCSAgZnJlZSAocF9uYW1lW2ldKTsKIAkgIHBfbmFtZVtpXSA9IDA7
CiAgICAgICAgIH0KKyAgICBmb3IgKGkgPSAwOyBpIDwgQVJSQVlfU0laRSAoaW52YWxpZF9uYW1l
cyk7IGkrKykKKwlpbnZhbGlkX25hbWVzW2ldID0gTlVMTDsKICAgICBmb3IgKGkgPSBPTEQ7IGkg
PD0gTkVXOyBpKyspCiAgICAgICBpZiAocF90aW1lc3RyW2ldKQogCXsKLS0gCjEuNy43LjYKCg==
--f46d04339db437f32304bd0254ba--


From MAILER-DAEMON Fri Apr 06 09:25:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SG9Ar-0005RI-W3
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 09:25:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:43590)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SG9Ak-0005QQ-OM
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:25:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SG9Aa-0007MU-L1
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:25:50 -0400
Received: from mx.meyering.net ([88.168.87.75]:54597)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SG9Aa-0007Lv-53
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:25:40 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0826E6008A;
	Fri,  6 Apr 2012 15:25:30 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Andreas =?iso-8859-1?Q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
In-Reply-To: <CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
	("Andreas \=\?iso-8859-1\?Q\?Gr\=FCnbacher\=22's\?\= message of "Fri,
	6 Apr 2012 15:06:47 +0200")
References: <201204061409.58919.jdelvare@suse.de>
	<CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
Date: Fri, 06 Apr 2012 15:25:30 +0200
Message-ID: <8762ddouut.fsf@rho.meyering.net>
Lines: 95
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 13:25:56 -0000

Andreas Gr=FCnbacher wrote:
> Am 6. April 2012 14:09 schrieb Jean Delvare <jdelvare@suse.de>:
>> This commit [...] is broken.
>> bad[] holds pointers to the name strings, and these get freed
>> when switching to the next hunk in the patch file (if I read the code
>> properly...) So you end up accessing freed memory. Valgrind complains
>> about that and the code will eventually fail, as was reported by an
>> openSUSE user:
>>
>> https://bugzilla.novell.com/show_bug.cgi?id=3D755136
>>
>> I don't think the code even actually does what it is supposed to, as it
>> can only store 2 bad names (the slots are never freed), while a given
>> patch file could contain a lot more.
>
> Thanks. We are actually only interested in each patch here, not in all the
> patches that could be in the same input file. How about the attached chan=
ge
> for a fix?
>
> Andreas
>
> From 593d7997706e523069e0f1c1a3330e9201aab442 Mon Sep 17 00:00:00 2001
> From: Andreas Gruenbacher <agruen@linbit.com>
> Date: Fri, 6 Apr 2012 14:43:33 +0200
> Subject: [PATCH] Fix use-after-free bug in name_is_valid()
>
> * src/common.h (ARRAY_SIZE): New macro.
> * src/pch.c (invalid_names): New global variable for remembering bad name=
s.
> (intuit_diff_type): Reset invalid_names for each new patch; the names fro=
m the
> previous patch have already been freed.
> (name_is_valid): Use invalid_names.  Make the code "safer" and avoid
> duplication.

For the record, here's an alternative that's smaller and more local
(i.e., doesn't add a new global), at the expense of allocating a copy
of each invalid name on the heap.

I've verified that it avoids the problem and does not introduce a leak.

Andreas, if you prefer this one, let me know and I'll add comments
and prepare a complete patch.


diff --git a/src/pch.c b/src/pch.c
index 6b0605e..10968d0 100644
--- a/src/pch.c
+++ b/src/pch.c
@@ -23,6 +23,7 @@
 #include <dirname.h>
 #include <inp.h>
 #include <quotearg.h>
+#include <xalloc.h>
 #include <util.h>
 #undef XTERN
 #define XTERN
@@ -376,10 +377,19 @@ skip_hex_digits (char const *str)
   return s =3D=3D str ? NULL : s;
 }

+static void
+add_bad (char *bad[], char const *name)
+{
+  char **p =3D &bad[!! bad[0]];
+  say ("Ignoring potentially dangerous file name %s\n", quotearg (name));
+  free (*p);
+  *p =3D xstrdup (name);
+}
+
 static bool
 name_is_valid (char const *name)
 {
-  static char const *bad[2];
+  static char *bad[2];
   char const *n;

   if (bad[0] && ! strcmp (bad[0], name))
@@ -389,16 +399,14 @@ name_is_valid (char const *name)

   if (IS_ABSOLUTE_FILE_NAME (name))
     {
-      say ("Ignoring potentially dangerous file name %s\n", quotearg (name=
));
-      bad[!! bad[0]] =3D name;
+      add_bad (bad, name);
       return false;
     }
   for (n =3D name; *n; )
     {
       if (*n =3D=3D '.' && *++n =3D=3D '.' && ( ! *++n || ISSLASH (*n)))
         {
-	  say ("Ignoring potentially dangerous file name %s\n", quotearg (name));
-	  bad[!! bad[0]] =3D name;
+	  add_bad (bad, name);
 	  return false;
 	}
       while (*n && ! ISSLASH (*n))


From MAILER-DAEMON Fri Apr 06 09:30:23 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SG9F9-00075t-0b
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 09:30:23 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48259)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SG9F6-00075X-VO
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:30:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SG9F0-0000dM-J4
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:30:20 -0400
Received: from mx.meyering.net ([88.168.87.75]:54608)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SG9F0-0000dC-As
	for bug-patch@gnu.org; Fri, 06 Apr 2012 09:30:14 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id C695B6008A;
	Fri,  6 Apr 2012 15:30:12 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Andreas =?iso-8859-1?Q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
In-Reply-To: <CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
	("Andreas \=\?iso-8859-1\?Q\?Gr\=FCnbacher\=22's\?\= message of "Fri,
	6 Apr 2012 15:06:47 +0200")
References: <201204061409.58919.jdelvare@suse.de>
	<CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
Date: Fri, 06 Apr 2012 15:30:12 +0200
Message-ID: <87vcldng2j.fsf@rho.meyering.net>
Lines: 47
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 13:30:22 -0000

Andreas Gr=FCnbacher wrote:

> Jean,
>
> Am 6. April 2012 14:09 schrieb Jean Delvare <jdelvare@suse.de>:
>> This commit [...] is broken.
>> bad[] holds pointers to the name strings, and these get freed
>> when switching to the next hunk in the patch file (if I read the code
>> properly...) So you end up accessing freed memory. Valgrind complains
>> about that and the code will eventually fail, as was reported by an
>> openSUSE user:
>>
>> https://bugzilla.novell.com/show_bug.cgi?id=3D755136
>>
>> I don't think the code even actually does what it is supposed to, as it
>> can only store 2 bad names (the slots are never freed), while a given
>> patch file could contain a lot more.
>
> Thanks. We are actually only interested in each patch here, not in all the
> patches that could be in the same input file. How about the attached chan=
ge
> for a fix?
>
> Andreas
>
> From 593d7997706e523069e0f1c1a3330e9201aab442 Mon Sep 17 00:00:00 2001
> From: Andreas Gruenbacher <agruen@linbit.com>
> Date: Fri, 6 Apr 2012 14:43:33 +0200
> Subject: [PATCH] Fix use-after-free bug in name_is_valid()
>
> * src/common.h (ARRAY_SIZE): New macro.
> * src/pch.c (invalid_names): New global variable for remembering bad name=
s.
> (intuit_diff_type): Reset invalid_names for each new patch; the names fro=
m the
> previous patch have already been freed.
> (name_is_valid): Use invalid_names.  Make the code "safer" and avoid
> duplication.

Hi Andreas,

Regardless of which patch you use,
IMHO, is is important to reference both the name of the reporter
and the bugzilla URL in the commit log.
Also useful: to include a reference like v2.6.1-115-ge0f7075
to the commit that introduced the bug. I.e.,

    Reported by Steffen Sledz in
    https://bugzilla.novell.com/show_bug.cgi?id=3D755136 via Jean Delvare.
    Bug introduced in commit v2.6.1-115-ge0f7075.


From MAILER-DAEMON Fri Apr 06 12:03:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SGBcs-0006jV-Da
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 12:03:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52399)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGBcp-0006hv-QL
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:03:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGBco-0004wx-5i
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:02:59 -0400
Received: from mail-we0-f169.google.com ([74.125.82.169]:53432)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGBcn-0004vD-To
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:02:58 -0400
Received: by werj55 with SMTP id j55so1931776wer.0
	for <bug-patch@gnu.org>; Fri, 06 Apr 2012 09:02:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	bh=OWe5czeBj+dG08fKhENRt8aqkZfHOg6w1X/4wzBvXas=;
	b=E+XjxSMfYLIIEB+kkWe75dAWwTwDVRWm/ikFaiqJCMRuqtFat6tJmxL0OydN9LzA5b
	rW08ljQBeoWyG5Jv9BEEqdEng2hPk/emBH6BxI9hJTqQ9AfZkzlUmgsOPSvGm46eBhQB
	/gHrsWIgR3nSCpvbDJcS/rw7m29zm2LpqN5wVX3B1LMaSb5BLKaRadKM6iyR7XbFKeLO
	vnAlkdIm29xXlfjiuFVaYpVQgx9kH9wEvJMbQuChr6U5wBc/1qhYs9N40VeWt0U3mk++
	BNZveBRz2l5HJBG073sJDRDouP/eBsPMpVEqAua7eDQLZoLkMSfrF1n7Ok6qHwumyITD
	5zeg==
Received: by 10.180.101.136 with SMTP id fg8mr20841858wib.4.1333728175590;
	Fri, 06 Apr 2012 09:02:55 -0700 (PDT)
Received: from murkel.localnet ([86.59.100.100])
	by mx.google.com with ESMTPS id h8sm12278070wix.4.2012.04.06.09.02.54
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 06 Apr 2012 09:02:54 -0700 (PDT)
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
To: Jim Meyering <jim@meyering.net>
Date: Fri, 6 Apr 2012 18:02:46 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; )
References: <201204061409.58919.jdelvare@suse.de>
	<CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
	<8762ddouut.fsf@rho.meyering.net>
In-Reply-To: <8762ddouut.fsf@rho.meyering.net>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201204061802.48774.andreas.gruenbacher@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.125.82.169
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 16:03:01 -0000

Jim,

On Friday 06 April 2012 15:25:30 Jim Meyering wrote:
> +static void
> +add_bad (char *bad[], char const *name)
> +{
> +  char **p = &bad[!! bad[0]];

we remember the first and last bad name here, not all the bad names of the 
last patch (bad[0] is never cleared), so that's a bug.

I don't see the benefit of remembering all names; patches that modify the same 
file more than once are pretty rare.  So this approach doesn't look better 
than the alternative to me.  Thanks for offering that solution though!

> +  say ("Ignoring potentially dangerous file name %s\n", quotearg (name));
> +  free (*p);
> +  *p = xstrdup (name);
> +}

Andreas


From MAILER-DAEMON Fri Apr 06 12:05:39 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SGBfP-0007Fx-Oc
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 12:05:39 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44809)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGBfM-0007F5-V1
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:05:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGBfK-0006Gk-S3
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:05:36 -0400
Received: from mail-wi0-f171.google.com ([209.85.212.171]:59871)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGBfK-0006Ge-JT
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:05:34 -0400
Received: by wibhj13 with SMTP id hj13so495994wib.12
	for <bug-patch@gnu.org>; Fri, 06 Apr 2012 09:05:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	bh=W0tek4kpjT2ZS3dXxRuwDiGuU+SiLDknqs7k0nC5mrs=;
	b=WYQ8O4LoP5FA3NypWWRaKkCn0bJl9Fal4Ra2t8Z5FgROoaWcaSiWrnDJgzKyDs2TEH
	NpFeqAbB2491PVrz2AemezHW3kpBjoIV9K8SFWm5QUBRNn5QzNTuD83Lx3SI2FFZKS8y
	siQZK9DoXwlDHTtRfLMdv2pHGP40DvfSqDhFkGuh/WNy3mRRw+9v4tWgbpUGLwhZqdUm
	CgQFhTnsBVobCGQhVrUysWCFYIf9Ji01mWNnZX5hBjz2x0JEI2urANp/7xiOLHU6uJ8n
	3Ynhm0ft9tYFTS87KPdIaqVvoAPT6sXjFq18B+0dqi0jK1Fu16ONAqn+sydmR+l6w2vi
	m0gA==
Received: by 10.180.85.70 with SMTP id f6mr20962257wiz.5.1333728332673;
	Fri, 06 Apr 2012 09:05:32 -0700 (PDT)
Received: from murkel.localnet ([86.59.100.100])
	by mx.google.com with ESMTPS id fz9sm7566376wib.3.2012.04.06.09.05.31
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 06 Apr 2012 09:05:32 -0700 (PDT)
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
To: Jim Meyering <jim@meyering.net>
Date: Fri, 6 Apr 2012 18:05:29 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; )
References: <201204061409.58919.jdelvare@suse.de>
	<CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
	<87vcldng2j.fsf@rho.meyering.net>
In-Reply-To: <87vcldng2j.fsf@rho.meyering.net>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201204061805.30783.andreas.gruenbacher@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.171
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 16:05:38 -0000

Jim,

On Friday 06 April 2012 15:30:12 Jim Meyering wrote:
> Regardless of which patch you use,
> IMHO, is is important to reference both the name of the reporter
> and the bugzilla URL in the commit log.
> Also useful: to include a reference like v2.6.1-115-ge0f7075
> to the commit that introduced the bug. I.e.,
> 
>     Reported by Steffen Sledz in
>     https://bugzilla.novell.com/show_bug.cgi?id=755136 via Jean Delvare.
>     Bug introduced in commit v2.6.1-115-ge0f7075.

that makes sense, thanks.

Andreas


From MAILER-DAEMON Fri Apr 06 12:41:54 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SGCEU-0003Kw-CO
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 12:41:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52407)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SGCER-0003Ji-R7
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:41:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SGCEQ-0006Ed-8T
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:41:51 -0400
Received: from mx.meyering.net ([88.168.87.75]:55110)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SGCEP-0006Dr-Pm
	for bug-patch@gnu.org; Fri, 06 Apr 2012 12:41:50 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E5D376008A;
	Fri,  6 Apr 2012 18:41:46 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
In-Reply-To: <201204061802.48774.andreas.gruenbacher@gmail.com> (Andreas
	Gruenbacher's message of "Fri, 6 Apr 2012 18:02:46 +0200")
References: <201204061409.58919.jdelvare@suse.de>
	<CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
	<8762ddouut.fsf@rho.meyering.net>
	<201204061802.48774.andreas.gruenbacher@gmail.com>
Date: Fri, 06 Apr 2012 18:41:46 +0200
Message-ID: <87hawwolrp.fsf@rho.meyering.net>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 16:41:53 -0000

Andreas Gruenbacher wrote:

> Jim,
>
> On Friday 06 April 2012 15:25:30 Jim Meyering wrote:
>> +static void
>> +add_bad (char *bad[], char const *name)
>> +{
>> +  char **p = &bad[!! bad[0]];
>
> we remember the first and last bad name here, not all the bad names of the
> last patch (bad[0] is never cleared), so that's a bug.

Really?  Why?  It's static, so not a real leak.

It's the same code as before, but without the use-after-free.
I see no harm (nor particular benefit) in retaining the first
invalid name in bad[0].

> I don't see the benefit of remembering all names; patches that modify the same
> file more than once are pretty rare.  So this approach doesn't look better
> than the alternative to me.  Thanks for offering that solution though!
>
>> +  say ("Ignoring potentially dangerous file name %s\n", quotearg (name));
>> +  free (*p);
>> +  *p = xstrdup (name);
>> +}
>
> Andreas


From MAILER-DAEMON Fri Apr 06 14:26:03 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SGDrH-0004ar-Rk
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 14:26:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33667)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGDrE-0004Yw-41
	for bug-patch@gnu.org; Fri, 06 Apr 2012 14:26:02 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGDrC-0006T5-Fe
	for bug-patch@gnu.org; Fri, 06 Apr 2012 14:25:59 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:46526)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGDrC-0006So-6n
	for bug-patch@gnu.org; Fri, 06 Apr 2012 14:25:58 -0400
Received: by wibhj13 with SMTP id hj13so590004wib.12
	for <bug-patch@gnu.org>; Fri, 06 Apr 2012 11:25:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	bh=wKKcMgCCxj/m3gRzTNPWY6sj8eif1fmEyU2O7+4FbUs=;
	b=oZek0QkTi7t2zkNZWCw3hyzkYOT7EkUQMQ1MOX5btGV8qFGzACibtfdX7zPm1FUqVj
	FHhuuhbrNKGeQNx9+owaKJeiWuWyt1Srr0yrhMxmIrR2ZP7XePuUkyobTNCo+GLvpcHv
	U3TMu6juBWue1kUU9B4gI7AlNtCUIfT4jymYwPkrIivbbsTUtcwb3QShaCUbmSqSe9uo
	lAjIdwIaN9yY2RGISRv5tNxSi60lD+5iV41S89bU3Nsfy2oVihYEekVdRzNqEzUO7yH9
	EOc9in5MqzMKrLxuI/hUrtcNPrGSzd40Xl3RqsMKmgp5JApVD4j2WCJAIPXNOssBxEcs
	tksg==
Received: by 10.216.144.223 with SMTP id n73mr4386622wej.65.1333736756146;
	Fri, 06 Apr 2012 11:25:56 -0700 (PDT)
Received: from murkel.localnet ([86.59.100.100])
	by mx.google.com with ESMTPS id n15sm8582341wiw.6.2012.04.06.11.25.54
	(version=TLSv1/SSLv3 cipher=OTHER);
	Fri, 06 Apr 2012 11:25:55 -0700 (PDT)
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
To: Jim Meyering <jim@meyering.net>
Date: Fri, 6 Apr 2012 20:25:51 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; )
References: <201204061409.58919.jdelvare@suse.de>
	<201204061802.48774.andreas.gruenbacher@gmail.com>
	<87hawwolrp.fsf@rho.meyering.net>
In-Reply-To: <87hawwolrp.fsf@rho.meyering.net>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Message-Id: <201204062025.53556.andreas.gruenbacher@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 18:26:02 -0000

On Friday 06 April 2012 18:41:46 Jim Meyering wrote:
> Andreas Gruenbacher wrote:
> > we remember the first and last bad name here, not all the bad names of the
> > last patch (bad[0] is never cleared), so that's a bug.
> 
> Really?  Why?  It's static, so not a real leak.
> 
> It's the same code as before, but without the use-after-free.
> I see no harm (nor particular benefit) in retaining the first
> invalid name in bad[0].

That was too unclear, sorry. The new code doesn't introduce a bug, the bug is 
already there.

I can imagine two different behaviors: either we only report each invalid name 
exactly once, globally; or we treat each patch exactly the same. Behavior one 
would require to remember all bad names. I don't think this is needed or 
useful, and I would prefer behavior two. I was assuming that this is what the 
code implements, but it doesn't: it won't report the first invalid name ever 
again.

(The invalid name could be something generic like ".."; it may well be that 
every patch in an input file has the same broken patch header. IMO we should 
report problems like that every time.)

Does this kind of thinking make sense to you?

Thanks,
Andreas


From MAILER-DAEMON Fri Apr 06 16:20:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SGFeT-0004ta-7v
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 16:20:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47178)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SGFeQ-0004sx-SE
	for bug-patch@gnu.org; Fri, 06 Apr 2012 16:20:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SGFeP-0008MY-BX
	for bug-patch@gnu.org; Fri, 06 Apr 2012 16:20:54 -0400
Received: from mx.meyering.net ([88.168.87.75]:55679)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1SGFeP-0008MR-3X
	for bug-patch@gnu.org; Fri, 06 Apr 2012 16:20:53 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8044E60077;
	Fri,  6 Apr 2012 22:20:51 +0200 (CEST)
From: Jim Meyering <jim@meyering.net>
To: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
In-Reply-To: <201204062025.53556.andreas.gruenbacher@gmail.com> (Andreas
	Gruenbacher's message of "Fri, 6 Apr 2012 20:25:51 +0200")
References: <201204061409.58919.jdelvare@suse.de>
	<201204061802.48774.andreas.gruenbacher@gmail.com>
	<87hawwolrp.fsf@rho.meyering.net>
	<201204062025.53556.andreas.gruenbacher@gmail.com>
Date: Fri, 06 Apr 2012 22:20:51 +0200
Message-ID: <87iphcmx24.fsf@rho.meyering.net>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 20:20:56 -0000

Andreas Gruenbacher wrote:

> On Friday 06 April 2012 18:41:46 Jim Meyering wrote:
>> Andreas Gruenbacher wrote:
>> > we remember the first and last bad name here, not all the bad names of the
>> > last patch (bad[0] is never cleared), so that's a bug.
>>
>> Really?  Why?  It's static, so not a real leak.
>>
>> It's the same code as before, but without the use-after-free.
>> I see no harm (nor particular benefit) in retaining the first
>> invalid name in bad[0].
>
> That was too unclear, sorry. The new code doesn't introduce a bug, the bug is
> already there.
>
> I can imagine two different behaviors: either we only report each invalid name
> exactly once, globally; or we treat each patch exactly the same. Behavior one
> would require to remember all bad names. I don't think this is needed or
> useful, and I would prefer behavior two. I was assuming that this is what the
> code implements, but it doesn't: it won't report the first invalid name ever
> again.
>
> (The invalid name could be something generic like ".."; it may well be that
> every patch in an input file has the same broken patch header. IMO we should
> report problems like that every time.)
>
> Does this kind of thinking make sense to you?

That clarifies it.  Thanks.


From MAILER-DAEMON Fri Apr 06 17:03:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SGGJj-0003K1-4n
	for mharc-bug-patch@gnu.org; Fri, 06 Apr 2012 17:03:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39004)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGGJf-0003Jc-Kh
	for bug-patch@gnu.org; Fri, 06 Apr 2012 17:03:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGGJb-0000rQ-Ak
	for bug-patch@gnu.org; Fri, 06 Apr 2012 17:03:31 -0400
Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:38973)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SGGJb-0000qi-1T
	for bug-patch@gnu.org; Fri, 06 Apr 2012 17:03:27 -0400
Received: by lagz14 with SMTP id z14so2992165lag.0
	for <bug-patch@gnu.org>; Fri, 06 Apr 2012 14:03:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=Ma+F76n39DWDYg6KAK4zW9TBHUxaUgJmh47KIEEp5lI=;
	b=PwCfW1M59u39vxTdwvArMD62gyDiinakdPJS+rzLnvk5EJLfEaP9IDRtj94aT0sPsD
	rD5BmS2GIhb/K+vuBoW+zMYJDm3Sp4Gkb+YKtuWroyH6+2DjFexg7RnoQ6myFYdRD/BH
	kr4KZPpTrL91nNFV8cjR79jsRb//fDqVd2FrbMBNqj53RgOjxKmuR/9ePyHzEW/lb5Db
	heFs1r0gd/yDBrWPph4TeuwYgzZoGDNSB97J6I0gxBOcP56TFYpu59NDgiOmz7WOS+Vp
	In+Q1iaOmNWcdwOaE6xaervgZPRe2thhkdaTrAUVN4zWkicePtoIf33jWCqkvniH6MiG
	NzVQ==
MIME-Version: 1.0
Received: by 10.152.146.234 with SMTP id tf10mr10464229lab.31.1333746204657;
	Fri, 06 Apr 2012 14:03:24 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Fri, 6 Apr 2012 14:03:24 -0700 (PDT)
In-Reply-To: <201204051647.08472.jdelvare@suse.de>
References: <201204051647.08472.jdelvare@suse.de>
Date: Fri, 6 Apr 2012 23:03:24 +0200
Message-ID: <CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Jean Delvare <jdelvare@suse.de>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.41
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 06 Apr 2012 21:03:33 -0000

Jean,

Am 5. April 2012 16:47 schrieb Jean Delvare <jdelvare@suse.de>:
> Hi developers,
>
> Last stable release of GNU patch was over 2 years ago. Last alpha
> snapshot was 1 year ago. Maybe it's time for another alpha snapshot at
> least, and preferably a stable release? It's a little sad to see all the
> development efforts that went into the project during the past 2 years
> and users aren't benefiting from these.

I have uploaded a new snapshot:

  ftp://alpha.gnu.org/gnu/patch/patch-2.6.1.157-ed08.tar.gz

Before the next release, I want to complete the git diff format
support, and this requires fixing bug 31058. Bug 25860 may be easily
fixed based on that as well. I hope to have time for that relatively
soon.

  http://savannah.gnu.org/bugs/?31058  "diff --git" criss-cross renames broken
  http://savannah.gnu.org/bugs/?25860  Patch --dry-run fails when a
patch modifies files more than once

Andreas


From MAILER-DAEMON Tue Apr 10 09:05:02 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SHako-0002cW-8N
	for mharc-bug-patch@gnu.org; Tue, 10 Apr 2012 09:05:02 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48570)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SHakg-0002bV-Km
	for bug-patch@gnu.org; Tue, 10 Apr 2012 09:05:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SHaka-0001VJ-9u
	for bug-patch@gnu.org; Tue, 10 Apr 2012 09:04:54 -0400
Received: from cantor2.suse.de ([195.135.220.15]:45540 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SHaka-0001Uk-3j
	for bug-patch@gnu.org; Tue, 10 Apr 2012 09:04:48 -0400
Received: from relay2.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 76F5A935A1;
	Tue, 10 Apr 2012 15:04:43 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: Andreas =?iso-8859-1?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
Date: Tue, 10 Apr 2012 15:04:42 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
In-Reply-To: <CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201204101504.42494.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Apr 2012 13:05:00 -0000

On Friday 06 April 2012 11:03:24 pm Andreas Gr=FCnbacher wrote:
> Jean,
>=20
> Am 5. April 2012 16:47 schrieb Jean Delvare <jdelvare@suse.de>:
> > Hi developers,
> >
> > Last stable release of GNU patch was over 2 years ago. Last alpha
> > snapshot was 1 year ago. Maybe it's time for another alpha snapshot
> > at least, and preferably a stable release? It's a little sad to see
> > all the development efforts that went into the project during the
> > past 2 years and users aren't benefiting from these.
>=20
> I have uploaded a new snapshot:
>=20
>   ftp://alpha.gnu.org/gnu/patch/patch-2.6.1.157-ed08.tar.gz
>=20
> Before the next release, I want to complete the git diff format
> support, and this requires fixing bug 31058. Bug 25860 may be easily
> fixed based on that as well. I hope to have time for that relatively
> soon.
>=20
>   http://savannah.gnu.org/bugs/?31058  "diff --git" criss-cross
>  renames broken
>   http://savannah.gnu.org/bugs/?25860  Patch --dry-run
>  fails when a patch modifies files more than once

Great, thanks Andreas!

=2D-=20
Jean Delvare
Suse L3


From MAILER-DAEMON Tue Apr 10 09:50:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SHbTH-0004Tr-Qp
	for mharc-bug-patch@gnu.org; Tue, 10 Apr 2012 09:50:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54398)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SHbTA-0004Th-JF
	for bug-patch@gnu.org; Tue, 10 Apr 2012 09:50:58 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SHbT5-0006a1-4O
	for bug-patch@gnu.org; Tue, 10 Apr 2012 09:50:52 -0400
Received: from cantor2.suse.de ([195.135.220.15]:47954 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SHbT4-0006Zk-NB
	for bug-patch@gnu.org; Tue, 10 Apr 2012 09:50:46 -0400
Received: from relay2.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 45AB79393C;
	Tue, 10 Apr 2012 15:50:45 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: Andreas =?iso-8859-15?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
Date: Tue, 10 Apr 2012 15:50:44 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
References: <201204061409.58919.jdelvare@suse.de>
	<CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
In-Reply-To: <CAHpGcMLfxU+4XOmCmH=UU9j7tpc6q9M+kZaQw7C3qZ+jKK+2GA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201204101550.44305.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
Cc: Jim Meyering <meyering@redhat.com>, bug-patch@gnu.org
Subject: Re: [bug-patch] Broken patch commit: don't warn twice about the
	same invalid file name
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Apr 2012 13:50:58 -0000

Hi Andreas,

On Friday 06 April 2012 03:06:47 pm Andreas Gr=FCnbacher wrote:
> Am 6. April 2012 14:09 schrieb Jean Delvare <jdelvare@suse.de>:
> > This commit [...] is broken.
> > bad[] holds pointers to the name strings, and these get freed
> > when switching to the next hunk in the patch file (if I read the
> > code properly...) So you end up accessing freed memory. Valgrind
> > complains about that and the code will eventually fail, as was
> > reported by an openSUSE user:
> >
> > https://bugzilla.novell.com/show_bug.cgi?id=3D755136
> >
> > I don't think the code even actually does what it is supposed to,
> > as it can only store 2 bad names (the slots are never freed), while
> > a given patch file could contain a lot more.
>=20
> Thanks. We are actually only interested in each patch here, not in
>  all the patches that could be in the same input file. How about the
>  attached change for a fix?

I tested your fix and it works OK, the result is as expected now and=20
valgrind is happy too. Thanks!

=2D-=20
Jean Delvare
Suse L3


From MAILER-DAEMON Thu Apr 12 21:25:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SIVGl-000614-1G
	for mharc-bug-patch@gnu.org; Thu, 12 Apr 2012 21:25:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42281)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIVGi-00060v-K6
	for bug-patch@gnu.org; Thu, 12 Apr 2012 21:25:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIVGg-00088n-Pt
	for bug-patch@gnu.org; Thu, 12 Apr 2012 21:25:44 -0400
Received: from mail-lb0-f169.google.com ([209.85.217.169]:63010)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIVGg-00080x-F8
	for bug-patch@gnu.org; Thu, 12 Apr 2012 21:25:42 -0400
Received: by mail-lb0-f169.google.com with SMTP id o2so2310267lba.0
	for <bug-patch@gnu.org>; Thu, 12 Apr 2012 18:25:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=wqUpKCYMlP0jUT8/JODfK5DGbJ/WEp13uhguiJsZ8tg=;
	b=EGX1HzYEbV5bIl3WDJLfEu8rRy8fGuzj6oesgJsBhGg0Ury7Geq6yLGS5ViCWcRUpn
	0jcsa5lT69rXZt4m29vVySTgh84w0wLxCdcCu0cU1mV+wfI57xf/O3ttUDBieZ17MCB0
	z+g+cXjrrLvxjVNsB/MNAMtzpsAFBCSuJ9Cc/Wx5Q05ueI5OQWvivaoU+SX5Bhsc5xm2
	aepjSvOpSDcawVNd1nbKwrpo/BM0NOsKEdB1BffT9RV9LX7BFHWv+vomc1ueZi7I8c0R
	4ALM24CRioBayfyXepsCf3SLTzbA6OFqMcNdG64Z1Wn0SfE1CcYjvnZYagDxPfRrCpaO
	RKwQ==
MIME-Version: 1.0
Received: by 10.112.51.225 with SMTP id n1mr152733lbo.27.1334280340560; Thu,
	12 Apr 2012 18:25:40 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Thu, 12 Apr 2012 18:25:40 -0700 (PDT)
In-Reply-To: <CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
Date: Fri, 13 Apr 2012 03:25:40 +0200
Message-ID: <CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: bug-patch@gnu.org
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.217.169
Cc: Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2012 01:25:45 -0000

> Before the next release, I want to complete the git diff format
> support, and this requires fixing bug 31058.

An initial version with full git-style patch support can be found on
the testing branch.
A snapshot can be found here:

  ftp://alpha.gnu.org/gnu/patch/patch-2.6.1.163-30ef-testing.tar.gz

Please give this a try. Bug reports are particularly welcome right now.

Note that I didn't manage to change the version string of the package so
I've only added the -testing suffix to the tarball's name.

> Bug 25860 may be easily fixed based on that as well.

That bug needs a different approach to fix. I'll put that off for later.

Thanks,
Andreas


From MAILER-DAEMON Thu Apr 12 21:57:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SIVlJ-0005tS-Mh
	for mharc-bug-patch@gnu.org; Thu, 12 Apr 2012 21:57:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54652)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SIVlH-0005t7-1d
	for bug-patch@gnu.org; Thu, 12 Apr 2012 21:57:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SIVlF-00004q-8S
	for bug-patch@gnu.org; Thu, 12 Apr 2012 21:57:18 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:49939)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SIVlF-0008WQ-2A
	for bug-patch@gnu.org; Thu, 12 Apr 2012 21:57:17 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id 6C3701B4012;
	Fri, 13 Apr 2012 01:57:14 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: bug-patch@gnu.org
Date: Thu, 12 Apr 2012 21:58:03 -0400
User-Agent: KMail/1.13.7 (Linux/3.4.0-rc1; KDE/4.6.5; x86_64; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
	<CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
In-Reply-To: <CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2761093.b6DBcPSFDZ";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201204122158.04901.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: Andreas =?iso-8859-1?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>,
	Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2012 01:57:20 -0000

--nextPart2761093.b6DBcPSFDZ
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Thursday 12 April 2012 21:25:40 Andreas Gr=FCnbacher wrote:
> > Before the next release, I want to complete the git diff format
> > support, and this requires fixing bug 31058.
>=20
> An initial version with full git-style patch support can be found on
> the testing branch.
> A snapshot can be found here:
>=20
>   ftp://alpha.gnu.org/gnu/patch/patch-2.6.1.163-30ef-testing.tar.gz
>=20
> Please give this a try. Bug reports are particularly welcome right now.

seems to barf on semi-mangled git patches.  patch-2.6.1 runs fine.

$ patch -p1 -g0 -E --no-backup-if-mismatch < 0068_all_glibc-2.14-glibc-reve=
rt-
fseek-on-fclose.patch
patching file libio/Makefile
patching file libio/bug-fclose1.c
Git-style patch file contains a normal patch between line 182 and 186

patch program exited with status 2

you can find it here:
http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.15/0068_all_glibc-2.=
14-
glibc-revert-fseek-on-fclose.patch

i've got quite a number of patches that i extracted from git and then had t=
o=20
hand modify in order to make them apply to older versions ...
=2Dmike

--nextPart2761093.b6DBcPSFDZ
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJPh4gsAAoJEEFjO5/oN/WBuAEQANcTgrprtnZDt760YdIxFiVZ
uTOkGCleTie9peWT4sORRFQvK/a6Erpy/s1i5gorxjHFsj46OxY4ldjU3GdeXyMr
0wWLM+SuarZk67fqV88hkL8VXhyeaOeWaK0JSp347owC0U+/Q8IZ69r9S3lfwyV5
xxUxT9oWFyEmW2m8dcNuIonTM4p9qtwUudAum0ZeXxKGDsQkqr16RTKy6OqQ87UO
P3EhIFPuacizpqJvIHI7K5/ZJd6URAYl4k/3pPBdJw7MS+ofBElYaQyD/Em23+Bz
71bMIS94ZS7aRYsendusHVF4zbZ/il1Y+42MzjclEWEvrsRrX8Ed5ZvxrrkDtf0D
mrogoJ/nkZy3PZ8pVjzfgzuq7raRF4L1Z8QfC0vE/muOHnInvGcuv3VDq/4rZwoW
pn21lPGnFg1BluAgmK1yI3jGvBFBFoKsDnLjiF7XxN9YkmrRc50qnvL1/JtNUHJu
XFy3cHu3GAttnBMJmsB4vD+NIzZC3AW9zkv4yyMxFAKzEJASJ7/pOvibOgiSAUKJ
6xKntAK7ftP/pmYce2KEGiDZQqPCdH0Uq7UJ1p4NM34l2yHLszIwVN1qH+FKkODy
PKtUxaA8MisFUoMecZv2CBPzRaYriX6vNHfLgPHlhkRm8YP9KJgsmPulYJkRnTDU
nYdWezTzveOTwwdkvozx
=oQKD
-----END PGP SIGNATURE-----

--nextPart2761093.b6DBcPSFDZ--


From MAILER-DAEMON Thu Apr 12 22:51:47 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SIWbz-0007nq-NU
	for mharc-bug-patch@gnu.org; Thu, 12 Apr 2012 22:51:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36338)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIWbx-0007nG-HS
	for bug-patch@gnu.org; Thu, 12 Apr 2012 22:51:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIWbw-00071I-0u
	for bug-patch@gnu.org; Thu, 12 Apr 2012 22:51:45 -0400
Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:58978)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIWbv-00070t-MP
	for bug-patch@gnu.org; Thu, 12 Apr 2012 22:51:43 -0400
Received: by lagz14 with SMTP id z14so2365718lag.0
	for <bug-patch@gnu.org>; Thu, 12 Apr 2012 19:51:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=MDcE3pk6d1NqlY77XaAGtzOQ0lSAeqUGlalYjhlaTww=;
	b=x1iI/PueenCivBWfA/HhoWzJip8hXQDn4nUX92O5BKE4Iaij1qZngXi/Smmtm36H+9
	exSGmpXrVOR8oglV+5N56CS4vzVgBgLdIPSFRKmNtbdd1kFCvt5tye9dzmw8/XRKdPyb
	AlyPTnZq2b4KlA1lsLPCFMuFLSVeEpj6+V60Um3QLy9CixT5nrHCvKB3OXJYaKnC3MfB
	iEa+Ysj+gJrRyTo9h68ET6nR37T6d8MUd2ziZwAiTI8bVSWseaSxea4plBzt8KTk2xUp
	wG3xNdMn3GCuKmKzBldqfrcc0am91avVgmdiRDDphw8ecIl8tspIEQDRCDP0LSyqH9Q8
	VapQ==
MIME-Version: 1.0
Received: by 10.152.146.39 with SMTP id sz7mr35470lab.3.1334285501294; Thu, 12
	Apr 2012 19:51:41 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Thu, 12 Apr 2012 19:51:41 -0700 (PDT)
In-Reply-To: <201204122158.04901.vapier@gentoo.org>
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
	<CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
	<201204122158.04901.vapier@gentoo.org>
Date: Fri, 13 Apr 2012 04:51:41 +0200
Message-ID: <CAHpGcMKvwQHp-PaA-dMnrUAA0n37RfKz+Xj65K=7VVJjTwz_Vg@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.41
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2012 02:51:46 -0000

Am 13. April 2012 03:58 schrieb Mike Frysinger <vapier@gentoo.org>:
> seems to barf on semi-mangled git patches. =A0patch-2.6.1 runs fine.
> [...]
> Git-style patch file contains a normal patch between line 182 and 186

Yuck. I'll try to make patch accept such mixed patch files somehow.

Thanks for the feedback!

Andreas


From MAILER-DAEMON Fri Apr 13 09:41:20 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SIgka-0005mu-Ub
	for mharc-bug-patch@gnu.org; Fri, 13 Apr 2012 09:41:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54490)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SIgkU-0005mV-06
	for bug-patch@gnu.org; Fri, 13 Apr 2012 09:41:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SIgkS-00012e-95
	for bug-patch@gnu.org; Fri, 13 Apr 2012 09:41:13 -0400
Received: from cantor2.suse.de ([195.135.220.15]:43291 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SIgkS-00012V-33
	for bug-patch@gnu.org; Fri, 13 Apr 2012 09:41:12 -0400
Received: from relay2.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id BF5F290CE3;
	Fri, 13 Apr 2012 15:41:09 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: Andreas =?iso-8859-1?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
Date: Fri, 13 Apr 2012 15:41:08 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
	<CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
In-Reply-To: <CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201204131541.08840.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2012 13:41:19 -0000

On Friday 13 April 2012 03:25:40 am Andreas Gr=FCnbacher wrote:
> An initial version with full git-style patch support can be found on
> the testing branch.
> A snapshot can be found here:
>=20
>   ftp://alpha.gnu.org/gnu/patch/patch-2.6.1.163-30ef-testing.tar.gz
>=20
> Please give this a try. Bug reports are particularly welcome right
>  now.
>=20
> Note that I didn't manage to change the version string of the package
>  so I've only added the -testing suffix to the tarball's name.

I'll be running this version of patch from now on on my work system.=20
I'll let you know if I notice anything wrong.

Thanks,
=2D-=20
Jean Delvare
Suse L3


From MAILER-DAEMON Fri Apr 13 13:28:26 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SIkIM-0000p6-BG
	for mharc-bug-patch@gnu.org; Fri, 13 Apr 2012 13:28:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58998)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIkIJ-0000oq-N8
	for bug-patch@gnu.org; Fri, 13 Apr 2012 13:28:24 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIkIH-0003MN-Sh
	for bug-patch@gnu.org; Fri, 13 Apr 2012 13:28:23 -0400
Received: from mail-lb0-f169.google.com ([209.85.217.169]:63358)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SIkIH-0003M5-Iu
	for bug-patch@gnu.org; Fri, 13 Apr 2012 13:28:21 -0400
Received: by lbbgp10 with SMTP id gp10so54141lbb.0
	for <bug-patch@gnu.org>; Fri, 13 Apr 2012 10:28:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=qxtJ+3vK3bmWnnWOsfOkXXO+GZAJS4CCrTBtReuBSrQ=;
	b=IWVVla4QijXnu/9MkMI6PqSfnL7h2VILLgmf8ZLua3+Ootr2u4dx0cKLnKOdEcDRyF
	9xOKf807EPLCjoLebkXp3Ku81TfDh8/7oSkmjNv9ACgj81SNHIYNDYv0cAXfNUA7F1mj
	3LpAodNJd3vb0i83hZWPklZBFXiazM5d9hA7TVKVMhceOqsP1FZsdrnbJTi//U4wL4hV
	NALeDo8gA7lxFS2MBq84rYcTl+JwnXihEpCpXYyoVK3jeqrUnN50wvL60XxitllfZiQg
	jebJja8ZkItzmXBS3cfNOPsZV8xrjkxiybcYA24ovxt40BGjBYk5EfRuCWC1zYPQr2DN
	TWKg==
MIME-Version: 1.0
Received: by 10.152.115.38 with SMTP id jl6mr2245474lab.24.1334338099282; Fri,
	13 Apr 2012 10:28:19 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Fri, 13 Apr 2012 10:28:19 -0700 (PDT)
In-Reply-To: <CAHpGcMKvwQHp-PaA-dMnrUAA0n37RfKz+Xj65K=7VVJjTwz_Vg@mail.gmail.com>
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJ1c4dXzLRnN=F2W=z34PWwKW_AVUYYoU-X9Luk-g-WtA@mail.gmail.com>
	<CAHpGcMKzcSwGtrZ6WvoixBpEainTgCKAN3NpDE8oeqXfLN-_gw@mail.gmail.com>
	<201204122158.04901.vapier@gentoo.org>
	<CAHpGcMKvwQHp-PaA-dMnrUAA0n37RfKz+Xj65K=7VVJjTwz_Vg@mail.gmail.com>
Date: Fri, 13 Apr 2012 19:28:19 +0200
Message-ID: <CAHpGcM+o8cr67SesH0bQzv_A1N4TcLYtLOU=AmMLou6rwmFc4g@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.217.169
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2012 17:28:25 -0000

Mike and all,

Am 13. April 2012 04:51 schrieb Andreas Gr=FCnbacher
<andreas.gruenbacher@gmail.com>:
> Am 13. April 2012 03:58 schrieb Mike Frysinger <vapier@gentoo.org>:
>> seems to barf on semi-mangled git patches. =A0patch-2.6.1 runs fine.
>> [...]
>> Git-style patch file contains a normal patch between line 182 and 186
>
> Yuck. I'll try to make patch accept such mixed patch files somehow.

I've updated the testing branch; this should work now. Also see this snapsh=
ot:

  ftp://alpha.gnu.org/gnu/patch/testing/patch-2.6.1.163-ca0e.tar.gz

Thanks,
Andreas


From MAILER-DAEMON Fri Apr 13 18:32:19 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SIp2R-0006fD-Bl
	for mharc-bug-patch@gnu.org; Fri, 13 Apr 2012 18:32:19 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60989)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SIp2O-0006eU-Vk
	for bug-patch@gnu.org; Fri, 13 Apr 2012 18:32:18 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SIp2M-0006U9-9H
	for bug-patch@gnu.org; Fri, 13 Apr 2012 18:32:16 -0400
Received: from smtp.gentoo.org ([140.211.166.183]:39791)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vapier@gentoo.org>) id 1SIp2M-0006Tq-2p
	for bug-patch@gnu.org; Fri, 13 Apr 2012 18:32:14 -0400
Received: from vapier.localnet (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id BB596641F7;
	Fri, 13 Apr 2012 22:32:11 +0000 (UTC)
From: Mike Frysinger <vapier@gentoo.org>
Organization: wh0rd.org
To: Andreas =?iso-8859-1?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
Date: Fri, 13 Apr 2012 18:33:07 -0400
User-Agent: KMail/1.13.7 (Linux/3.4.0-rc1; KDE/4.6.5; x86_64; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMKvwQHp-PaA-dMnrUAA0n37RfKz+Xj65K=7VVJjTwz_Vg@mail.gmail.com>
	<CAHpGcM+o8cr67SesH0bQzv_A1N4TcLYtLOU=AmMLou6rwmFc4g@mail.gmail.com>
In-Reply-To: <CAHpGcM+o8cr67SesH0bQzv_A1N4TcLYtLOU=AmMLou6rwmFc4g@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1693419.qkdiSFTst3";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <201204131833.08380.vapier@gentoo.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 140.211.166.183
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Apr 2012 22:32:18 -0000

--nextPart1693419.qkdiSFTst3
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Friday 13 April 2012 13:28:19 Andreas Gr=FCnbacher wrote:
> Am 13. April 2012 04:51 schrieb Andreas Gr=FCnbacher:
> > Am 13. April 2012 03:58 schrieb Mike Frysinger <vapier@gentoo.org>:
> >> seems to barf on semi-mangled git patches.  patch-2.6.1 runs fine.
> >> [...]
> >> Git-style patch file contains a normal patch between line 182 and 186
> >=20
> > Yuck. I'll try to make patch accept such mixed patch files somehow.
>=20
> I've updated the testing branch; this should work now. Also see this
> snapshot:
>=20
>   ftp://alpha.gnu.org/gnu/patch/testing/patch-2.6.1.163-ca0e.tar.gz

thanks ... seems to apply the patches in this pkg fine now
=2Dmike

--nextPart1693419.qkdiSFTst3
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQIcBAABAgAGBQJPiKmkAAoJEEFjO5/oN/WBkHYQANdtbTe7lAkE+5JLoibUpl4s
OyShBSmsyqyvaPRCAVnLCg5OMCaGws66lJyIkPuDURTFQs3qanYwyG8f+/Xd26XL
Ddzps5zR3ZJQHZhMx2wrHUNVtxQgQLvONKfCWEY5ZfPg0YXxOS3c3BZLOMceUzZj
aaxK1rFj0Hwxdwtqj8lUHYhkgGp7mYYIBVPkiRRzEZaqzv1A5Azgc4/lOu0/JYzF
hSarIEvuaUt3e//Nf+zF9Aq63IiEhpK7H8M04YCYlRxViy13aO5o29HZtOIEMjof
WJGkanbqxkfMnOpyUhmpN/eF9uFEumxumIFOR+cf5pei8P0gQ2Vk9Pc1cDPofjsA
TaApXvl+ZueTaYfPOY5wmMhvhkf/m6H+pD/qrAcnFY/jQVyPjh+HXTIzk/wvBJ/O
tVfzKhtOqCl1V1halifEVl2RlfAhpXaKy4f6sA6U9daDXh716VWBzDoq8P32NjJ8
b3eMem8uQuEBdfBHmcSHYzou0lsGnQiyNIXI7Md6sp8cTmrdc/GszyRB54wI4T7D
3pdmVvomvie/BopWVsFwH/aTL1tRPF1MNSvm0jPqhRTqaSXS81WkLgb0JOq+VD+0
7UhFAGIfl00KvqIBWU8jC5NUChbaTGu9MkJBgInCqAxQqQH47C81Kya3+2Vg+l7y
S5oJX4UYZSEjtMC1vsbu
=dqOS
-----END PGP SIGNATURE-----

--nextPart1693419.qkdiSFTst3--


From MAILER-DAEMON Sat Apr 14 08:34:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SJ2Bs-0004q4-Qu
	for mharc-bug-patch@gnu.org; Sat, 14 Apr 2012 08:34:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40142)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SJ2Bp-0004py-BX
	for bug-patch@gnu.org; Sat, 14 Apr 2012 08:34:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SJ2Bk-0004Xv-Vt
	for bug-patch@gnu.org; Sat, 14 Apr 2012 08:34:52 -0400
Received: from mail-lb0-f169.google.com ([209.85.217.169]:63790)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SJ2Bk-0004Xp-MJ
	for bug-patch@gnu.org; Sat, 14 Apr 2012 08:34:48 -0400
Received: by lbbgp10 with SMTP id gp10so487062lbb.0
	for <bug-patch@gnu.org>; Sat, 14 Apr 2012 05:34:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=iCiOYl8x/aljSIRrD8lG20YBiCwrKX7rKFTjfBwND/Y=;
	b=SADIKCDCSofC8P9D5JxLwqxqbjWWknL7gXHYYpHOmCPyL0JXMtahhDr0Tk301crEV5
	q/ndNc+sEeSF5VfQtiePF4++pK86kQmgRR5F8uJ6T5sHTxdmteKCH/2DpP6KhRczqL3X
	IXK/3sF9I44VnIM7aoZyZjt5sduk20DjNxgJixfFUDPSI/Aiy8CU3supZhFtVk46sWYs
	PsafP3kcXri5hmVMQMNZyufBAgAAyyXf2eK5AIvDAPtINo33PCw4Tp7YZLc7vsxK0aDc
	X8Bpvb96szK/D7i1Jd0+jOE8BUblPp5+hkV334pVn3VDTsJ6PZN8M0zuTw5qyJOEudWY
	5RiA==
MIME-Version: 1.0
Received: by 10.112.9.200 with SMTP id c8mr2342551lbb.13.1334406885752; Sat,
	14 Apr 2012 05:34:45 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Sat, 14 Apr 2012 05:34:45 -0700 (PDT)
In-Reply-To: <201204131833.08380.vapier@gentoo.org>
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMKvwQHp-PaA-dMnrUAA0n37RfKz+Xj65K=7VVJjTwz_Vg@mail.gmail.com>
	<CAHpGcM+o8cr67SesH0bQzv_A1N4TcLYtLOU=AmMLou6rwmFc4g@mail.gmail.com>
	<201204131833.08380.vapier@gentoo.org>
Date: Sat, 14 Apr 2012 14:34:45 +0200
Message-ID: <CAHpGcMLWp46vwU-44bD=OtZNKPy+47qxbg_pNXMDvuEg2kyjog@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Mike Frysinger <vapier@gentoo.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.217.169
Cc: bug-patch@gnu.org, Jean Delvare <jdelvare@suse.de>
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Apr 2012 12:34:55 -0000

Am 14. April 2012 00:33 schrieb Mike Frysinger <vapier@gentoo.org>:
> On Friday 13 April 2012 13:28:19 Andreas Gr=FCnbacher wrote:
>> I've updated the testing branch; this should work now. Also see this
>> snapshot:
>>
>> =A0 ftp://alpha.gnu.org/gnu/patch/testing/patch-2.6.1.163-ca0e.tar.gz
>
> thanks ... seems to apply the patches in this pkg fine now

There was another bug in the previous snapshot. The following snapshot
should be close to ready now:

  ftp://alpha.gnu.org/gnu/patch/testing/patch-2.6.1.164-028f.tar.gz

Andreas


From MAILER-DAEMON Mon Apr 16 09:35:44 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SJm5o-0001cO-SL
	for mharc-bug-patch@gnu.org; Mon, 16 Apr 2012 09:35:44 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48064)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SJm5l-0001as-Il
	for bug-patch@gnu.org; Mon, 16 Apr 2012 09:35:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SJm5e-0004JQ-Iu
	for bug-patch@gnu.org; Mon, 16 Apr 2012 09:35:41 -0400
Received: from cantor2.suse.de ([195.135.220.15]:54708 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SJm5d-0004ER-Fd
	for bug-patch@gnu.org; Mon, 16 Apr 2012 09:35:33 -0400
Received: from relay1.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 3A00289994;
	Mon, 16 Apr 2012 15:35:31 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: Andreas =?iso-8859-1?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
Date: Mon, 16 Apr 2012 15:35:29 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<201204131833.08380.vapier@gentoo.org>
	<CAHpGcMLWp46vwU-44bD=OtZNKPy+47qxbg_pNXMDvuEg2kyjog@mail.gmail.com>
In-Reply-To: <CAHpGcMLWp46vwU-44bD=OtZNKPy+47qxbg_pNXMDvuEg2kyjog@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201204161535.29834.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Apr 2012 13:35:44 -0000

Hi Andreas,

On Saturday 14 April 2012 02:34:45 pm Andreas Gr=FCnbacher wrote:
> There was another bug in the previous snapshot. The following
>  snapshot should be close to ready now:
>=20
>   ftp://alpha.gnu.org/gnu/patch/testing/patch-2.6.1.164-028f.tar.gz

I am testing this version of GNU patch in conjunction with quilt and I=20
am facing a problem. Not a bug proper, but rather a problematic=20
behavioral change.

Until now, patch would happily work on read-only files. Now it is no=20
longer, it will detect read-only files and refuse to operate on them, or=20
at least complain loudly for every read-only file, if forced.

It happens that operating on read-only file is something I often do (and=20
every other kernel developer at Suse too.) We work on parallel (hard-
linked) kernel trees, and we keep these read-only to avoid accidentally=20
corrupting another tree in the group. Files should never be made=20
writable before they have been unlinked (typically by applying a patch=20
or adding the file to an existing patch.)

So with the latest version of GNU patch, every "quilt push" results in a=20
warning about read-only files. This is rather inconvenient and passing=20
=2D-quiet doesn't even make it go away. And "quilt push -f" fails. Bad.

I do agree that the previous behavior (silently operating on read-only=20
files by default) was wrong, but I think the new behavior is wrong too.=20
If I tell patch to operate on a read-only file with --backup option (as=20
quilt does), it would seem that I know what I'm doing. So I think=20
patching read-only files should be as silent and successful as it used=20
to be as long as --backup option is used.

You may argue that quilt should make the files writable by itself before=20
calling patch, however it can't be done easily for two reasons. First=20
reason is that quilt relies on patch to get the list of files affected=20
by a patch file. If we have to extract this list from the patch file=20
ourselves, this will add a lot of non-trivial code, which may (and will)=20
diverge from GNU patch [1]. Second reason is that we don't want to make=20
files writable before they are unlinked from the reference tree, and we=20
can't unlink before we backup the file, otherwise the link will be lost=20
forever and not restored when we revert (quilt pop) the patch. Backup=20
(and unlinking) is done by GNU patch currently [2].

[1] I presume this could be worked around by calling patch --dry-run=20
first, but this has a performance cost, obviously, which I'd like to=20
avoid.
[2] We could have quilt take care of the backup and unlinking, but again=20
at a performance cost, as an extra file copy would be required.

So, can we please agree on making GNU patch operate successfully and=20
silently on read-only files whenever --backup option is used?

Thanks,
=2D-=20
Jean Delvare
Suse L3


From MAILER-DAEMON Mon Apr 16 12:08:59 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SJoU7-0004Cd-6F
	for mharc-bug-patch@gnu.org; Mon, 16 Apr 2012 12:08:59 -0400
Received: from eggs.gnu.org ([208.118.235.92]:33650)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SJoU0-0004B8-6m
	for bug-patch@gnu.org; Mon, 16 Apr 2012 12:08:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SJoTu-0007xI-17
	for bug-patch@gnu.org; Mon, 16 Apr 2012 12:08:51 -0400
Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:63141)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SJoTt-0007wm-Nm
	for bug-patch@gnu.org; Mon, 16 Apr 2012 12:08:45 -0400
Received: by lagz14 with SMTP id z14so4571673lag.0
	for <bug-patch@gnu.org>; Mon, 16 Apr 2012 09:08:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=GP6C2xfjQVrNvSlpaOm+dI1zMrVYjH57WSXhQ0hlNx4=;
	b=vtxDna8srjdT5f3wjF464bE3vQu4Gre3V9PA3HXrM7DLIxlQw0XS1GcY+v6WuIbXvR
	DcJsLdnXhpMrMyy27lUaBrZL/xL4fgFOkCZBouIjrDj412IMCI8+QDg4IYCfaxI+QQAf
	I3qZVjRSo/XNPKzfBr2ZXgEu74ajI4smxuU6P7+IesOFS8qIEAHsYZCxGwZcBPlB0oK2
	vGSoBLLo6OtJms/uKk9e/6GW+qxI3EGOxK7CeSmSWf8OKDAVMeHp/JAFZHtbOqazHZOL
	qVUA4uEFwePxODroBAOziksTZgIOgWo8dZxfBYM83tihYwjTtR/YPVbMV0vrDICidf+T
	CdPg==
MIME-Version: 1.0
Received: by 10.112.98.70 with SMTP id eg6mr1152852lbb.13.1334592522667; Mon,
	16 Apr 2012 09:08:42 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Mon, 16 Apr 2012 09:08:42 -0700 (PDT)
In-Reply-To: <201204161535.29834.jdelvare@suse.de>
References: <201204051647.08472.jdelvare@suse.de>
	<201204131833.08380.vapier@gentoo.org>
	<CAHpGcMLWp46vwU-44bD=OtZNKPy+47qxbg_pNXMDvuEg2kyjog@mail.gmail.com>
	<201204161535.29834.jdelvare@suse.de>
Date: Mon, 16 Apr 2012 18:08:42 +0200
Message-ID: <CAHpGcMJZ-jxZmFTaoQYrpsscH_CsnWUqjDqs+Jixk4c3tKtkOg@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Jean Delvare <jdelvare@suse.de>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.41
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Apr 2012 16:08:58 -0000

Jean,

Am 16. April 2012 15:35 schrieb Jean Delvare <jdelvare@suse.de>:
> So with the latest version of GNU patch, every "quilt push" results in a
> warning about read-only files. This is rather inconvenient and passing
> --quiet doesn't even make it go away. And "quilt push -f" fails. Bad.

Why does "quilt push -f" fail?

> I do agree that the previous behavior (silently operating on read-only
> files by default) was wrong, but I think the new behavior is wrong too.
> If I tell patch to operate on a read-only file with --backup option (as
> quilt does), it would seem that I know what I'm doing. So I think
> patching read-only files should be as silent and successful as it used
> to be as long as --backup option is used.

I really can't follow you here. Patch should behave consistently on
read-only files, whether or not it creates backups.

> [...] we don't want to make files writable before they are unlinked from
> the reference tree

A "cp --reflink" copy would work, but that is not widely supported yet. Maybe
we do need to let the user choose between the old and new behaviour.

Thanks,
Andreas


From MAILER-DAEMON Mon Apr 16 13:21:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SJpck-0004Bg-GQ
	for mharc-bug-patch@gnu.org; Mon, 16 Apr 2012 13:21:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34405)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SJpcc-00046A-CC
	for bug-patch@gnu.org; Mon, 16 Apr 2012 13:21:54 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SJpcW-0000Ji-9u
	for bug-patch@gnu.org; Mon, 16 Apr 2012 13:21:49 -0400
Received: from cantor2.suse.de ([195.135.220.15]:45309 helo=mx2.suse.de)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jdelvare@suse.de>) id 1SJpcW-0000JJ-0a
	for bug-patch@gnu.org; Mon, 16 Apr 2012 13:21:44 -0400
Received: from relay2.suse.de (unknown [195.135.220.254])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx2.suse.de (Postfix) with ESMTP id 9955090349;
	Mon, 16 Apr 2012 19:21:42 +0200 (CEST)
From: Jean Delvare <jdelvare@suse.de>
Organization: Suse Linux
To: Andreas =?iso-8859-1?q?Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
Date: Mon, 16 Apr 2012 19:21:41 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.32.54-0.3-pae; KDE/4.3.5; i686; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<201204161535.29834.jdelvare@suse.de>
	<CAHpGcMJZ-jxZmFTaoQYrpsscH_CsnWUqjDqs+Jixk4c3tKtkOg@mail.gmail.com>
In-Reply-To: <CAHpGcMJZ-jxZmFTaoQYrpsscH_CsnWUqjDqs+Jixk4c3tKtkOg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201204161921.41535.jdelvare@suse.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6
X-Received-From: 195.135.220.15
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Apr 2012 17:21:54 -0000

Hi Andreas,

On Monday 16 April 2012 06:08:42 pm Andreas Gr=FCnbacher wrote:
> Jean,
>=20
> Am 16. April 2012 15:35 schrieb Jean Delvare <jdelvare@suse.de>:
> > So with the latest version of GNU patch, every "quilt push" results
> > in a warning about read-only files. This is rather inconvenient and
> > passing --quiet doesn't even make it go away. And "quilt push -f"
> > fails. Bad.
>=20
> Why does "quilt push -f" fail?

This is somewhat unintuitive (I had to check the code twice myself) but=20
"quilt push" calls "patch -f" while "push -f" calls "patch" (no -f). And=20
new version of "patch" fails on read-only files unless forced, so now=20
"quilt push -f" fails on read-only files.

Maybe we could use "patch -f" always, I'm not sure. But even then,=20
"patch" now displays a warning message, which can't be suppressed, so it=20
won't completely help.

> > I do agree that the previous behavior (silently operating on
> > read-only files by default) was wrong, but I think the new behavior
> > is wrong too. If I tell patch to operate on a read-only file with
> > --backup option (as quilt does), it would seem that I know what I'm
> > doing. So I think patching read-only files should be as silent and
> > successful as it used to be as long as --backup option is used.
>=20
> I really can't follow you here. Patch should behave consistently on
> read-only files, whether or not it creates backups.

Maybe this is twisted thinking from me, but I think --backup changes the=20
semantics of what patch is doing, especially for read-only files.=20
Without --backup, patch operates in-place on the file, so it changes it,=20
which is not acceptable if the file is read-only. But with --backup, the=20
original file is preserved, which complies with its read-only status,=20
and I see the modified file as a new file (which may even not be read-
only, that wouldn't shock me.)

> > [...] we don't want to make files writable before they are unlinked
> > from the reference tree
>=20
> A "cp --reflink" copy would work, but that is not widely supported
>  yet.

It's not even supported on my own system. The whole concept is news to=20
me. How does it work, hard link + extended file attribute which says=20
"break the link on file change"? Can this mode be set afterwards?

>  Maybe we do need to let the user choose between the old and new
>  behaviour.

If you don't like my proposal to depend on --backup, then yes, I presume=20
this is the way to go, although I'm not quite sure what this new option=20
should be named.

Thanks,
=2D-=20
Jean Delvare
Suse L3


From MAILER-DAEMON Tue Apr 17 12:08:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SKAwr-0001PR-3E
	for mharc-bug-patch@gnu.org; Tue, 17 Apr 2012 12:08:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38573)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <agruen@gnu.org>) id 1SKAwl-0001OD-H3
	for bug-patch@gnu.org; Tue, 17 Apr 2012 12:08:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <agruen@gnu.org>) id 1SKAwf-00060u-6D
	for bug-patch@gnu.org; Tue, 17 Apr 2012 12:08:03 -0400
Received: from zimbra.linbit.com ([212.69.161.123]:52542)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <agruen@gnu.org>) id 1SKAwe-0005zz-Sh
	for bug-patch@gnu.org; Tue, 17 Apr 2012 12:07:57 -0400
Received: from localhost (localhost [127.0.0.1])
	by zimbra.linbit.com (Postfix) with ESMTP id 723741B4354;
	Tue, 17 Apr 2012 18:07:55 +0200 (CEST)
X-Virus-Scanned: amavisd-new at zimbra.linbit.com
Received: from zimbra.linbit.com ([127.0.0.1])
	by localhost (zimbra.linbit.com [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id CKprqg9XtP0m; Tue, 17 Apr 2012 18:07:55 +0200 (CEST)
Received: from murkel.localnet (unknown [86.59.100.100])
	by zimbra.linbit.com (Postfix) with ESMTPSA id 5C04A1B4350;
	Tue, 17 Apr 2012 18:07:55 +0200 (CEST)
From: Andreas Gruenbacher <agruen@gnu.org>
To: bug-patch@gnu.org
Date: Tue, 17 Apr 2012 18:07:53 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-Id: <201204171807.54771.agruen@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 212.69.161.123
Cc: git@vger.kernel.org
Subject: [bug-patch] GNU patch close to next stable release
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Apr 2012 16:08:07 -0000

I'm glad to announce that finally, support for git-style diffs is working well 
enough, and no more major issues seem to be in our way before the next stable 
release of GNU patch.

Some things have changed significantly recently in order to get the code 
release ready, so now would be a really great time for an extra round of 
testing.

You can find the latest snapshot here:

  ftp://alpha.gnu.org/gnu/patch/

The last stable release dates back to December 2009 with version 2.6.1.  The 
following significant changes have happened since then:

* Support for most features of the "diff --git" format, including renames and
  copies, permission changes, and symlink diffs.  Binary diffs are not
  supported yet; patch will complain and skip them.

* Support for double-quoted filenames in the "diff --git" format: when a
  filename starts with a double quote, it is interpreted as a C string
  literal.  The escape sequences \\, \", \a, \b, \f, \n, \r, \t, \v, and \ooo
  (a three-digit octal number between 0 and 255) are recognized.

* Patch now ignores destination file names that are absolute or that contain
  a component of "..".  This addresses CVE-2010-4651.

* Refuse to apply a normal patch to a symlink.  (Previous versions of patch
  were replacing the symlink with a regular file.)

* When trying to modify a read-only file, warn about the potential problem
  by default.  The --read-only command line option allows to change this
  behavior.

* Files that should be deleted are now deleted once the entire patch file has
  been read.  This fixes a bug with numbered backup files.

* When a timestamp specifies a time zone, honor that instead of assuming the
  local time zone (--set-date) or Universal Coordinated Time (--set-utc).

* Support for nanosecond precision timestamps.

* Many portability and bug fixes.

Please report bugs or suggestions on the <bug-patch@gnu.org> mailing list, or 
in the project's bug tracker on Savannah:

  http://savannah.gnu.org/projects/patch

Thanks,
Andreas


From MAILER-DAEMON Tue Apr 17 12:16:09 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SKB4b-0002e5-3l
	for mharc-bug-patch@gnu.org; Tue, 17 Apr 2012 12:16:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53027)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SKB4W-0002di-7e
	for bug-patch@gnu.org; Tue, 17 Apr 2012 12:16:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SKB4P-0000fm-VM
	for bug-patch@gnu.org; Tue, 17 Apr 2012 12:16:03 -0400
Received: from mail-wi0-f177.google.com ([209.85.212.177]:42638)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SKB4P-0000ei-Mg
	for bug-patch@gnu.org; Tue, 17 Apr 2012 12:15:57 -0400
Received: by wibhj13 with SMTP id hj13so597727wib.12
	for <bug-patch@gnu.org>; Tue, 17 Apr 2012 09:15:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=from:to:subject:date:user-agent:cc:references:in-reply-to
	:mime-version:content-type:content-transfer-encoding:message-id;
	bh=y8k4TfnbpRdVJaaQqXQqEk8Acf/A6Iied9KWGsh/Edo=;
	b=kJmE6DxwKdHshfGgwodX84xGjqY+c3QPKMtclL+mWme/Q9Iwxu0L++89U/4g6fu6gi
	MnyEUdsUyvIBnwGVVue4XZkRwe8GwcPEloJ8Bsfe3s2nJwmcXKoev6DCVhORJUjsKMnV
	PkP2ZelNHzJqv09RkiE2vsIu4NUWP/Kxy9+n79zGks1eCXx2VQw9ii1eHbtbSQ8kepYW
	oDBzEXnUzwFPrO0wvI1e/CIHW29CVjyK6Hnqws9VYXphTXBu0Z4nxfcXbZ1pOn3WdryF
	p7eEwpCA7ZABGVhcskdjUA+R8tSFyzt+SHdkXdZ+P3Qs73c84OANoLTLTNP/Vom+U2O5
	28nw==
Received: by 10.180.107.101 with SMTP id hb5mr30042305wib.7.1334679348887;
	Tue, 17 Apr 2012 09:15:48 -0700 (PDT)
Received: from murkel.localnet ([86.59.100.100])
	by mx.google.com with ESMTPS id fn2sm44786891wib.0.2012.04.17.09.15.42
	(version=TLSv1/SSLv3 cipher=OTHER);
	Tue, 17 Apr 2012 09:15:43 -0700 (PDT)
From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
To: Jean Delvare <jdelvare@suse.de>
Date: Tue, 17 Apr 2012 18:15:40 +0200
User-Agent: KMail/1.12.4 (Linux/2.6.36-rc7+; KDE/4.3.5; i686; ; )
References: <201204051647.08472.jdelvare@suse.de>
	<CAHpGcMJZ-jxZmFTaoQYrpsscH_CsnWUqjDqs+Jixk4c3tKtkOg@mail.gmail.com>
	<201204161921.41535.jdelvare@suse.de>
In-Reply-To: <201204161921.41535.jdelvare@suse.de>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201204171815.41679.andreas.gruenbacher@gmail.com>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.212.177
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] Time for a new release?
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Apr 2012 16:16:08 -0000

Jean,

On Monday 16 April 2012 19:21:41 Jean Delvare wrote:
> On Monday 16 April 2012 06:08:42 pm Andreas Gr=FCnbacher wrote:
> > Am 16. April 2012 15:35 schrieb Jean Delvare <jdelvare@suse.de>:
> > > So with the latest version of GNU patch, every "quilt push" results
> > > in a warning about read-only files. This is rather inconvenient and
> > > passing --quiet doesn't even make it go away. And "quilt push -f"
> > > fails. Bad.
> >=20
> > Why does "quilt push -f" fail?
>=20
> This is somewhat unintuitive (I had to check the code twice myself) but=20
> "quilt push" calls "patch -f" while "push -f" calls "patch" (no -f). And=
=20
> new version of "patch" fails on read-only files unless forced, so now=20
> "quilt push -f" fails on read-only files.

I see.  This may be the only way to allow GNU patch to run interactively.  =
I'm=20
not sure how much that is worth though ...

> Maybe we could use "patch -f" always, I'm not sure. But even then,=20
> "patch" now displays a warning message, which can't be suppressed, so it=
=20
> won't completely help.

The new read-only check has also bitten others before; this change seems to=
o=20
problematic.  I have reduced it to a warning now; it can be silenced with --
read-only=3Dignore or turned into a failure with --read-only=3Dfail.  Hopef=
ully=20
that will work well enough now.

Can you give the current snapshot a try?

Thanks,
Andreas


From MAILER-DAEMON Tue Apr 17 17:44:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SKGCN-0002tJ-9H
	for mharc-bug-patch@gnu.org; Tue, 17 Apr 2012 17:44:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:54681)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SKGCK-0002sn-B3
	for bug-patch@gnu.org; Tue, 17 Apr 2012 17:44:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SKGCE-0008IY-Vp
	for bug-patch@gnu.org; Tue, 17 Apr 2012 17:44:27 -0400
Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:33420)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SKGCE-0008Hn-ML
	for bug-patch@gnu.org; Tue, 17 Apr 2012 17:44:22 -0400
Received: by lagz14 with SMTP id z14so5858352lag.0
	for <bug-patch@gnu.org>; Tue, 17 Apr 2012 14:44:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=2QphwIAUK/yvQpVNBIKSOwcX/aUE80gxUK5AJUgJqes=;
	b=zx1Hp3sYfufr5RnpKSilkJV8x1D+mI8H4xHI6ZjBUj6rAvFnajLL1X4BNbpXY5eM60
	OXY+bbrO8jBtCjoz3AuVY1yKWRjbO+vnCFhbDlHBt/2JPJRk+6vhEhiYij/NK0IFAaWw
	MakQMb13JWCF7s473zhp4sSa2frC1bGioEgRCQhHJHWnWLiRijal6X84M/HaujcJzo2h
	uufHOQ3OxbTM4UwhX6aaIwnLuQOI/yF0F5g4qdaDV4V5037F9Uo90Lsavx33ySEZOe1M
	+qgvYM2p34rOJYu3sgmwuGiO7XbpXu1F6rkWo/2lvs6BGCoDQdvWLpE48qOy/4MXbdBD
	i4NA==
MIME-Version: 1.0
Received: by 10.152.115.38 with SMTP id jl6mr15882244lab.24.1334697036517;
	Tue, 17 Apr 2012 14:10:36 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Tue, 17 Apr 2012 14:10:36 -0700 (PDT)
In-Reply-To: <CAN++4hEp+L1cs4Py7KMW4fJiUaJiCwO=VWertwE-9MsvTngf8g@mail.gmail.com>
References: <CAN++4hEp+L1cs4Py7KMW4fJiUaJiCwO=VWertwE-9MsvTngf8g@mail.gmail.com>
Date: Tue, 17 Apr 2012 23:10:36 +0200
Message-ID: <CAHpGcMLBd_hK7yyweYTmy1on14N2sjY7RLRmHmM9fhBt=Zz=Ng@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: Mike Hodson <mystica@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.41
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] patch fails to give notice that it is being ran in
 'dry-run' mode at any level of verbosity.
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Apr 2012 21:44:29 -0000

Mike,

Am 13. Januar 2012 04:49 schrieb Mike Hodson <mystica@gmail.com>:
> I belive that the console output of 'patch' when in 'dry-run' mode should
> actually notify of this and explicitly mention that no files will be written
> or modified.

at the moment, patch will output something like this for rejects, with as well
as without --dry-run:

	patching file f
	Hunk #1 FAILED at 2.
	1 out of 1 hunk FAILED -- saving rejects to file f.rej

I definitely agree that patch should not say "saving rejects to file"
if it does not
in fact create any reject files -- this is just stupid. Something like
this might be
better in --dry-run mode:

	checking file f
	Hunk #1 FAILED at 2.
	1 out of 1 hunk FAILED

The big question is how many tools this change will break.

What do others on this list think?

Thanks,
Andreas


From MAILER-DAEMON Mon Apr 23 22:18:56 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SMVLE-0001j8-NI
	for mharc-bug-patch@gnu.org; Mon, 23 Apr 2012 22:18:56 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36163)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ldv@altlinux.org>) id 1SMSNT-0006Gg-MG
	for bug-patch@gnu.org; Mon, 23 Apr 2012 19:09:04 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ldv@altlinux.org>) id 1SMSNS-0000T4-2G
	for bug-patch@gnu.org; Mon, 23 Apr 2012 19:09:03 -0400
Received: from vint.altlinux.org ([194.107.17.35]:52802)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ldv@altlinux.org>) id 1SMSNR-0000Sa-RS
	for bug-patch@gnu.org; Mon, 23 Apr 2012 19:09:01 -0400
Received: from wo.int.altlinux.org (wo.int.altlinux.org [192.168.1.4])
	by vint.altlinux.org (Postfix) with ESMTP id 4B633226C057
	for <bug-patch@gnu.org>; Mon, 23 Apr 2012 23:08:59 +0000 (UTC)
Received: by wo.int.altlinux.org (Postfix, from userid 508)
	id 5D8D53F487AC; Tue, 24 Apr 2012 03:08:58 +0400 (MSK)
Date: Tue, 24 Apr 2012 03:08:58 +0400
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: bug-patch@gnu.org
Message-ID: <20120423230858.GA20236@altlinux.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="J/dobhs11T7y2rNN"
Content-Disposition: inline
X-fingerprint: FE4C 93AB E19A 2E4C CB5D  3E4E 7CAB E6AC 9E35 361E
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 194.107.17.35
X-Mailman-Approved-At: Mon, 23 Apr 2012 22:18:55 -0400
Subject: [bug-patch] v2.6.1-165-gc43eeb2 regression
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Apr 2012 23:09:05 -0000


--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

Starting with commit v2.6.1-165-gc43eeb2, output_file function is unable
to handle to =3D=3D NULL, and GNU patch now segfaults on this test case:

$ echo data > target && patch -p1 << '__EOF__'
diff --git a/target b/target
index 1..0
__EOF__
patching file target
File target is not empty after patch, as expected
Segmentation fault


--=20
ldv

--J/dobhs11T7y2rNN
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk+V4QoACgkQfKvmrJ41Nh5RgQCgjmvnZeFUcN9eM0bFL+C5QZFI
GvcAoJ84wLU8QecLlevRnM2NMszgswOc
=B7Xg
-----END PGP SIGNATURE-----

--J/dobhs11T7y2rNN--


From MAILER-DAEMON Tue Apr 24 06:44:34 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SMdEY-0004EU-U1
	for mharc-bug-patch@gnu.org; Tue, 24 Apr 2012 06:44:34 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41950)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SMdET-0004DZ-SQ
	for bug-patch@gnu.org; Tue, 24 Apr 2012 06:44:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SMdEM-00087Q-LA
	for bug-patch@gnu.org; Tue, 24 Apr 2012 06:44:29 -0400
Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:34464)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <andreas.gruenbacher@gmail.com>) id 1SMdEM-000870-BX
	for bug-patch@gnu.org; Tue, 24 Apr 2012 06:44:22 -0400
Received: by lagz14 with SMTP id z14so442614lag.0
	for <bug-patch@gnu.org>; Tue, 24 Apr 2012 03:44:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=66TH2xY6aAIfAIRhtqrfd62s+FyFgYi+zE/OZ4ZJTrY=;
	b=eP5wBXq7qxcqmEqLQ93VBRbiddOP9uoPD4fh00KW4bxyNEK4czMr9WVrjNRi4C5D4m
	zQ4S9lHUxMDhPm9YVAtB+aO5SPJw3csqUFqIUl5KyFMHOP5sH48pQ0P/eKqV7EsSlYAX
	Am46JSpDR9gxYvj438CkiPy0i5wCDmmQePpMEK25CY6g2dYYUClAexMkhbqIcYPAcCvf
	KjTfJnj5wVgVXhN0BS9vymEuCZbjR72iT9pNFzI94+oitdqYtmxgAlZ4SXddRPgbhwTb
	tH4mK9lemVO2zPGLp/SDSVgSJGZUd3u6eS4d+4IDEdNhX3gjVdmpHvKBXWg5Zv6FG/3p
	69iw==
MIME-Version: 1.0
Received: by 10.112.28.10 with SMTP id x10mr9506297lbg.41.1335264259797; Tue,
	24 Apr 2012 03:44:19 -0700 (PDT)
Received: by 10.112.87.10 with HTTP; Tue, 24 Apr 2012 03:44:19 -0700 (PDT)
In-Reply-To: <20120423230858.GA20236@altlinux.org>
References: <20120423230858.GA20236@altlinux.org>
Date: Tue, 24 Apr 2012 12:44:19 +0200
Message-ID: <CAHpGcMJJJL2QCcsOv_JpVLdvF654uziMHbwQqYexLd5rEebbUg@mail.gmail.com>
From: =?ISO-8859-1?Q?Andreas_Gr=FCnbacher?= <andreas.gruenbacher@gmail.com>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Content-Type: text/plain; charset=ISO-8859-1
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.215.41
Cc: bug-patch@gnu.org
Subject: Re: [bug-patch] v2.6.1-165-gc43eeb2 regression
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Apr 2012 10:44:34 -0000

Dimitry,

Am 24. April 2012 01:08 schrieb Dmitry V. Levin <ldv@altlinux.org>:
> Starting with commit v2.6.1-165-gc43eeb2, output_file function is unable
> to handle to == NULL, and GNU patch now segfaults on this test case [...]

thanks a lot for the bug report. The following snapshot in
ftp://alpha.gnu.org/gnu/patch/ should fix this:

  patch-2.6.1.169-7096.tar.gz

Andreas


From MAILER-DAEMON Sun Apr 29 16:12:00 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SOaTQ-0006OA-R0
	for mharc-bug-patch@gnu.org; Sun, 29 Apr 2012 16:12:00 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44883)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <benedict.elad@hp.com>) id 1SOUoL-0006zC-CL
	for bug-patch@gnu.org; Sun, 29 Apr 2012 10:09:15 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <benedict.elad@hp.com>) id 1SOUoJ-00045g-1d
	for bug-patch@gnu.org; Sun, 29 Apr 2012 10:09:12 -0400
Received: from g1t0029.austin.hp.com ([15.216.28.36]:46055)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <benedict.elad@hp.com>) id 1SOUoI-0003yM-Qa
	for bug-patch@gnu.org; Sun, 29 Apr 2012 10:09:10 -0400
Received: from G2W1953G.americas.hpqcorp.net (g2w1953g.austin.hp.com
	[16.238.8.185]) (using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by g1t0029.austin.hp.com (Postfix) with ESMTPS id CCFB1380FA
	for <bug-patch@gnu.org>; Sun, 29 Apr 2012 14:08:56 +0000 (UTC)
Received: from G5W0324.americas.hpqcorp.net (16.228.8.69) by
	G2W1953G.americas.hpqcorp.net (16.238.8.185) with Microsoft SMTP Server
	(TLS) id 14.2.283.3; Sun, 29 Apr 2012 14:08:22 +0000
Received: from GVW1102EXC.americas.hpqcorp.net ([16.230.34.87]) by
	G5W0324.americas.hpqcorp.net ([16.228.8.69]) with mapi; Sun, 29 Apr 2012
	15:08:22 +0100
From: "Benedict, Elad" <benedict.elad@hp.com>
To: "bug-patch@gnu.org" <bug-patch@gnu.org>
Date: Sun, 29 Apr 2012 15:08:20 +0100
Thread-Topic: New and Deleted files\folders
Thread-Index: Ac0mEYgPYmItYhpgRF6bPRI7uaGxog==
Message-ID: <1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206@GVW1102EXC.americas.hpqcorp.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: multipart/alternative;
	boundary="_000_1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206GVW1102EXCame_"
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-Received-From: 15.216.28.36
X-Mailman-Approved-At: Sun, 29 Apr 2012 16:11:59 -0400
Subject: [bug-patch] New and Deleted files\folders
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Apr 2012 14:09:15 -0000

--_000_1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206GVW1102EXCame_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi all,

I seem to have issues with some very basic functionality - please tell me i=
f I'm using it wrong -


1.      I create and add some folder named A

2.      In it I create a filed A\B.txt

3.      I "svn add" A and verify that A and A\B.txt are added

4.      I "svn delete" some other file - C.txt and verify that it's marked =
as deleted

I then create a patch using "svn diff" into my p.patch file.
I revert all changes in my workspace and apply the patch file.

I expect to have the same state as before the revert - an added file and fo=
lder and a deleted file.
However, it seems that it only modifies certain files, not "svn add"ing or =
"delete"ing any file.

Any idea?

Thanks in advance!
Elad.

P.S
We're working with SVN client version 1.6 and not intending to upgrade it a=
ny time soon.


--_000_1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206GVW1102EXCame_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m=3D"http://sc=
hemas.microsoft.com/office/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-=
html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; chars=
et=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 12 (filtere=
d medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
	{page:WordSection1;}
/* List Definitions */
@list l0
	{mso-list-id:1291129287;
	mso-list-type:hybrid;
	mso-list-template-ids:-658992876 67698703 67698713 67698715 67698703 67698=
713 67698715 67698703 67698713 67698715;}
@list l0:level1
	{mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hi all,<o:p></o:=
p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I seem=
 to have issues with some very basic functionality &#8211; please tell me i=
f I&#8217;m using it wrong &#8211; <o:p></o:p></p><p class=3DMsoNormal><o:p=
>&nbsp;</o:p></p><p class=3DMsoListParagraph style=3D'text-indent:-.25in;ms=
o-list:l0 level1 lfo1'><![if !supportLists]><span style=3D'mso-list:Ignore'=
>1.<span style=3D'font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; </span></span><![endif]><span dir=3DLTR></span>I create and add some fo=
lder named A<o:p></o:p></p><p class=3DMsoListParagraph style=3D'text-indent=
:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style=3D'mso-li=
st:Ignore'>2.<span style=3D'font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; </span></span><![endif]><span dir=3DLTR></span>In it I create=
 a filed A\B.txt<o:p></o:p></p><p class=3DMsoListParagraph style=3D'text-in=
dent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style=3D'ms=
o-list:Ignore'>3.<span style=3D'font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; </span></span><![endif]><span dir=3DLTR></span>I &#8220;s=
vn add&#8221; A and verify that A and A\B.txt are added<o:p></o:p></p><p cl=
ass=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l0 level1 lfo1'=
><![if !supportLists]><span style=3D'mso-list:Ignore'>4.<span style=3D'font=
:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![e=
ndif]><span dir=3DLTR></span>I &#8220;svn delete&#8221; some other file &#8=
211; C.txt and verify that it&#8217;s marked as deleted<o:p></o:p></p><p cl=
ass=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I then create a p=
atch using &#8220;svn diff&#8221; into my p.patch file.<o:p></o:p></p><p cl=
ass=3DMsoNormal>I revert all changes in my workspace and apply the patch fi=
le.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoN=
ormal>I expect to have the same state as before the revert &#8211; an added=
 file and folder and a deleted file.<o:p></o:p></p><p class=3DMsoNormal>How=
ever, it seems that it only <i>modifies</i> <i>certain</i> files, not &#822=
0;svn add&#8221;ing or &#8220;delete&#8221;ing any file.<o:p></o:p></p><p c=
lass=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Any idea?<o:p></=
o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Than=
ks in advance!<o:p></o:p></p><p class=3DMsoNormal>Elad.<o:p></o:p></p><p cl=
ass=3DMsoNormal><o:p>&nbsp;</o:p></p><div style=3D'mso-element:para-border-=
div;border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0p=
t 0in'><p class=3DMsoNormal style=3D'border:none;padding:0in'>P.S<o:p></o:p=
></p></div><p class=3DMsoNormal>We&#8217;re working with SVN client version=
 1.6 and not intending to upgrade it any time soon.<o:p></o:p></p><p class=
=3DMsoNormal><o:p>&nbsp;</o:p></p></div></body></html>=

--_000_1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206GVW1102EXCame_--


From MAILER-DAEMON Sun Apr 29 20:07:52 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SOe9g-0007Wv-4g
	for mharc-bug-patch@gnu.org; Sun, 29 Apr 2012 20:07:52 -0400
Received: from eggs.gnu.org ([208.118.235.92]:49514)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vadmium@gmail.com>) id 1SOe9d-0007Wm-PM
	for bug-patch@gnu.org; Sun, 29 Apr 2012 20:07:50 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <vadmium@gmail.com>) id 1SOe9c-00065C-31
	for bug-patch@gnu.org; Sun, 29 Apr 2012 20:07:49 -0400
Received: from mail-ob0-f169.google.com ([209.85.214.169]:62897)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <vadmium@gmail.com>) id 1SOe9b-00064s-S9
	for bug-patch@gnu.org; Sun, 29 Apr 2012 20:07:48 -0400
Received: by obbwd18 with SMTP id wd18so617117obb.0
	for <bug-patch@gnu.org>; Sun, 29 Apr 2012 17:07:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=Nqb6/rpkMh4MaGgyzT7qC7X86R68avtl0l538z+7ZLo=;
	b=SSYB3xn+O9S02/k8q61+9Fyh2TvCAmID/xRXsLpFubW1wbkofx4jAfCb2S53ss5r42
	gYcfBh/0//vtT2NHlkRxU+2aRfE5mVmgtqi5BU5qFaIEKinWixcuhcR3Qza9CBG+tNAc
	HoPc12WPtruV7+FnxcMT/uTuL6jwZ25+WHpkuQBhse24IuN/fcUX9o4tgldEGJ0SMvMq
	dsB2UhTxohecwhS9R8kwg68merOnjjH77+zXldYFqhrn6rlwIJW7wBAFT9BAzIGzA/Ra
	SvvA+ti8xfevsg2KBnD89bsBZV5UE4rQ9wlTRmdz9yqsDihwBf4T9YjSFNIJrK459N4H
	A6UA==
MIME-Version: 1.0
Received: by 10.60.20.100 with SMTP id m4mr26061218oee.10.1335744465307; Sun,
	29 Apr 2012 17:07:45 -0700 (PDT)
Sender: vadmium@gmail.com
Received: by 10.182.38.198 with HTTP; Sun, 29 Apr 2012 17:07:45 -0700 (PDT)
In-Reply-To: <1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206@GVW1102EXC.americas.hpqcorp.net>
References: <1AA23B9C4D3AAB4B961DCE11B976F91D8ED406D206@GVW1102EXC.americas.hpqcorp.net>
Date: Mon, 30 Apr 2012 00:07:45 +0000
X-Google-Sender-Auth: gNXSGOC4_zgpKBUK-UrU7Zsv_1U
Message-ID: <CA+eR4cGDp-TbS+07mzXum4C7fUdGO3GEEDtzj-xYy42Ax15k3g@mail.gmail.com>
From: Martin Panter <vadmium+floss@gmail.com>
To: "Benedict, Elad" <benedict.elad@hp.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.85.214.169
Cc: "bug-patch@gnu.org" <bug-patch@gnu.org>
Subject: Re: [bug-patch] New and Deleted files\folders
X-BeenThere: bug-patch@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports, suggestions,
	general discussion for GNU patch." <bug-patch.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-patch>
List-Post: <mailto:bug-patch@gnu.org>
List-Help: <mailto:bug-patch-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-patch>,
	<mailto:bug-patch-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Apr 2012 00:07:51 -0000

On 29 April 2012 14:08, Benedict, Elad <benedict.elad@hp.com> wrote:
> I then create a patch using =E2=80=9Csvn diff=E2=80=9D into my p.patch fi=
le.
>
> I revert all changes in my workspace and apply the patch file.
>
>
>
> I expect to have the same state as before the revert =E2=80=93 an added f=
ile and
> folder and a deleted file.
>
> However, it seems that it only modifies certain files, not =E2=80=9Csvn a=
dd=E2=80=9Ding or
> =E2=80=9Cdelete=E2=80=9Ding any file.

Pretty sure this GNU Patch program has nothing to do with Subversion.
Perhaps you could try the =E2=80=9Csvn patch=E2=80=9D command instead, thou=
gh I think
that must be added after I stopped using Subversion a while ago, so I
haven=E2=80=99t tried it myself.


