From owner-freebsd-ports@FreeBSD.ORG Wed Mar 9 20:39:36 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 226A616A4CE for ; Wed, 9 Mar 2005 20:39:36 +0000 (GMT) Received: from mail.desa-projekt.de (mail.desa-projekt.de [217.172.178.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2EE143D5F for ; Wed, 9 Mar 2005 20:39:34 +0000 (GMT) (envelope-from lists-fbsd-ports@bsdberlin.org) Received: (qmail 11394 invoked from network); 9 Mar 2005 20:39:43 -0000 Received: from i3ed6968d.versanet.de (HELO tiberian.bsdberlin.local) (lists-fbsd-ports@bsdberlin.org@62.214.150.141) by mail.desa-projekt.de with SMTP; 9 Mar 2005 20:39:43 -0000 Date: Wed, 9 Mar 2005 21:39:34 +0100 From: Danny Koenig To: Mark Foster Message-ID: <20050309213934.61a02bd1@tiberian.bsdberlin.local> In-Reply-To: <422F4B31.3070503@foster.cc> References: <422F4B31.3070503@foster.cc> X-Mailer: Sylpheed-Claws 1.0.1 (GTK+ 1.2.10; FreeBSD/i386) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: ports@freebsd.org Subject: Re: finnicky patch X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 20:39:36 -0000 On Wed, 09 Mar 2005 11:14:57 -0800 Mark Foster wrote: > Trying to prepare a patch to submit for updating cfengine2 to 2.1.13. > > I could use a little advice... as it doesn't apply clean to > cfengine2/Makefile and it doesn't create cfengine2/files/patch-item.c > although it say it is creating it. My understanding is that the -P > flag to diff so it will create the previously nonexistent > patch-item.c Currently I don't understand the exact problem, but I used your Diff and patch the files (without patching Makefile). Then I rebuild your Diff and it works. Maybe anyone else can explain the reason for this problem. See here: tiberian# patch < patch-cfengine.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- sysutils/cfengine2.orig/Makefile Wed Mar 9 20:35:16 2005 |+++ sysutils/cfengine2/Makefile Wed Mar 9 21:23:58 2005 -------------------------- Patching file sysutils/cfengine2/Makefile using Plan A... Hunk #1 succeeded at 6. Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |--- sysutils/cfengine2.orig/distinfo Fri Apr 30 09:56:07 2004 |+++ sysutils/cfengine2/distinfo Wed Mar 9 21:23:58 2005 -------------------------- Patching file sysutils/cfengine2/distinfo using Plan A... Hunk #1 succeeded at 1. Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |--- sysutils/cfengine2.orig/files/patch-item.c Wed Dec 31 16:00:00 1969 |+++ sysutils/cfengine2/files/patch-item.c Mon Mar 7 14:19:23 2005 -------------------------- Patching file sysutils/cfengine2/files/patch-item.c using Plan A... Hunk #1 succeeded at 1. done tiberian# cat patch-cfengine.patch --- sysutils/cfengine2.orig/Makefile Wed Mar 9 20:35:16 2005 +++ sysutils/cfengine2/Makefile Wed Mar 9 21:23:58 2005 @@ -6,7 +6,7 @@ # PORTNAME= cfengine2 -PORTVERSION= 2.1.10 +PORTVERSION= 2.1.13 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.iu.hio.no/pub/cfengine/ \ ${MASTER_SITE_GNU} --- sysutils/cfengine2.orig/distinfo Fri Apr 30 09:56:07 2004 +++ sysutils/cfengine2/distinfo Wed Mar 9 21:23:58 2005 @@ -1,2 +1,2 @@ -MD5 (cfengine-2.1.5.tar.gz) = 0c7c15d646defe23123708ee836b4040 -SIZE (cfengine-2.1.5.tar.gz) = 1852357 +SIZE (cfengine-2.1.13.tar.gz) = 3153867 +MD5 (cfengine-2.1.13.tar.gz) = 2c002fc37f2fc9f87248ad8b9e899091 --- sysutils/cfengine2.orig/files/patch-item.c Wed Dec 31 16:00:00 1969 +++ sysutils/cfengine2/files/patch-item.c Mon Mar 7 14:19:23 2005 @@ -0,0 +1,15 @@ +--- src/item.c.orig Mon Jan 24 13:57:15 2005 ++++ src/item.c Mon Mar 7 10:21:42 2005 +@@ -1036,10 +1036,10 @@ + { struct Item *args; + char *sp; + long cmp = -1, start = -1, end = -1; ++ char host_basename[CF_MAXVARSIZE]; + Debug("SRDEBUG in FuzzyHostMatch(): %s vs %s\n",s2,s1); + args = SplitStringAsItemList(s1,','); + sp = s2; +- char host_basename[CF_MAXVARSIZE]; + + for (sp = s2+strlen(s2)-1; sp > s2; sp--) + { + tiberian#