From owner-freebsd-questions@FreeBSD.ORG Sun Nov 11 17:18:41 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DA4516A418 for ; Sun, 11 Nov 2007 17:18:41 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 9422A13C48E for ; Sun, 11 Nov 2007 17:18:39 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id lABHI1P1025948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 11 Nov 2007 19:18:17 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id lABHHtON003249; Sun, 11 Nov 2007 19:17:55 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id lABHHtge003248; Sun, 11 Nov 2007 19:17:55 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sun, 11 Nov 2007 19:17:55 +0200 From: Giorgos Keramidas To: Matthias Apitz Message-ID: <20071111171755.GC3038@kobe.laptop> References: <20071111150251.GA15448@rebelion.Sisis.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071111150251.GA15448@rebelion.Sisis.de> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.993, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.41, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: problems with building a patch X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2007 17:18:41 -0000 On 2007-11-11 16:02, Matthias Apitz wrote: > > Hello, > > I've build a patch for 'nn-6.7.3' to add support for RFC1522 to my > beloved news-reader. Before giving it away I was trying it on a fresh > workspace of the /usr/ports/news/nn and run into the problem that > new files which brings the patch to the tree are always created > in the current working dir, even if I create them before with touch(1), > existing files, like 'answer.c' in the example below, get patched > correctly: > > $ /usr/ports/news/nn/work > $ touch nn-6.7.3/PATCH.RFC1522 > $ patch < ../myRFC1522.patch > Hmm... Looks like a unified diff to me... > The text leading up to this was: > -------------------------- > |diff -N -r -u -X exclude nn-6.7.3/PATCH.RFC1522 nn-6.7.3.patched/PATCH.RFC1522 > |--- nn-6.7.3/PATCH.RFC1522 Thu Jan 1 01:00:00 1970 > |+++ nn-6.7.3.patched/PATCH.RFC1522 Sat Nov 10 11:04:58 2007 > -------------------------- Here's the problem. The patch files for ports should *not* include the `nn-6.7.3' part, like this one. They should be relative to the toplevel directory of the unzipped/untarred port, i.e.: diff -N -u PATCH.RFC1522.orig PATCH.RFC1522 --- PATCH.RFC1522.orig Thu Jan 1 01:00:00 1970 +++ PATCH.RFC1522 Sat Nov 10 11:04:58 2007