LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-19-2011, 04:42 AM   #16
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30

Hi bathory,

Kindly note that this steps are working fine for me.

Now I would like to know how to check whether the patch is applied or not on /usr/local/apache2.

On httpd-2.0.63 it shows respective files updated after patch command.

Please suggest.

Thanks
Rajan
 
Old 12-19-2011, 05:04 AM   #17
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,

After patching the source code, you need to compile and install. Run:
Code:
./config.nice
make
su
make install
So the apache installed under /usr/local/apache2 will be patched with the patches you applied

Regards
 
Old 12-19-2011, 05:08 AM   #18
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi Bathory,

Is there any way to check patch level once in is installed in /usr/local/apache2.

Thanks
Rajan
 
Old 12-19-2011, 05:54 AM   #19
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
There is no such thing like patchlevel, if you patch the source code of a program by yourself.
Solaris and the binary packages provided by Oracle, have a patchlevel that is assigned from whoever made the patched package and it can only be seen in the package description.

The only way to check if the patch you applied works, is to see if the initial problem went away

Regards
 
Old 12-19-2011, 09:52 AM   #20
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi,

Please let me know while executing below command whether it will update /usr/local/apache2 directly which is running as on now on that server.

./config.nice
make
su
make install

my config.nice consist of below entries.

#! /bin/sh
#
# Created by configure

"./configure" \
"--enable-mods-shared=most" \
"--with-ssl=/usr/local/ssl" \
"--enable-ssl" \
"--enable-proxy" \
"--enable-proxy-connect" \
"--enable-proxy-ftp" \
"--enable-proxy-http" \
"--enable-rewrite" \
"--enable-mime-magic" \
"--enable-cern-meta" \
"--enable-log-forensic" \
"--enable-unique-id" \
"--enable-usertrack" \
"--enable-version" \
"$@"


Also let me know what "su" command do. As I am going to as root user only. Is this "su" means switch to or something else.

Thanks
Rajan

Last edited by rajaniyer123; 12-19-2011 at 09:54 AM.
 
Old 12-19-2011, 11:42 AM   #21
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:
Please let me know while executing below command whether it will update /usr/local/apache2 directly which is running as on now on that server.
Running "make install" will overwrite everything in /usr/local/apache2, except htdocs, cgi-bi, logs and perhaps 3rd party modules. That's why I told you keep a backup of /usr/local/apache2, just in case


Quote:
Also let me know what "su" command do. As I am going to as root user only. Is this "su" means switch to or something else.
The command su is used to change to the root user, as "make install" run by a normal user cannot write in /usr/local/apache2.
If you're running everything as root, the you don't need it, but keep in mind that's not good practice doing so.
 
Old 03-30-2012, 11:36 PM   #22
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Issue while using make

In the same ref. while compiling I got below error.

./config.nice works fine.

While running make it gives below error.



Making all in srclib
Making all in apr
Making all in strings
/bin/bash /export/home/abc/httpd-2.0.63/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -DHAVE_CONFIG_H -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -I../include -I../include/arch/unix -c apr_cpystrn.c && touch apr_cpystrn.lo
In file included from /usr/include/sys/wait.h:24,
from ../include/apr.h:134,
from apr_cpystrn.c:17:
/usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
/usr/include/sys/siginfo.h:294: error: parse error before '}' token
/usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
/usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
/usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
/usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
/usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
/usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
/usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
/usr/include/sys/siginfo.h:426: error: parse error before '}' token
/usr/include/sys/siginfo.h:428: error: parse error before '}' token
/usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
/usr/include/sys/siginfo.h:437: error: parse error before '}' token
In file included from /usr/include/sys/procset.h:24,
from /usr/include/sys/wait.h:25,
from ../include/apr.h:134,
from apr_cpystrn.c:17:
/usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
In file included from ../include/apr.h:134,
from apr_cpystrn.c:17:
/usr/include/sys/wait.h:86: error: parse error before "siginfo_t"
In file included from ../include/apr_general.h:33,
from ../include/apr_pools.h:39,
from ../include/apr_strings.h:50,
from apr_cpystrn.c:18:
/usr/include/signal.h:111: error: parse error before "siginfo_t"
/usr/include/signal.h:113: error: parse error before "siginfo_t"
*** Error code 1
make: Fatal error: Command failed for target `apr_cpystrn.lo'
Current working directory /export/home/abc/httpd-2.0.63/srclib/apr/strings
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive | sed s/-recursive//`; \
list=''; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z "apr_cpystrn.lo apr_snprintf.lo apr_strnatcmp.lo apr_strings.lo apr_fnmatch.lo apr_strtok.lo"; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/abc/httpd-2.0.63/srclib/apr/strings
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive | sed s/-recursive//`; \
list='strings passwd tables file_io/unix network_io/unix threadproc/unix misc/unix locks/unix time/unix mmap/unix shmem/unix user/unix memory/unix atomic/unix poll/unix support/unix dso/unix'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z "delete-lib libapr-0.la delete-exports export_vars.c apr.exp"; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/abc/httpd-2.0.63/srclib/apr
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' apr apr-util pcre'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z ''; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/abc/httpd-2.0.63/srclib
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' srclib os server modules support'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'


Any Ideawhat mi8ght be the issue.
 
Old 03-31-2012, 02:46 AM   #23
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,

After searching a bit, it looks like a problem with the gcc from sunfreeware. You should have used the gcc that comes with Solaris instead.
Anyway try the suggestion here (read the comments in red)
After fixing the headers, go into the apache sources, run "make distclean" and start over.

Mind that apache2.0.64 is out that fixes some security problems of previous versions, so you might install that instead

Regards
 
Old 04-01-2012, 03:54 AM   #24
rajaniyer123
Member
 
Registered: Feb 2004
Location: BARODA, GUJARAT
Posts: 259

Original Poster
Rep: Reputation: 30
Hi,

Thanks for the reply.

Also while compiling I found that the server does not have GCC complier, I have downloaded and installed the same. In the same ref. I have one doubt that above apache was originally compiled from some other server and then converted into solaris based package format and installed on above server with causes above issue.

As per my understanding in case if the apache is installed from source format it should not display under pkginfo which is native command of solaris.

I think I need to apply the patch on the original server where it has been installed.

Please let me know your view on this.

Thanks
Rajan
 
Old 04-01-2012, 08:16 AM   #25
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:
Also while compiling I found that the server does not have GCC complier, I have downloaded and installed the same.
Please note that Solaris 10 comes with gcc already installed in /usr/sfw/bin. All you have to do is to add this directory (and /usr/ccs/bin where the autotools are installed) in your PATH env. variable, so you can used them from everywhere in your system. If you have installed also gcc from sunfreeware, you need to fix its headers as mentioned above.


Quote:
In the same ref. I have one doubt that above apache was originally compiled from some other server and then converted into solaris based package format and installed on above server with causes above issue.
As already been told, you should find out who created that ABC apache package and ask him how the package was created.


Quote:
As per my understanding in case if the apache is installed from source format it should not display under pkginfo which is native command of solaris.
Not true as in this case a package named ABCapache was used to install apache


Quote:
I think I need to apply the patch on the original server where it has been installed.

Please let me know your view on this.
If you cannot find that ABC package maintainer, you should do it your self. Patch the sources and use the same config.nice to rebuild apache.
 
  


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:28 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