juliandunn/oracle-instantclient — pull request #1 by ftclausen (2013-12-04 14:59:37+00:00)
Title: Support for setting share lib path & update alternatives.

Hello,

In order to have sqlplus work out of the box I have made the following changes and wanted to submit it for review in the event it is something you can merge (I am totally open to suggestions with regards to better ways to do this) -

* /etc/ld.so.conf.d/oracle-instantclient-x86_64.conf file for setting the shared lib path
* New cookbook library to set up the "sqlplus" alternative so that you can always call sqlplus the usual way e.g. "sqlplus" instead of "sqlplus64"

To support the above I needed to make it easier to determine the path to the "lib" dir. So I created a new attribute "node['oracle-instantclient']['version'] which takes the major.minor version format e.g. "12.1". This could potentially be automated but parsing the version string and/or RPM name is fragile and it seemed better to just have the user specify the version. This version string is then used to construct the path to the instant client "lib" dir.

Also I chose to make a cookbook library to do the update-alternatives dirty work so as to keep the recipes clean. I also did not update the version in metadata.rb - I'll leave that to you.

Regards,

Fred.