From owner-freebsd-ports@FreeBSD.ORG Fri Feb 18 06:25:19 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 5581616A4CE for ; Fri, 18 Feb 2005 06:25:19 +0000 (GMT) Received: from smtp810.mail.sc5.yahoo.com (smtp810.mail.sc5.yahoo.com [66.163.170.80]) by mx1.FreeBSD.org (Postfix) with SMTP id 1058643D46 for ; Fri, 18 Feb 2005 06:25:19 +0000 (GMT) (envelope-from pauls@utdallas.edu) Received: from unknown (HELO officeeagle) (pschmehl@sbcglobal.net@209.30.154.203 with login) by smtp810.mail.sc5.yahoo.com with SMTP; 18 Feb 2005 06:25:18 -0000 Message-ID: <006201c51582$980f04a0$7702a8c0@officeeagle> From: "Paul Schmehl" To: References: <20050217190549.72c4eb4d@dolphin.local.net><20050218040730.0bb5933c@it.buh.tecnik93.com><1108693479.663.0.camel@dirk.no.domain><20050218043736.4b34779b@it.buh.tecnik93.com><1108694497.663.3.camel@dirk.no.domain> <20050218045729.64f42437@it.buh.tecnik93.com> Date: Fri, 18 Feb 2005 00:24:45 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Subject: patching? 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: Fri, 18 Feb 2005 06:25:19 -0000 I hope you guys aren't getting tired of my questions, but the porters handbook and googling the lists isn't helping. I'm trying to patch some files in a new port I'm working on, but the patches fail. The patches are in ${FILEDIR}. They were created in {$WRKSRC} with the original file renamed file.orig. Even though I've run make distclean, the patches fail. The error message says they been "previously applied"?? This port does not build. (I'm using NO_BUILD= yes in the Makefile), because there are no files to compile. It's written in tcl, and all the files in the distro are text files. Here's what I get when I make install. make install ===> Extracting for sguil-server-0.5.3 => Checksum OK for sguil-server-0.5.3.tar.gz. ===> Patching for sguil-server-0.5.3 ===> Applying FreeBSD patches for sguil-server-0.5.3 Ignoring previously applied (or reversed) patch. 1 out of 1 hunks ignored--saving rejects to server/archive_sguildb.tcl.rej => Patch patch-archive_sguildb.tcl failed to apply cleanly. *** Error code 1 Stop in /usr/ports/security/sguil-server. This happens even after a make distclean. I'm trying to patch two files to change tclsh to tclsh8.4, because the program won't even run without that, and the user shouldn't have to edit those files manually. I'm also trying to patch the conf file to change some paths to FreeBSD paths from Linux paths. I have tried creating patches uisng -u, -ar, -uar, -Naur, -r, -a. None has worked. I've looked at patches in other ports and read the Makefiles and bsd.port.mk to no avail. I'm sure it's something very simple, but for the life of me, I can't figure it out. I even added PATCH_DEBUG= yes to see if I could see what was wrong. *Then* the patches applied just fine, but *after* prompting me to use -R. make ===> Patching for sguil-server-0.5.3 ===> Applying FreeBSD patches for sguil-server-0.5.3 ===> Applying FreeBSD patch /usr/ports/security/sguil-server/files/patch-archive_sguildb.tcl Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- server/archive_sguildb.tcl Thu Feb 17 23:14:14 2005 |+++ server/archive_sguildb.tcl.orig Mon Dec 6 12:27:55 2004 -------------------------- Patching file server/archive_sguildb.tcl using Plan A... Reversed (or previously applied) patch detected! Assume -R? [y] Hunk #1 succeeded at 1. done ===> Applying FreeBSD patch /usr/ports/security/sguil-server/files/patch-sguild Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- server/sguild Thu Feb 17 23:14:16 2005 |+++ server/sguild.orig Mon Nov 22 16:42:40 2004 -------------------------- Patching file server/sguild using Plan A... Reversed (or previously applied) patch detected! Assume -R? [y] Hunk #1 succeeded at 1. done ===> Applying FreeBSD patch /usr/ports/security/sguil-server/files/patch-sguild.conf Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- server/sguild.conf Thu Feb 17 23:14:17 2005 |+++ server/sguild.conf.orig Mon Nov 22 17:53:57 2004 -------------------------- Patching file server/sguild.conf using Plan A... Reversed (or previously applied) patch detected! Assume -R? [y] Hunk #1 succeeded at 1 with fuzz 1. Hunk #2 succeeded at 9. Hunk #3 succeeded at 60. Hunk #4 succeeded at 71. done ===> Configuring for sguil-server-0.5.3 So, I tried using PATCH_ARGS+= -R in the Makefile, but that failed. I even edited the patch files to remove the RCS lines from the patch, but that didn't change anything. I'm just about willing to get some chicken entrails, if that will help, but this port ain't gonna work unless the patches apply cleanly, so I'm stuck. What the heck is the secret to patching files when you don't have to compile a binary? Paul Schmehl (pauls@utdallas.edu) Adjunct Information Security Officer The University of Texas at Dallas AVIEN Founding Member http://www.utdallas.edu/~pauls/