LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   i'm unable to run a patch (http://www.linuxquestions.org/questions/linux-newbie-8/im-unable-to-run-a-patch-215592/)

clueless_user 08-09-2004 10:35 PM

i'm unable to run a patch
 
i'm installing qmail using the guide from qmailrocks.org, and i cant seem to run a the patch in step 2.

i'm a newbie in linux and i only know the REAL basic commands.. but i need to install qmail as one of the requirements in my class, so i'm following the guide from qmailrocks.org, since it seems to be very detailed.

please help me!!!

btmiller 08-10-2004 12:10 AM

What exact command are you running and what exactly is the error message that you're seeing?

clueless_user 08-10-2004 10:13 AM

this line..
/downloads/qmailrocks/scripts/util/qmail_big_patches.script

but its saying that no files or directory found..
but i know its there...

scuzzman 08-10-2004 02:15 PM

run this command sequence and paste the results (# inducates root prompt):
Code:

# cd /downloads/qmailrocks/scripts/util
# ls -al | grep *patch*

Check the permissions if teh file is executable, that the speeling/case is correct, adn that your doing it as root, or that hte directories are +rwx for your user/group

clueless_user 08-11-2004 10:43 PM

ok, so i change the permission and run the command again.. and this time it showed a different result...

something like:
Code:

can't find file to patch at input line 4
perhaps you should have used the -p or --strip option?
the text leading up to this was:
| qmail-1.03-vanilla/FILES
qmail-1.03-patched/FILES

skipping this file? [y]

skipping patch.
3 out of 3 hunks ignored.

Then it just kept repeating, but changing the file..

i don't know if i should be happy or not ( this is making me feel really stupid!) :cry:

OEP 08-11-2004 10:57 PM

Just a thought, but maybe you should cd to the directory above the qmail and run the patch. Like:

If qmail is in:
/home/foo/qmail

Run the patch while you are in:
/home/foo

Is there an online version of the instructions?

clueless_user 08-12-2004 01:01 AM

i've tried to run the patch in just about every location i can think of, and it the output is still the same.

what should i do now?

BTW, thanks for the help!!!

do you think that i should just install "qmail for dummies"? do you guys recommend that?

btmiller 08-12-2004 01:24 AM

The message about patch being unable to find the source file suggests you are running patch at the wrong level of the QMail source tree. Basically, if you open up the patch file you will see paths to files in the QMail source tree. They are relative (as opposed to absolute) paths. According to my patch manpage, if you leave off the -p option, patch will just look for the file in the current directory, which is not what you want. If you're in the root of the QMail source tree, you probably want -p1 as the argument to patch (most patches are generated against the source of the tree). But try -p0 or -p1 just to be safe. Alternatively, when patch asks for for the location of the file to patch, you can tell it (the find command will come in useful here). Please consult man patch, particularly the -p option, for details. This can be somewhat confusing, so just relax and try to understand what's going on and how patch works. It sometimes takes me two or three tries to apply a patch until I get the level figured out (but one of -p0 or -p1 from the root of the QMail source should work).

clueless_user 08-12-2004 01:58 AM

i've tried this command:

patch -p0 < downloads/qmailrocks/scripts/util/qmail_big_patches.script

this was the result:

patch: **** only garbage was found in the patch input

what does that mean? :scratch: (sorry if the question is stupid.. )

btmiller 08-12-2004 02:38 AM

The patch ought to have a .patch extension (this is the custom, at any rate) -- were you patching against this script file when you got the "can't find file to patch" error message? My guess is you're not giving it the patch file.

clueless_user 08-16-2004 08:37 PM

qmail_big_patches.script, (the script that i'm trying to execute) includes the following inside the script.


Code:

#!/bin/sh PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/sbin

 #So let's go...  cd /usr/src/qmail/qmail-1.03

#Apply John Simpson's gigantic all-in-one qmail patch  echo echo "Applying John Simpson's all in one qmail patch..."
 sleep 2
 patch < /downloads/qmailrocks/patches/qmail-1.03-jms1.5.patch
sleep 2
 #Next, we will apply the forcetls patch  echo echo "Applying Ryan Schlesinger's forcetls patch"
sleep 2
 patch < /downloads/qmailrocks/patches/qmail-1.03-forcetls-20040703.patch 
sleep 2
echo "All done!"

by the way, its still not running..

clueless_user 08-16-2004 10:16 PM

should i start over again?
if i just need to install qmail interface, do i really need to install the other additional qmail tools that comes with the instructions? things like q-trap, qms-analog and other things like that?

whats the most simplest way to install it?

btmiller 08-16-2004 11:10 PM

It looks like that file is a shell script that actually runs the patch command for you. So you just need to run the script and everything should work. It does try to cd to /usr/src/qmail/qmail-1.03 (see line 2, I hope that's just a formatting glitch and the cd is not commented out, if it is, you'll need to run patch from the qmail source directory) so you'll need to be sure that exists (or it may not matter, see previous note). You probably don't need to install all of these extras, but I'm not sure since I've never played with QMail. If you don't understand what they do or aren't sure, you might be better served just going on. You can always come back later and rebuild if something doesn't go quite right.

clueless_user 08-19-2004 12:52 AM

i quit using qmailrocks as a guide because i was losing hope.. i really need to install all of this by the end of the week. so basically, i need to have a running mail server in two days...

i decided to find another guide in the internet and i found life with qmail. i got a lot further in less than an hour than i ever did with qmailrocks.

now i have to configure qmail.. i cant understand the instructions so how do i do it?
do i really need multiple host names and virtual domains when its only a for a small LAN? it will only be used in a classroom.

artimador 03-11-2005 10:23 AM

Have you tried the qmail rocks mailing list? I know the last post was in august but the qmailrocks installation guide works fine. Did you start over from scratch?


All times are GMT -5. The time now is 09:57 PM.