[rancid] Re: Applying Patches

Devon True devon at noved.org
Wed Jun 30 17:50:40 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/30/2010 1:19 PM, Christopher DeRemer wrote:
>>> On 6/29/2010 3:42 PM, Christopher DeRemer wrote:
>>> 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)

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwrg/AACgkQWP2WrBTHBS/OuwCfaoOT79WJw+IBBP+MFTf8SBby
fo8AniEfjSJTfy/lI9y8X2NZ7Ly65Atd
=rGHx
-----END PGP SIGNATURE-----


More information about the Rancid-discuss mailing list