Bug 991018
| Summary: | Document environment variables available in unixODBC | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | David Woodhouse <dwmw2> | ||||
| Component: | unixODBC | Assignee: | Jan Staněk <jstanek> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 19 | CC: | hhorak | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-11-11 15:29:16 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Hi David, I had to look into code to get an answer and these should be all environment variables unixODBC reads: ODBCSYSINI -- overloads path to unixODBC config files; by default /etc ODBCINSTINI -- overloads file name of unixODBC drivers configuration file; name is relative to ODBCSYSINI; by default odbcinst.ini ODBCINSTUI -- overloads library name for UI; evaluates as lib+value; by default odbcinstQ4 so the resulted library is libodbcinstQ4 ODBCSEARCH -- overloads configuration mode; one of ODBC_SYSTEM_DSN, ODBC_USER_DSN or ODBC_BOTH_DSN, ODBCINI -- overloads path to user's odbc.ini file; by default ~/.odbc.ini So I believe what you were seeking was $ODBCSYSINI variable, which could solve your problem. Anyway, we should document these variables in the man pages somehow, so keeping this bug opened + changing the Summary. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. Created attachment 814940 [details]
manpage describing environmental variables
I created new man page (section 7) describing the environmental variables and the project as a whole. I did it this way because the variables affect the whole unixODBC (libraries as well as the binaries) and no common man page exists so far.
I sent this page to the upstream and I'm waiting for comments.
After approval from upstream I added the man page to the package. unixODBC-2.3.2-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/unixODBC-2.3.2-2.fc20 unixODBC-2.3.2-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. |
If I set ODBCINSTINI=`pwd`/odbcinst.ini, we actually try to open /etc/`pwd`/odbcinst.ini... which fails. I need to prepend "../" to the path I put in the environment variable. That can't be right, surely? ODBCINSTINI=`pwd`/odbcinst.ini strace -e open ./intel-add-printer.py open("/etc//home/dwmw2/git/intel-add-printer/odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory) pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'FreeTDS' : file not found (0) (SQLDriverConnect)") This version works: ODBCINSTINI=..`pwd`/odbcinst.ini ./intel-add-printer.py I am assuming that $ODBCINSTINI is how I'm supposed to point to an app-specific file; we're not supposed to actually force the user to overwrite their ~/.odbcinst.ini? Or is there a better way?