Oracle now has an "Instant Client" RPM (see http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html) which makes the installation of their client software much, much easier. I modified the PHP spec file to support this. I used a patch provided by Oracle (http://www.oracle.com/technology/pub/notes/technote_php_instant.html) and updated it so it applies cleanly. I think this is useful for many people and hope you can incorporate these changes in future updates.
Created attachment 111477 [details] updated spec file
Created attachment 111478 [details] patch for spec file
Created attachment 111479 [details] Oracle's patch support instant client adapted from http://www.oracle.com/technology/pub/files/php_oci8ic_buildpatch.txt
Thanks for the contribution. It's not clear to me: is it necessary or desirable to support *both* the different methods of building the OCI extension? Or could the old stuff be removed now?
I certainly prefer the RPM based "Instant Client" and according to Oracle's FAQ http://www.oracle.com/technology/tech/oci/instantclient/ic-faq.html "The Instant Client interoperates with any database version that the full Oracle Client interoperates with" and "Instant Client is FREE for anyone to use in a development or production environment". "Instant Client can be redistributed by ISVs to their customers in their custom installations. Enterprises can redistribute Instant Client within their organizations". I just didn't want to close off non-instant client based installations even though I see no benefit to them. If it were up to me I'd remove the old stuff, but more conservative folks might want to stay with their old installation method. Also, I think "oracle_ic" should probably default to "1". Why not ship this RPM by default?
I think it makes sense to ship just this then; thanks. To answer the last question: packages in the core distribution can only depend on other packages in the core distribution.
I've put a test source package here: http://people.redhat.com/jorton/Taroon-php/php-4.3.2-21.ent.1.src.rpm can you test this; does it work? I took out "AutoReq: 0" as it shouldn't be necessary.
Thanks! I've tried the test package http://people.redhat.com/jorton/Taroon-php/php-4.3.2-21.ent.1.src.rpm but it doesn't work: - I get warnings about non-existing user jorton and group cambridge - the configure option needs to be --with-oci8-instant-client=shared (NOT: --with-oci8=shared) - "AutoReq: 0" is neccessary because Oracle's RPM doesn't specify that it provides libclntsh.so
You can ignore the username warnings; I fixed the other two issues: can you try this one out too? http://people.redhat.com/jorton/Taroon-php/php-4.3.2-21.ent.2.src.rpm
I overlooked this: - "Requires: oracle-instantclient-basic >= 10" was missing, too. This is the Oracle RPM which provides the neccessary shared libraries - The build fails (my attached patch replaces dword with dvoid, but this is missing in your patch): /usr/src/redhat/BUILD/php-4.3.2/ext/odbc/php_odbc.c:1251:1: warning: "/*" within comment /usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c: In function `zif_ocicollappend': /usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: `dword' undeclared (first use in this function) /usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: (Each undeclared identifier is reported only once /usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: for each function it appears in.) /usr/src/redhat/BUILD/php-4.3.2/ext/oci8/oci8.c:4809: syntax error before ')' token [...] I suggest to download the four Oracle instantclient RPMs and installing them (URL see above - they are free and installing them is easy - nothing else required). So you can test this easily yourself. Thanks, Kai
Is there a way to pass the with_oci8 as true parameter to rpmbuild? Now I manually edit php.spec and define it to 1. Also, could a similar define be done for postgresql and mysql, enabled by default? Thanks!
I got an error on rpmbuild as I don't know how to pass _with_oci8 parameter and I just changed in php.spec %define with_oci8 1 But later in spec some places use %{with_oci8} (which is true) and other use %{?_with_oci8:oci8} which is false. This is the error: RPM build errors: Could not open %files file /usr/src/redhat/BUILD/php-5.0.4/files.oci8: No such file or directory
This is a RHEL3 bug, Marius, please ask questions about Fedora packages on fedora-list, I'll answer them there.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2005-405.html