PDA

View Full Version : Patching



ThunderBob
02-05-2005, 08:05 PM
OK.
I know its here but couldnt find it.

Whats the command for patching SEQ with a patch file?

Repy or link to the thread that explains it would be nice :)

ieatacid
02-05-2005, 08:30 PM
patch -p0 < nameofpatch.patch

Halfoak
02-06-2005, 12:32 AM
I have been trying to patch all night..

I downloaded a new version from CVS, and got the patch ready using patch -p0 < 02052005[1].patch but it keeps giving me Hunk failed messages, and also can't find file to patch..

Is the patch suppose to propmt me for every part such as.. packetformat.h, and where that file is??

Thank you..

Halfoak

uRit1u2CBBA=
02-06-2005, 03:09 AM
There are 2 versions in the cvs -- 4.x.x.x and 5.x.x.x --- you sure you got the version 5?

If done properly, the patch will not prompt for anything.

Halfoak
02-06-2005, 03:46 AM
I must be doing something wrong then, I downloaded showeq-5.0.0.16a.tar.bz2

I then extracted into it's own folder.

I then took and extracted the patch and patch -p0 < 02052005[1].patch

I am going to try it again on a clean boot and install and see what happens.. If I have anymore problems I will post back..

Thank you for the help so far..

kmkm
02-06-2005, 06:02 AM
You need to get the version from CVS not a tarball.

Saying that, it almost completely patches against the ShowEQ-5.0.0.16 tarball (except for the spells_en*.pl script, I forget the name).

Search the forums, there's plenty of instructions for downloading from CVS.

HTH,

Halfoak
02-06-2005, 01:09 PM
I wanted to thank you for the info.. Yes I did down load the tar, instead of cvs.. I did that on a PC and copyied it over due to my linux box not being able to see This site now for some reason..

I will go thru the process of getting the cvs verison and going from there.. Thank you again..

Halfoak

slyly
02-06-2005, 02:59 PM
There are 2 versions in the cvs -- 4.x.x.x and 5.x.x.x --- you sure you got the version 5?

Will copying "pre_5_0_beta" from the cvs still give us the latest version?

uRit1u2CBBA=
02-06-2005, 04:15 PM
The latest cvs version, yes. Which then can be patched to a state where it will mostly work.

IamGman
02-06-2005, 08:15 PM
I had some issues with the patch too, but I found out what the problem was. I DLed from CVS and tried to apply the patch from my cvs root which is /root/showeq, but the patch assumes the root is /cvsroot/seq/showeq and kept telling me files were missing. There were also 2 subdirectories that did not exist for me /root/showeq/conf/Attic and /root/showeq/src/Attic.

I deleted the Attic portion of the directory names and changed all /cvsroot/seq/showeq entries to point to /root/showeq and everything patched and compiled fine. That may help some people who are having the same problem.

Halfoak
02-06-2005, 09:45 PM
That is the problem I am having.. Could you please tell me what you did? I have a limited amount of programming exp here.. What I have had is like 15 years old, and hard to remember..

Any help would be greatful..

thanks

bonkersbobcat
02-06-2005, 10:23 PM
Patch takes a patch file and a directory structure and tries to apply the patches in the patch file to the directory structure. A patch file contains one or more patches, each with information as to what to patch.

The most common problem with applying patches is that the "top" of the directory structure in the patch file is not the same as the top of the directory structure that you are applying the patches to. In order to get a patch to run cleanly you must run the patch command from the same relative directory that the person who created the patch file was in when they created the patch file.

There are options to patch that adjust how it matches directory structures and allows you to run patch from above or below the point in the directory tree where the patch file was created. For details look at the -p and the --strip options. (Read the manual pages.)

The most common case is that you use the -p0 option.

BB

Edit: Grammar

gruntsters
02-06-2005, 11:09 PM
Ok, I tried using the cvs download instructions listed in the faqs section. I used it before, but was using RH9. I have FC3 now and am getting a bash error of


bash: cvs: command not found

is cvs not supported in FC3 or something ?

uRit1u2CBBA=
02-06-2005, 11:20 PM
You just didn't install the package. Search the redhat web site for the cvs RPM and install it.

Halfoak
02-07-2005, 01:13 PM
OKay, I guess I am just not understanding this correctly..

This is what I have done..

export CVSROOT=:pserver:[email protected]:/cvsroot/seq
cvs login
<enter>
cvs co -r pre_5_0_beta showeq
cvs logout
cd showeq
make -f Makefile.dist all
./configure
make && make install

then when that was all done..

cd /root
patch -p0 < 02052005[1].patch

when I do the patch I get this..

can't find file to patch at input line 6
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: conf/zoneopcodes.xml
|================================================= ==================
|RCS file: /cvsroot/seq/showeq/conf/Attic/zoneopcodes.xml,v
|retrieving revision 1.1.4.12
|diff -r1.1.4.12 zoneopcodes.xml
--------------------------
File to patch:

Could someone please tell me what step I missed, or what I may be doing wrong.. Along with how I can go about patching correctly and get skittles..

Thank you

Halfoak

Could_Be_Anyone
02-07-2005, 01:27 PM
OKay, I guess I am just not understanding this correctly..

This is what I have done..

export CVSROOT=:pserver:[email protected]:/cvsroot/seq
cvs login
<enter>
cvs co -r pre_5_0_beta showeq
cvs logout
cd showeq
make -f Makefile.dist all
./configure
make && make install

then when that was all done..

cd /root
patch -p0 < 02052005[1].patch

when I do the patch I get this..

can't find file to patch at input line 6
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: conf/zoneopcodes.xml
|================================================= ==================
|RCS file: /cvsroot/seq/showeq/conf/Attic/zoneopcodes.xml,v
|retrieving revision 1.1.4.12
|diff -r1.1.4.12 zoneopcodes.xml
--------------------------
File to patch:

Could someone please tell me what step I missed, or what I may be doing wrong.. Along with how I can go about patching correctly and get skittles..

Thank you

Halfoak


You need to apply the patch BEFORE you compile the program.:
export CVSROOT=:pserver:[email protected]:/cvsroot/seq
cvs login
<enter>
cvs co -r pre_5_0_beta showeq
cvs logout
#[at this point, copy the patch to ../showeq/
cd ../showeq
patch -p0 < nameofpatch.patch
#[Now, go ahead an compile]
make -f Makefile.dist all
./configure
make && make install

Halfoak
02-07-2005, 01:39 PM
when I do this the first patch this is what I am getting..

linux:~/showeq # patch -p0 < 02052005[1].patch
patching file conf/zoneopcodes.xml
Hunk #4 FAILED at 24.
1 out of 4 hunks FAILED -- saving rejects to file
conf/zoneopcodes.xml.rej
can't find file to patch at input line 26
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|---28c28
|< <opcode id="0027" name="OP_ClientUted=""
implicitlen="18" updated="05/26/04">
|---
|> <opcode id="744f" name="OP_ClientUted=""
implicitlen="18" updated="01/17/05">
--------------------------
File to patch:

Is this as far as it goes?? this is done as new cvs before compile..

Thanks..

Halfoak
02-07-2005, 02:00 PM
Sorry, I must be 2/3rds alseep.. I have been trying to patch using the 02052005 patch.. I went and patched using the 02062005 patch and it only faile 3 hunks on on one file. but the rest went thru..


Thank you for all the help..

1 last question tho.. With you guys updating zone and world xml files, is that all I will have to do is D/L them into my /showeq/conf folder and then recompile?

Sorry for being such a newb, and thank you for all your help..

Halfoak

I<3EQ
02-07-2005, 02:47 PM
You are correct; the XML files do not have to be compiled.

You might also want to wipe out your current pull of the source, re-sync with CVS, and re-patch. It sounds like you patched somewhere along the line and forgot to roll back to the vanilla CVS before re-patching with rev. 2 (or something else that contaminated your tree).

If you have any failed chunks, it means something isn't right and there's a chance the software will perform in unreliable or unexpected ways.

uRit1u2CBBA=
02-07-2005, 03:05 PM
the "make install" copies the .xml files from ../showeq/conf to /usr/local/share/showeq, where they are read in at run-time.

So if you manually updated anything from share, no need to re-make anything. Just exit and restart (may be a way to reload xml within the program, but I don't know that off hand).

eqhunter
02-07-2005, 04:50 PM
I would like to do a fresh install. wheres the csv for that?

uRit1u2CBBA=
02-07-2005, 05:37 PM
see top of thread, and use the most recent patch file 02062005.patch instead of the one shown.

Zeus001
02-07-2005, 11:40 PM
I use the latest version of Fedora Core, and when I use the Patch command, I get nothing but blank lines (can click away and keep clicking below it all day) - this sound like a problem with my patch.rpm or perhaps the version with Fedora Core not compatible?

Thanks

kmkm
02-08-2005, 03:12 AM
hmmmm.... I almost get the impression you're running: "patch -p0 file.patch" instead of "patch -p0 < file.patch" :)

That's only a guess though.