Discussion:
[rancid] Applying Patches
Christopher DeRemer
2010-06-29 19:42:42 UTC
Permalink
Sorry for the newbie questions but after a brief search I didn't find any clear instructions. How do I apply .diff file patches to my Rancid

Cheers,
Christopher DeRemer, CCENT
Network Administrator
Phoebe Services
484.619.2168 (Single # Reach)


________________________________
NOTICE: This confidential message/attachment contains information intended for a specific individual(s). Any inappropriate use, distribution or duplication is strictly prohibited. If received in error, notify the sender and immediately delete this transmission.
Christopher DeRemer
2010-06-30 17:19:16 UTC
Permalink
Sorry for the newbie questions but after a brief search I didn?t find
any clear instructions. How do I apply .diff file patches to my Rancid
After installing rancid, you should be able to go into the appropriate directory (most like RANCID_DIR/bin/) and use the "patch" command to apply the patchfile (e.g. >patch -p1 < patchfile). Some massaging of the patch process may be required and if the patch is small enough, editing the file directly by hand (save a backup first!) is >not hard.
Background... trying to patch Michael Stafaniuc's Cisco WLC patch http://www.gossamer-threads.com/lists/rancid/users/4895

If I try "patch -p1 < rancid-ciscowlc.diff" I get the following output:
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -up ./bin/Makefile.am.wlc ./bin/Makefile.am
|--- ./bin/Makefile.am.wlc 2010-03-24 00:33:51.000000000 +0100
|+++ ./bin/Makefile.am 2010-04-27 19:11:43.000000000 +0200
--------------------------
File to patch:

As far as I can tell he's not just modifying one file, it seems like he has several files that he's changing (see thread content)

Cheers,
Chris

NOTICE: This confidential message/attachment contains information intended for a specific individual(s). Any inappropriate use, distribution or duplication is strictly prohibited. If received in error, notify the sender and immediately delete this transmission.
Devon True
2010-06-30 17:50:40 UTC
Permalink
Post by Christopher DeRemer
Sorry for the newbie questions but after a brief search I didn?t find
any clear instructions. How do I apply .diff file patches to my Rancid
After installing rancid, you should be able to go into the appropriate directory (most like RANCID_DIR/bin/) and use the "patch" command to apply the patchfile (e.g. >patch -p1 < patchfile). Some massaging of the patch process may be required and if the patch is small enough, editing the file directly by hand (save a backup first!) is >not hard.
Background... trying to patch Michael Stafaniuc's Cisco WLC patch http://www.gossamer-threads.com/lists/rancid/users/4895
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
--------------------------
|diff -up ./bin/Makefile.am.wlc ./bin/Makefile.am
|--- ./bin/Makefile.am.wlc 2010-03-24 00:33:51.000000000 +0100
|+++ ./bin/Makefile.am 2010-04-27 19:11:43.000000000 +0200
--------------------------
As far as I can tell he's not just modifying one file, it seems like he has several files that he's changing (see thread content)
I extracted the rancid-2.3.3 tarball, entered the directory, copied the
rancid-ciscowlc.diff into that directory, and used the "-p0" option.
That seems to have worked:

$ tar -xzf rancid-2.3.3.tar.gz
$ cd rancid-2.3.3/

$ patch -p0 < rancid-ciscowlc.diff
patching file ./bin/Makefile.am
patching file ./bin/rancid-fe.in
patching file ./bin/wlclogin.in
patching file ./bin/wlcrancid.in
patching file ./configure.in

- --
Devon

Loading...