patching?
Michael C. Shultz
ringworm01 at gmail.com
Sun Feb 20 09:57:46 PST 2005
On Thursday 17 February 2005 10:24 pm, Paul Schmehl wrote:
> 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.
Post the 5 top lines or so of one of your patches please.
-Mike
>
> 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 at utdallas.edu)
> Adjunct Information Security Officer
> The University of Texas at Dallas
> AVIEN Founding Member
> http://www.utdallas.edu/~pauls/
>
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to
> "freebsd-ports-unsubscribe at freebsd.org"
More information about the freebsd-ports
mailing list