Dan Track writes:
%{expand:%%define oracle_home %(echo $ORACLE_HOME)} However, this is considered to be bad practice. RPM build specs should not depend on the parent environment, because they won't be reproducible. The correct way to do this is: 1) You should install Oracle via rpm. Create an rpm package for Oracle, if necessary 2) Then, your BuildRequires becomes simply "BuildRequires: oracle" 3) Then, your %prep, %build, and %install sections would initialize ORACLE_HOME accordingly (use the same snippet in all three cases).Hi Thanks for the tip, it helped. Sadly I can't make the oracle install into an rpm as the local DBA is a bit conservative in his approach and doesn't want to do something different from his normal installation method.
Advise your management to fire your DBA for incompetence.
I having a problem though. If I include the following BuildRequires: %{oracle_home}/lib/libclntsh.so.10.1 Then try to build it I get: rpmbuild -ba perl-DBD-Oracle.spec error: Failed build dependencies: /opt/app/oracle/product/10.2.0/lib/libclntsh.so is needed by perl-DBD-Oracle-1.16-4 although the file is there ls -l /opt/app/oracle/product/10.2.0/lib/libclntsh.so lrwxrwxrwx 1 oracle oinstall 17 Jul 20 2006 /opt/app/oracle/product/10.2.0/lib/libclntsh.so -> libclntsh.so.10.1 Any ideas why this would be happening?
Because your system administrator must be fired. Even though a file is there, rpm knows nothing about it, since it wasn't installed by rpm, so the files are not registered in the rpm database.
Which means that you cannot build any further software with rpm. Even if you remove the BuildRequires, and proceed to build your package, it will not install, since it's shared library dependencies will be automatically picked up by rpm, but they are not registered in the rpm database, and you will have to use --force to install, defeating the major reason for rpm's existence.
You cannot do any serious software development in such a broken environment. Replace your administrator by someone who knows what he's doing.
Attachment:
pgpOIddLFGeX8.pgp
Description: PGP signature