databases/unixODBC installs empty config files

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


On 4/19/07, Ed Maste <emaste at phaedrus.sandvine.ca> 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 Makefile.in
or Makefile.am, 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
etc/odbc.ini-dist
@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
etc/odbcinst.ini-dist
@exec [ -f %D/etc/odbcinst.ini] || cp %D/etc/odbcinst.ini-dist
%D/etc/odbcinst.ini

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.

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.


More information about the freebsd-ports mailing list