LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-05-2007, 09:28 PM   #1
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Rep: Reputation: 40
Question reconfigure rpm


Guys,
can you please point me out how to reconfigure the php ( centos5 ):

1. if i have RPM based system;
2. include Oracle 11g support

Thank you
 
Old 12-05-2007, 09:35 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Download the source rpm file, install it, modify the spec file and build.

rpm -ivh <source filename here>
cd /usr/src/redhat/SPECS
edit the spec file using any text editor save the changes and exit
rpmbuild -bb <the spec file name here>

It is your responsibility to meet the building requirements (i.e install missing dependencies).
 
Old 12-05-2007, 10:14 PM   #3
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Lenard View Post
Download the source rpm file, install it, modify the spec file and build.

rpm -ivh <source filename here>
cd /usr/src/redhat/SPECS
edit the spec file using any text editor save the changes and exit
rpmbuild -bb <the spec file name here>

It is your responsibility to meet the building requirements (i.e install missing dependencies).
I'm assuming i should get php-XXX.srpm?
What about 11g support ?

What will happened if and when i'll get a new version of the binary rpm? Won't it raise conflicts ?


Thank you

Last edited by DBabo; 12-05-2007 at 10:16 PM.
 
Old 12-05-2007, 11:17 PM   #4
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Lenard View Post
Download the source rpm file, install it, modify the spec file and build.

rpm -ivh <source filename here>
cd /usr/src/redhat/SPECS
edit the spec file using any text editor save the changes and exit
rpmbuild -bb <the spec file name here>

It is your responsibility to meet the building requirements (i.e install missing dependencies).
Also i'm trying to folow these instructions, but, apparently there is a newer way of doing things - using "mock"..
Am i missing smth?
 
Old 12-06-2007, 05:15 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Nope you are missing nothing. You still need to edit the spec file, it does not matter if you are you, root or mock. There is also rpmrebuild which would not help you either for this very same reason.

http://www.redhatmagazine.com/2007/1...th-rpmrebuild/
 
Old 12-06-2007, 07:19 PM   #6
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Lenard View Post
Nope you are missing nothing. You still need to edit the spec file, it does not matter if you are you, root or mock. There is also rpmrebuild which would not help you either for this very same reason.

http://www.redhatmagazine.com/2007/1...th-rpmrebuild/
i still can't figure how to extract the config file from the srpm with the help of mock ...
 
Old 12-07-2007, 04:45 AM   #7
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
I provided you with the how to install the source rpm file, this will extract the spec file and place it in the appropriate location.
 
Old 12-07-2007, 10:08 PM   #8
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by Lenard View Post
I provided you with the how to install the source rpm file, this will extract the spec file and place it in the appropriate location.
That's correctt, Lenard. And i'm thankfull to you for this .
It's just i'm lost a bit about how to do the rebuild using mock. The only reason i got that ( mock) is because it ( rpm -ivh ) raised errors.
Please advise
thank you

P.S. I've got php.srpm.
I've installed the mock
added current user to mock group
did moch init;
mock shell install php.srpm
Code:
mock-chroot> rpm -ql php
php-4.3.1-odbc.patch
php-4.3.11-shutdown.patch
php-4.3.2-libtool15.patch
php-4.3.3-install.patch
php-4.3.9-CVE-2006-5465.patch
php-4.3.9-CVE-2007-0906-strreplace.patch
php-4.3.9-CVE-2007-0907.patch
php-4.3.9-CVE-2007-0908.patch
php-4.3.9-CVE-2007-0909-odbc.patch
php-4.3.9-CVE-2007-0909-printf.patch
php-4.3.9-CVE-2007-0988.patch
php-5.0.0-easter.patch
php-5.0.2-phpize64.patch
php-5.0.4-dlopen.patch
php-5.0.4-norpath.patch
php-5.0.4-tests-dashn.patch
php-5.0.4-tests-wddx.patch
php-5.1.4-gnusrc.patch
php-5.1.4-warnings.patch
php-5.1.6-CVE-2007-0455.patch
php-5.1.6-CVE-2007-0906-imap.patch
php-5.1.6-CVE-2007-0910.patch
php-5.1.6-CVE-2007-1001.patch
php-5.1.6-CVE-2007-1285.patch
php-5.1.6-CVE-2007-1583.patch
php-5.1.6-CVE-2007-1718.patch
php-5.1.6-CVE-2007-1864.patch
php-5.1.6-CVE-2007-2756.patch
php-5.1.6-CVE-2007-2872.patch
php-5.1.6-CVE-2007-3799.patch
php-5.1.6-CVE-2007-3996.patch
php-5.1.6-CVE-2007-3998.patch
php-5.1.6-CVE-2007-4658.patch
php-5.1.6-CVE-2007-4670.patch
php-5.1.6-ecalloc.patch
php-5.1.6-ftpcrlf.patch
php-5.1.6-soapredir.patch
php-5.1.6.tar.gz
php.conf
php.ini
php.spec
mock-chroot>
mock-chroot> find / -name php-4.3.1-odbc.patch
mock-chroot> find / -name php*                
/usr/share/doc/unixODBC-2.2.11/doc/AdministratorManual/php3.html
/usr/share/doc/db4-devel-4.3.29/ref/ext/php.html
So i can't locate the php source. and it puzzles me...

Last edited by DBabo; 12-07-2007 at 10:14 PM.
 
Old 12-07-2007, 11:33 PM   #9
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
ok. copy srpm into /var/lib/mock/centos-5-i386/root/
mock chroot 'rpm -ihv /php-5.1.6-15.el5.src.rpm '
'as root' vi spec file and added to the spec file:
--with-oci8=$ORACLE_HOME

saved; went back to mock-shell>
rpmbuild came back with :
checking OCI8 libraries dir... lib32
checking Oracle version... configure: error: Oracle-OCI8 needed libraries not found
error: Bad exit status from /var/tmp/rpm-tmp.98019 (%build)
Which makes sense since it's chroot. But doesn't help me
 
Old 12-08-2007, 06:08 AM   #10
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
I do not use mock myself, I do use the rpmdevtools package so I do not have to build as root most of the time. In some cases (still) one cannot use rpmdevtools or mock to rebuild rpm's, this is one of them.
 
Old 12-08-2007, 08:26 PM   #11
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
yeah, it seems you are right.

I decided to stop with my experiments ( for now ) and just do it "old " way.
After getting the src and installing it ( rpm -Uhv ).
i've got some warnings about not existing mockbuild group, the package got installed though - i see the source and spec files in the /usr/src/.../SOURCE and .../SPECS directories.

I modified php.spec from :
Code:
        --with-libxml-dir=%{_prefix} \
        --with-xml \
       $*
if test $? != 0; then
to :
Code:
        --with-libxml-dir=%{_prefix} \
        --with-xml \
        --with-oci8=$ORACLE_HOME \
        --enable-sigchild 
        $*
if test $? != 0; then
and enjoying the following output from rpmbuild -bs ./php.spec
Code:
Generating files
updating cache ../config.cache
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
|                        *** WARNING ***                             |
|                                                                    |
| You will be compiling the CGI version of PHP without any           |
| redirection checking.  By putting this cgi binary somewhere in     |
| your web space, users may be able to circumvent existing .htaccess |
| security by loading files directly through the parser.  See        |
| http://www.php.net/manual/security.php for more details.           |
+--------------------------------------------------------------------+
|                       *** ATTENTION ***                            |
|                                                                    |
| Something is likely to be messed up here, because the configure    |
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages.                         |
|                                                                    |
| If you are unable to fix this, send the file debug.log to the      |
| php-install@lists.php.net mailing list and include appropiate      |
| information about your setup.                                      |
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating main/php_config.h
config.status: executing default commands
+ --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-dom-xslt=/usr --with-dom-exslt=/usr --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --enable-fastcgi --enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr --with-pdo-mysql=shared,/usr --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr
/var/tmp/rpm-tmp.83487: line 116: --enable-force-cgi-redirect: command not found
error: Bad exit status from /var/tmp/rpm-tmp.83487 (%build)
and BUILD/php-5.1.6/build-cgi/debug.log:
Code:
CONFIGURE:   './configure' '--host=i686-redhat-linux-gnu' '--build=i686-redhat-linux-gnu' '--target=i386-redhat-linux' '--pro
gram-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/
usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstated
ir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with
-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-
pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-nat
ive-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '
--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-f
tp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
 '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' 
'--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf
/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-oci8=/u01/app/oracle/product/11.1.0/db_1' '--enable-
sigchild'
CC:         gcc
CFLAGS:     -I/usr/include -O2 -g -march=i386 -mcpu=i686 -fno-strict-aliasing -Wno-pointer-sign
CPPFLAGS:   -DLDAP_DEPRECATED=1
CXX:        
CXXFLAGS:   -O2 -g -march=i386 -mcpu=i686
INCLUDES:    -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/src/redhat/BUILD/php-5.1.6/build-cgi/ext/date/lib -I/usr/s
rc/redhat/BUILD/php-5.1.6/ext/date/lib -I/u01/app/oracle/product/11.1.0/db_1/rdbms/public -I/u01/app/oracle/product/11.1.0/db
_1/rdbms/demo -I/usr/include/pspell
LDFLAGS:    -L/usr/lib  -L/usr/kerberos/lib -L/u01/app/oracle/product/11.1.0/db_1/lib
LIBS:       -lcrypt -laspell -lpspell -lgmp -lcurl -lbz2 -lz -lpcre -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lk
rb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -lidn -lssl -
lcrypto -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -ldl -lm -lnsl -lirc -lipgo -lclntsh -lxml2 -lz -lm -lcrypt
DLIBS:      
SAPI:       cgi
PHP_RPATHS:  /usr/kerberos/lib /u01/app/oracle/product/11.1.0/db_1/lib
uname -a:   Linux server.home 2.6.18-8.1.15.el5 #1 SMP Mon Oct 22 08:32:04 EDT 2007 i686 athlon i386 GNU/Linux

gcc -o conftest -I/usr/include -O2 -g -march=i386 -mcpu=i686 -fno-strict-aliasing -Wno-pointer-sign -DLDAP_DEPRECATED=1 -L/us
r/lib  -L/usr/kerberos/lib -L/u01/app/oracle/product/11.1.0/db_1/lib conftest.c -lcrypt -laspell -lpspell -lgmp -lcurl -lbz2 
-lz -lpcre -lresolv -lm -ldl -lnsl  -lxml2 -lz -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -ldl -lz -lcurl -
lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -lidn -lssl -lcrypto -lz -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -ldl -
lm -lnsl -lirc -lipgo -lclntsh -lxml2 -lz -lm -lcrypt >&5
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in function 'exit'
./conftest: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
highlited by me.
Now, the libclntsh is there.

What can i do next ?
Thank you
 
Old 12-08-2007, 08:53 PM   #12
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
all right moving alone the build process.
 
Old 12-08-2007, 09:49 PM   #13
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by DBabo View Post
all right moving alone the build process.
Ok. igenerated rpm and src.
attempt to install it :
Code:
Parsing package install arguments
Examining ./RPMS/i386/php-5.1.6-15.i386.rpm: php - 5.1.6-15.i386
Marking ./RPMS/i386/php-5.1.6-15.i386.rpm to be installed
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php.i386 0:5.1.6-15 set to be updated
--> Running transaction check
--> Processing Dependency: libclntsh.so.11.1 for package: php
--> Processing Dependency: php-cli = 5.1.6-15 for package: php
--> Processing Dependency: php-common = 5.1.6-15 for package: php
--> Finished Dependency Resolution
Error: Missing Dependency: libclntsh.so.11.1 is needed by package php
Error: Missing Dependency: php-cli = 5.1.6-15 is needed by package php
Error: Missing Dependency: php-common = 5.1.6-15 is needed by package php
not sure why is it complaining ...
 
Old 12-09-2007, 06:23 AM   #14
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
How many php packages were created, it looks like you need to install multiple packages at once for example;

rpm -Uvh php-5.1.6*.rpm php-common*.rpm php-cli*.rpm (and so on)

The missing libclntsh.so.11.1 dependency I cannot help you with, sorry.
 
Old 12-09-2007, 08:23 AM   #15
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
OK, did some digging................

The needed libclntsh.so.11.1 library should be supplied by Oracle 11g, you may have to reconfigure your ldconfig so that the library path is known to the system.

man ldconfig
(see the -l option)
 
  


Reply



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 reconfigure php? ZAMO Linux - Software 4 04-26-2007 07:46 AM
How to Reconfigure CPAN amer_58 Linux - Newbie 1 04-19-2005 05:47 AM
how to reconfigure the apache? papitu76 Linux - Software 4 01-07-2005 02:33 AM
Can't reconfigure Grub mikieboy Linux - Newbie 2 05-19-2004 05:03 PM
kernel reconfigure apax Linux - Software 2 11-04-2003 02:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:22 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