databases/unixODBC installs empty config files

Scot Hetzel swhetzel at
Thu Apr 19 20:12:54 UTC 2007

On 4/19/07, Ed Maste <emaste at> wrote:
> The unixODBC port installs an etc/odbc.ini file which wipes out
> an existing config on install of a new package.  (It's not even
> a sample config from the distribution; it's just an empty file
> created by virtue of existing in the plist it seems.)
> Can it just be removed from the plist:

You can't simply remove them from the plist, as those files (odbc.ini,
odbcinst.ini) are created by work/unixODBC-2.2.12/Makefile in the
install-data-am target.

What needs to be done is for that target to be patched in
or, so that it creates these files with a -dist or
-sample extension.  Then the pkg-plist can be changed as follows:

@unexec if cmp -s %D/etc/odbc.ini %D/etc/odbc.ini-dist; then  rm -f
%D/etc/odbc.ini; fi
@exec [ -f %D/etc/odbc.ini] || cp %D/etc/odbc.ini-dist %D/etc/odbc.ini
@unexec if cmp -s %D/etc/odbcinst.ini %D/etc/odbcinst.ini-dist; then
rm -f %D/etc/odbc.ini; fi
@exec [ -f %D/etc/odbcinst.ini] || cp %D/etc/odbcinst.ini-dist

You'll also need to add a post-install target to the ports Makefile,
so that it will create the odbc.ini and odbcinst.ini files.

After you have made the changes, submit a PR with the patch and it
should get committed rather quickly.

No electrons were mamed while sending this message. Only slightly bruised.

More information about the freebsd-ports mailing list