LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 12-15-2011, 10:53 AM   #1
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Rep: Reputation: 30
Steps to apply the Patch Apache


Hi,

I would like to patch the Apache of below version.

Server version: Apache/2.0.63
Server built: Oct 20 2009 16:59:26


In the same ref. I have requirement to patch the same from below option.

http://www.apache.org/dist/httpd/patches/

Please suggest.
 
Old 12-15-2011, 12:55 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,733

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Hi,

First of all you should tell us your distro and how apache was installed in a first place.
If it was built from source, you can patch the apache sources with the needed patch and then recompile/install
In case that apache was installed by your distro's package manager, you should get the apache source package, patch it, rebuild the package and reinstall

Regards
 
Old 12-15-2011, 01:31 PM   #3
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi

My OS is Solaris 10 Sparc

Please let me know how to check whether it is installed from Source or pkgadd.

As per me understanding it seems it has been installed from Pkgadd only.

As while checking process it shows

/usr/local/apache2/bin/httpd -k start


Please let us know.

Thanks
Rajan
 
Old 12-15-2011, 01:51 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,733

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Quote:
As while checking process it shows

/usr/local/apache2/bin/httpd -k start
That means that apache was compiled and installed from sources, as /usr/local/apache2 is the default prefix in this case.
You can verify it by using the pkginfo utility of Solaris:
Code:
pkginfo | grep -i apache
that should give no output.

So, you need to find the directory where apache source tarball was initially extracted, apply the patch and recompile, after running "make distclean" to clean the sources.
 
Old 12-15-2011, 04:51 PM   #5
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi

In my case it says - pkginfo | grep -i apache


application ABCapache apache
system SUNWaclg Apache Common Logging
system SUNWapch2d Apache Web Server V2 Documentation
system SUNWapch2r Apache Web Server V2 (root)
system SUNWapch2u Apache Web Server V2 (usr)
system SUNWapchd Apache Web Server Documentation
system SUNWapchr Apache Web Server (root)
system SUNWapchu Apache Web Server (usr)


So I need to get source of this version and do all stuff.

Do you have any easy steps to complete this.

Thanks
Rajan
 
Old 12-15-2011, 07:44 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Summer Midwest USA, Central Illinois, Winter Central Florida
Distribution: SlackwareŽ
Posts: 13,609
Blog Entries: 34

Rep: Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790
Moderator response

Moved: This thread is more suitable in <Solaris / OpenSolaris> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-16-2011, 12:39 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,733

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Quote:
Originally Posted by rajaniyer123 View Post
In my case it says - pkginfo | grep -i apache

application ABCapache apache
system SUNWaclg Apache Common Logging
system SUNWapch2d Apache Web Server V2 Documentation
system SUNWapch2r Apache Web Server V2 (root)
system SUNWapch2u Apache Web Server V2 (usr)
system SUNWapchd Apache Web Server Documentation
system SUNWapchr Apache Web Server (root)
system SUNWapchu Apache Web Server (usr)
Hmm, that means that it's also installed the apache that comes with Solaris, but the one you're running (/usr/local/apache2/bin/httpd) is installed from source.
Could you verify it and find the directory where the apache sources were extracted (it should be named httpd-2.0.63). Once you verify it I'll tell you what to do.
Note that if you're running apache from a Solaris package, it's not possible to patch it

Regards
 
Old 12-16-2011, 03:05 AM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
The SUNW* packages are indeed Solaris ones, but what is ABCapache ?

What says
Code:
pkginfo -l ABCapache
pkgchk -v ABCapache
?
 
Old 12-16-2011, 01:14 PM   #9
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi Bathory,

Kindly note that I am not able to locate httpd-2.0.63 any such folder on that server.


Hi jlliagre,

pkginfo -l ABCapache

PKGINST: ABCapache
NAME: apache
CATEGORY: applications
ARCH: sparc
VERSION: 2.0.63
BASEDIR: /
VENDOR: Apache Foundation
PSTAMP: 10/21/2000
INSTDATE: Oct 21 2009 14:15
STATUS: completely installed
FILES: 1200 installed pathnames
35 directories
64 executables
37982 blocks used (approx)

In second command : pkgchk -v ABCapache

it displays list of files under /usr/local/apache2/.

Please suggest.
 
Old 12-16-2011, 03:17 PM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,733

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Hello,

Quote:
Kindly note that I am not able to locate httpd-2.0.63 any such folder on that server.
Makes sense, as apache was installed by that ABCapache package. Where did this package came from? Can't find anything on google about such package name.

What you can do, is to see if there exists a file /usr/local/apache2/build/config.nice. This has the options used to compile the sources and create the package. If it exists, you can download the httpd-2.0.63 sources, patch them and recompile using the config.nice.
Of course you have to backup the whole /usr/local/apache2 directory before anything else.
If you're going to take this step, consider compiling and install 2.0.64 as it's the latest 2.0.x apache

Regards
 
Old 12-16-2011, 03:27 PM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,781

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
So you have an apache package installing in /usr/local build by the dubious ABC vendor. Find who is behind this package and ask him to build an updated one.

Edit: sorry, late post.

Last edited by jlliagre; 12-16-2011 at 03:29 PM.
 
Old 12-16-2011, 04:15 PM   #12
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi Bathory,

I got /usr/local/apache2/build/config.nice in the server.

Any idea steps to apply the patch to source of 2.0.63.

Thanks
Rajan
 
Old 12-16-2011, 04:40 PM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,733

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Quote:
I got /usr/local/apache2/build/config.nice in the server.
I guess whoever created the ABCapache package, just installed apache from source using the default prefix and created the package. Just out of curiosity, what's in config.nice?


Quote:
Any idea steps to apply the patch to source of 2.0.63.
Before anything else backup the whole /usr/local/apache2, so you can revert in case something goes wrong

Then download the apache 2.0.63 source tarball and the respective patch(es) you want to apply to it. Once again, I suggest you to get the latest 2.0.64 (and patches) if you're going to compile apache from source
Anyway extract the tarball and go into the directory created (e.g. httpd-2.0.63). Then run:
Code:
patch -p0 < /path/to/patch1
patch -p0 < /path/to/patch2
... (do the same for all the patches you want to apply)
cp /usr/local/apache2-BAK/build/config.nice .
./config.nice
make
su
make install
Note: Make sure that every command finished without errors, before proceeding with the next one. Also it's better to stop apache before "make install".
After that start apache and test.

Regards
 
Old 12-16-2011, 06:29 PM   #14
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi Bathory,

Kindly note that while applying patch as per your steps it says

Looks like a unified context diff.
done


Please let me know is it ok ?

Any way to check whether patch is applied.

In my case I have downloaded patch from http://www.apache.org/dist/httpd/pat...ply_to_2.0.63/ seems these two are only there for this version

[ ] CVE-2010-0425.patch 2010-03-11 15:26 929 Source code patch
[ ] CVE-2010-0434.patch 2010-03-11 15:58 835 Source code patch

Please suggest.

Thanks
Rajan
 
Old 12-17-2011, 03:33 AM   #15
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,733

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Quote:
Kindly note that while applying patch as per your steps it says

Looks like a unified context diff.
done

Please let me know is it ok ?
Yes the patch was applied correctly, as it didn't spit out any errors.

Quote:
Any way to check whether patch is applied.
You can check the source code of the patched files to see if it's changed according to the patch applied. Or try to re-apply the patch and it should tell you that it's already patched

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to apply patch kool_kid Red Hat 4 08-25-2007 04:09 PM
how to apply a patch? ashlesha Linux - Software 4 12-07-2006 02:09 PM
How to apply a patch? amwink Programming 2 11-25-2005 07:14 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM
steps to apply a patch arpi Linux - General 5 03-21-2004 05:28 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration