Welcome! Log In Create A New Profile

Advanced

haproxy + stunnel + patch not working

Posted by Xavier Fustero 
Xavier Fustero
haproxy + stunnel + patch not working
September 03, 2009 01:10PM
Hi,

I can't get patch 'stunnel-4.22-xforwarded-for.diff' being executed
successfully with stunnel-4.22 on my solaris box.
To be honest, I am a bit loss how to apply this patch .

I did the following steps:

* cd /var/tmp/stunnel-4.22
* patch -p0 ../stunnel-4.22-xforwarded-for.diff
Looks like a unified context diff.
File to patch: /var/tmp/stunnel-4.22/src/client.c

I don't know to which file should be applied. Looking into the
stunnel-4.22-xforwarded-for.diff file, there are some differences with
several files. Most of them come from src/client.c. I tried with this
file and some other (in different attempts) but I always get many fails:

Hunk #1 failed at line 534.
1 out of 1 hunks failed: saving rejects to
/var/tmp/stunnel-4.22/src/client.c.rej
The next patch looks like a unified context diff.
Hunk #1 failed at line 445.
1 out of 1 hunks failed: saving rejects to
/var/tmp/stunnel-4.22/src/client.c.rej
The next patch looks like a unified context diff.
The next patch looks like a unified context diff.
Hunk #1 failed at line 53.
1 out of 1 hunks failed: saving rejects to
/var/tmp/stunnel-4.22/src/client.c.rej
The next patch looks like a unified context diff.
Hunk #1 failed at line 765.
1 out of 1 hunks failed: saving rejects to
/var/tmp/stunnel-4.22/src/client.c.rej
The next patch looks like a unified context diff.
Hunk #1 failed at line 227.
Hunk #2 failed at line 330.
2 out of 2 hunks failed: saving rejects to
/var/tmp/stunnel-4.22/src/client.c.rej
done

Looking into the file.rej I see the commands are related to the
"xforwardedfor". Then I compile and install stunnel but it complains
with the command:

xforwardedfor=yes

Any hint on applying the patch will be appreciated!
Thanks a lot,
Xavi
Willy Tarreau
Re: haproxy + stunnel + patch not working
September 05, 2009 07:30PM
On Thu, Sep 03, 2009 at 12:58:26PM +0200, Xavier Fustero wrote:
> Hi,
>
> I can't get patch 'stunnel-4.22-xforwarded-for.diff' being executed
> successfully with stunnel-4.22 on my solaris box.
> To be honest, I am a bit loss how to apply this patch .

I also have had very painful experiences with solaris' patch utility.
It says it supports unified diff but it does not. From my memories,
it tried to apply all the chunks to the same file, or something like
this. Better install the gnu patch utility from sunfreeware.com or
patch your files from another machine and bring them to your solaris
box.

Willy
Xavier Fustero
Re: haproxy + stunnel + patch not working
September 07, 2009 10:10AM
Hi Willy,

gnu patch from sunfreeware worked perfectly!

Thanks a lot,
Xavi


> On Thu, Sep 03, 2009 at 12:58:26PM +0200, Xavier Fustero wrote:
>
>> Hi,
>>
>> I can't get patch 'stunnel-4.22-xforwarded-for.diff' being executed
>> successfully with stunnel-4.22 on my solaris box.
>> To be honest, I am a bit loss how to apply this patch .
>>
>
> I also have had very painful experiences with solaris' patch utility.
> It says it supports unified diff but it does not. From my memories,
> it tried to apply all the chunks to the same file, or something like
> this. Better install the gnu patch utility from sunfreeware.com or
> patch your files from another machine and bring them to your solaris
> box.
>
> Willy
>
>
Sorry, only registered users may post in this forum.

Click here to login