This will build php and stick the resulting RPMS in /usr/src/redhat/RPMS/i386
There is a caveat. You need to edit the /etc/yum.conf file so future php updates don’t overwrite your custom version. We’ll try to get Sablotron support in the upcoming 4.3.11 release of PHP but I can’t make any promises today.
OK. I installed ‘rpmbuild’ and 26 ‘*-devel’ dependencies and then managed to get the build to complete. Lots of new RPMs are in /usr/src/redhat/RPMS/i386.
Questions:
What’s next? I’m new to the wonderful world of RPMs. I assume the files built by the above process will be used to recompile PHP with Sablotron on board.
How exactly do I edit ‘yum.conf’ so future php updates don’t overwrite my custom version? (I know how to edit the file but do not know the syntax for such an entry).
What’s next? I’m new to the wonderful world of RPMs. I assume the files built by the above process will be used to recompile PHP with Sablotron on board.
You need to do a few things now.
edit /usr/src/redhat/SPECS/php.spec, search for the ‘configure’ command and add whatever flags are needed there to make sablotron work.
edit the bversion %define at the beginning of the file and change it from the current value to 1 + cur value. i.e. change 103 to 104.
with those 2 done, run the rpmbuild command I mentioned.
How exactly do I edit ‘yum.conf’ so future php updates don’t overwrite my custom version? (I know how to edit the file but do not know the syntax for such an entry).
edit /etc/yum.conf, look for the “exclude=” line and just add ‘php’ after the =, i.e. exclude=php
That’s done. Was it necessary to run ‘rpmbuild’ twice? I had already done it when I made post #3 of this thread. Couldn’t I just run it once, including the bversion edit? (I’m documenting this installation procedure on a test box before executing on a new server).
I’m still unclear how to arrive at a new build of PHP. I now have twice as many RPMs in /usr/src/redhat/RPMS/i386 (versions 103 and 104). PHPinfo reports the same build as when I started.
I have the sense that you are omitting something that is obvious to you and unknown to me. Do the new RPMs need to be installed now via some specific command?
Maybe the --force is needed since its the same version of PHP with a different “mod”. I’m not expert on this, just going by a kind of similar situation I had with ProFTP
You can delete any -103 RPMs in the RPMS/i386 directory. The -104’s are the ones you want and should install clenaly without forcing since I had you update the release ver.
Just rpm -Uvh <RPM NAME>
Where <RPM NAME> should be the list of RPMs you want to install. You may just do them all and use * for <RPM NAME>
We are going to migrate from an older server that has Sablotron and Expat installed and compiled into PHP. Our developers have created sites requiring these applications (example: http://www.tcrhcc.org/).
I have not recompiled Apache with that option, in either case, and everything works fine.
checking whether to enable xslt support… yes
checking for XSLT Sablotron backend… yes
checking for libexpat dir for Sablotron XSL support… /usr
checking for iconv dir for Sablotron XSL support… no
checking for JavaScript for Sablotron XSL support… no
checking for Sablotron libraries in the default path… found in /usr
checking for sablot-config… found
checking for Sablotron version… >= 0.96
checking for iconv… (cached) yes
checking for SablotSetEncoding in -lsablot… no
checking for SablotGetOptions in -lsablot… no
checking for YAZ support… no
checking whether to include YP support… yes
checking for yp_match in -lnsl… no
checking for yp_match in -lc… no
configure: error: Unable to find required yp/nis library
error: Bad exit status from /var/tmp/rpm-tmp.13096 (%build)
Now I’m trying to install Sablotron on my actual new server, which is a 64-bit machine running RHEL3. I am getting this message when trying to rebuild PHP:
configure: error: expat not found. To build sablotron you need the expat library.
error: Bad exit status from /var/tmp/rpm-tmp.14552 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.14552 (%build)
According to yum, expat and expat-devel are installed and up to date. My thought was that I neeeded the 64 bit versions installed, but I have had no luck getting that to happen.