Bug #15326 On MacOSX 10.4 odbc.ini/odbinst.ini are not installed unlex Xcode is available
Submitted: 29 Nov 2005 20:07 Modified: 26 Jul 2007 14:27
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.12 OS:MacOS (MacOSX 10.4)
Assigned to: Kent Boortz CPU Architecture:Any
Tags: bfsm_2007_01_18

[29 Nov 2005 20:07] Geert Vanderkelen

On MacOSX 10.4 (Tiger) the odbc.ini and odbcinst.ini are not available after installing or upgrading Connector/ODBC.

The odd thing is that when installing Xcode they get installed!



How to repeat:
Install/Upgrade Connector/ODBC when having Xcode not installed or deinstalled and after making sure ~/Library/ODBC/ is empty!

You can deinstall Xcode (if you dare) by doing
  shell> perl sudo perl /Developer/Tools/uninstall-devtools.pl

You will notice no INI files in ~/Library/ODBC/ directory.

Suggested fix:
First thing to (maybe!) fix is renaming 'postinstall' in the package under Contents/Resources/ to 'postflights'. This will execute this the script on install AND upgrade. We already did this at some point in the MySQL server distribution (see http://bugs.mysql.com/11380).

The problem is actually that this script 'postinstall' (even when renamed) can't find the *.ini files.

To fix this, one needs to replace:
  cp *.ini ~/Library/ODBC
  cp $RECEIPT_PATH/*.ini ~/Library/ODBC

I think it's also good to actually test for the existance of the files instead of the directory
  if [ -f ~/Library/ODBC/odbc.ini ]
Isn't this better to preserve user changes?
[29 Nov 2005 20:37] Jorge del Conde
Thanks for your bug report.  I was able to reproduce this on my 10.4.2 box
[29 Nov 2005 21:07] Peter Harvey
Good work geert! Hopefully your distro can do the trick for now. I am currently doing c/odbc v5 Alpha 2 dev work. Also; I am hoping that engineering will be involved with the release of c/odbc v3.51.13 with the intention of them doing subsequent builds/releases . In anycase; you should expect to see a fix for this in the c/odbc v3.51.13 release.
[29 Nov 2005 21:33] Geert Vanderkelen

Small correction in my suggested fix:
It is 'postflight' (and not postflights).
[3 Oct 2006 17:21] Bogdan Degtyariov
This bug will be fixed in MyODBC 5
[4 Oct 2006 13:38] Geert Vanderkelen
===== postinstall 1.4 vs edited =====
--- 1.4/osx/MyODBC/resources/postinstall        2006-10-04 15:37:34 +02:00
+++ edited/postinstall  2006-10-04 15:14:18 +02:00
@@ -21,7 +21,7 @@
 if [ ! -f ~/Library/ODBC ]; then
     mkdir ~/Library/ODBC
     chmod 777 ~/Library/ODBC
-    cp *.ini ~/Library/ODBC
+    cp $RECEIPT_PATH/*.ini ~/Library/ODBC
[3 May 2007 10:07] Tonci Grgin
Bug#28107 is marked as duplicate of this one.
[30 May 2007 9:41] Kent Boortz
The current installer needs to be rewritten. Currently
other bugs has taken higher priority, and only simple
TAR packages are released for Mac OS X. Sorry about

This bug will be reverified to be corrected once the
new installer is in place. There is no ETA yet.
[20 Jul 2007 17:11] Kent Boortz
All the problems mentioned in this bug report
are corrected with the new installer in development
but not yet released. The remaining issue worked on
is the fact that we really want to install into
the system ini file directory "/Library/ODBC", not
the user directory "~/Library/ODBC". This will
be sorted out before closing Bug#10444, also about
the Mac OS X installer.

The Mac OS X installer will be in 3.51.18.
[26 Jul 2007 14:27] MC Brown
A note has been added to the 3.51.18 changelog: 

Installed for Mac OS X has been re-instated. The installer registers the driver at a system ()not user) level and makes it possible to create both user and system DSNs using the Connector/ODBC driver. The installer also fixes the situation where the necessary drivers would bge installed local to the user, not globally