DeveloperSide.NET Forums
July 04, 2020, 05:30:45 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to apply Patches for Apache 2.0.54, zlib 1.2.3, etc  (Read 6892 times)
0 Members and 1 Guest are viewing this topic.
mattd
Member
*
Posts: 4


View Profile
« on: October 13, 2005, 11:55:00 PM »

There is a post in this forum

http://forums.devside.net/viewtopic.php?t=740

Which tells you about some patches you can apply to get teh newest version of zlib (this i would like to know the most) and open ssl

But how do you compile it with this patch?? i am really new to compiling stuff on windows. I can do it i have all the right tools and inclnation. However,

I have no idea how to read the patch and to add the approprite changes, can some one explain what the
Code:
+ and - and @@


and what the headings mean?
Code:

diff -uwr httpd-2.0.53.orig/modules/filters/mod_deflate.dep httpd-2.0.53/modules/filters/mod_deflate.dep
--- httpd-2.0.53.orig/modules/filters/mod_deflate.dep 2004-11-24 11:31:10.000000000 -0800
+++ httpd-2.0.53/modules/filters/mod_deflate.dep 2005-02-16 17:56:08.140625000 -0800
@@ -5,52 +5,32 @@


And which files do you apply this stuff to?

Cheers and thankyou in advance for all your help.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: October 14, 2005, 12:45:35 AM »

There is nothing to compile, just to edit a few lines of a source file.  In the original thread, check the links (documentation) for programs 'patch' and 'diff'...  The two tools you will use (actually you will only use 'patch').

'diff' give you the difference between the patched and un-patched file [all those --- and +++ lines].  The 'diff's' are already provided to you, in the forum of the patch [--- +++] file.
'patch' will take that 'diff' file (patch file) and correct/patch the up-patched file.
Its very simple, and with some of these one-liner patches, you can do by hand once you understand the nomenclature.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
mattd
Member
*
Posts: 4


View Profile
« Reply #2 on: October 14, 2005, 05:23:39 AM »

Manual pages for diff and patch...
http://www.rt.com/man/diff.1.html
http://www.rt.com/man/patch.1.html

These links dont work for me?

Is there a program that can apply the patch for me?
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: October 14, 2005, 06:38:52 AM »

Yeah, now I see that those links are down, and I have no idea if they will be back.

Try the Docs under [download links too]...
http://gnuwin32.sourceforge.net/packages/patch.htm
http://gnuwin32.sourceforge.net/packages/diffutils.htm

If that does not help, a google query on 'patch diff' should do.
Though I'll probably just post the instructions and files myself [if you want to wait].
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #4 on: October 14, 2005, 06:49:37 AM »

Quote
Is there a program that can apply the patch for me?

Yeah, it's called 'patch.exe'

Extract openssl v0.9.8 and zlib v1.2.3 as C:\build\httpd-2.0.54\srclib\zlib and openssl dirs

openssl-patch.txt (to be placed under C:\build\httpd-2.0.54])
Quote

httpd-2.0.54/modules/ssl/ssl_toolkit_compat.h
*** httpd-2.0.54.orig/modules/ssl/ssl_toolkit_compat.h  Fri Feb  4 21:21:18 2005
--- httpd-2.0.54/modules/ssl/ssl_toolkit_compat.h       Tue Jul  5 11:33:33 2005
***************
*** 99,104 ****
--- 99,111 ----
  #define HAVE_SSL_X509V3_EXT_d2i
  #endif
 
+ #ifndef PEM_F_DEF_CALLBACK
+ #ifdef PEM_F_PEM_DEF_CALLBACK
+ /* In OpenSSL 0.9.8 PEM_F_DEF_CALLBACK was renamed */
+ #define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK
+ #endif
+ #endif
+
  #elif defined (SSLC_VERSION_NUMBER) /* RSA */
 
  /* sslc does not support this function, OpenSSL has since 9.5.1 */

(make sure to get rid of any extra white spaces after copy/paste -- but keep the blank lines)

Code:

C:\build\httpd-2.0.54>patch -p1 < openssl-patch.txt

Quote

patch unexpectedly ends in middle of line
patching file modules/ssl/ssl_toolkit_compat.h
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 99 with fuzz 1.

(Still worked -- not sure what the fuss was about)
(there were different versions of this patch, I have erased my build/httpd dir, and *think* this was the one I used)


save as zlib-patch.txt (to be placed under C:\build\httpd-2.0.54])
http://smithii.com/files/httpd-2.0.54_zlib-1.2.2.patch
Code:

C:\build\httpd-2.0.54>patch -p1 < zlib-patch.txt

Quote

patching file modules/filters/mod_deflate.dep
patching file modules/filters/mod_deflate.dsp
patching file modules/filters/mod_deflate.mak
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
mattd
Member
*
Posts: 4


View Profile
« Reply #5 on: October 14, 2005, 11:11:56 AM »

Thankyou for this buddy, ill give this a try tomarrow when i get some free time...off to bed for me now...

Maybe it might be a good idea to add this to your orginal post about this or something :) good job thankyou so  much
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!