Bug 149873 - make PHP oci8 driver support Oracle Instant Client RPM
Summary: make PHP oci8 driver support Oracle Instant Client RPM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL: http://www.oracle.com/technology/pub/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-28 15:37 UTC by Kai Bolay
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-28 18:53:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
updated spec file (25.65 KB, text/plain)
2005-02-28 15:38 UTC, Kai Bolay
no flags Details
patch for spec file (3.09 KB, patch)
2005-02-28 15:39 UTC, Kai Bolay
no flags Details | Diff
Oracle's patch support instant client (6.90 KB, patch)
2005-02-28 15:41 UTC, Kai Bolay
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:405 0 high SHIPPED_LIVE Moderate: PHP security update 2005-04-28 04:00:00 UTC

Internal Links: 173964

Description Kai Bolay 2005-02-28 15:37:56 UTC
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.

Comment 1 Kai Bolay 2005-02-28 15:38:54 UTC
Created attachment 111477 [details]
updated spec file

Comment 2 Kai Bolay 2005-02-28 15:39:25 UTC
Created attachment 111478 [details]
patch for spec file

Comment 3 Kai Bolay 2005-02-28 15:41:00 UTC
Created attachment 111479 [details]
Oracle's patch support instant client

adapted from
http://www.oracle.com/technology/pub/files/php_oci8ic_buildpatch.txt

Comment 4 Joe Orton 2005-02-28 15:54:59 UTC
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?

Comment 5 Kai Bolay 2005-02-28 16:19:30 UTC
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?


Comment 6 Joe Orton 2005-03-02 17:50:30 UTC
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.

Comment 7 Joe Orton 2005-03-03 15:45:17 UTC
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.

Comment 8 Kai Bolay 2005-03-03 17:19:27 UTC
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


Comment 9 Joe Orton 2005-03-03 17:25:06 UTC
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

Comment 10 Kai Bolay 2005-03-03 18:28:12 UTC
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

Comment 11 Marius Andreiana 2005-04-12 11:09:49 UTC
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!

Comment 12 Marius Andreiana 2005-04-18 08:47:07 UTC
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


Comment 13 Joe Orton 2005-04-18 08:51:41 UTC
This is a RHEL3 bug, Marius, please ask questions about Fedora packages on
fedora-list, I'll answer them there.

Comment 14 Josh Bressers 2005-04-28 18:53:26 UTC
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



Note You need to log in before you can comment on or make changes to this bug.