Hi How can I apply a Patch to Wireshark using TortoiseSVN application? asked 08 Mar '13, 14:39 steve21 |
One Answer:
Not really a Wireshark question. Anyway a patch file modifies the source code of an application not the binary. You'll need to get a Wireshark development environment setup first, check you can build an unmodified version, then apply the patch and rebuild. To apply the patch with Tortoise, right click on the top level directory and from the Tortoise menu select "Apply patch", then select the patch file. answered 08 Mar '13, 14:54 grahamb ♦ |
Hi
Thanks for your answer. Still I could not apply it. Do you know any other method to apply it?
1) I have Download the wireshark source code and compile with Microsoft Visual Studio nmake -f Makefile.nmake setup nmake -f Makefile.nmake all 2) Checkout the following patch file from our SVN repositoy and try to apply the Patch using Tortoise SVN. 3) Finally I compile the wireshark source code using the command 'nmake -f Makefile.nmake all' 4) Run wireshark from the directory wireshark/wireshark-gtk2 using the command 'wireshark.exe'
So presumably
failed, if you "could not apply [the patch]". What happened when you tried it? Did Tortoise report an error? If so, what was the error?
I am not so sure but when I apply it, I see 3 TortoiseUdiff windows with message 'Rejected patch hunks for 'packet-gprscdr.c'
(Converted to a comment in keeping with the convention for using ask.wireshark.org. Please see the FAQ).
"rejected patch hunks..." means just that. At least some parts (hunks) of the patch didn't apply cleanly to the source file.
This usually happens because the source file has changed somehow (in the lines affected by the patch) since the patch was made.
Patch matches lines around the patch before applying the patch.
So: If you want to fix things manually, you'll need to use an editor to examine the patch file and the source file, determine which patches (if any) did get applied, see why the others didn't get applied, and then update the source file as needed with the un-applied patch hunks.
packet-gprscdr.c is a generated dissector perhaps you should patch or add the asn1 files you presumably changed and regenerate the dissector with asn2wrs or if possibly offer the changes to GPL Wireshark to have them included.