Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 447288

Summary: =dev-db/sqlncli-11.0.1790.0 - New package. - Microsoft® SQL Server® ODBC Driver 1.0 for Linux
Product: Gentoo Linux Reporter: Dyweni <j6yNRdsH5Fc3>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: UNCONFIRMED ---    
Severity: enhancement CC: Hugo.Mildenberger
Priority: Normal Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 456790    
Bug Blocks: 458352    
Attachments: =dev-db\sqlncli-11.0.1790.0 ebuild
The modified =dev-db\unixODBC-2.3.1 ebuild
Updated metadata for the modified =dev-db/unixODBC-2.3.1 ebuild
ebuild revised wrt copyright and avoidance /usr/lib64 symlinks
Microsoft license for sqlncli
Patch install.sh in order to respect ${DESTDIR}
A simple example program for testing sqlncli via unixODBC
Makefile for sqlncli example program
metadata for sqlncli ebuild
ebuild revised for more documentation, no my_* () and so on
Compensate oversights introduced in the previous ebuild revision

Description Dyweni 2012-12-14 21:19:01 UTC
This is a new ebuild request for =dev-db/sqlncli-11.0.1790.0.

SQLNCLI is 'Microsoft® SQL Server® ODBC Driver 1.0 for Linux'.  This allows developers on linux to access data in a Microsql SQL Server Database.

This depends on a modified version of the unixODBC-2.3.1 ebuild, which add some specific compilation flags, per the sqlncli readme.

Reproducible: Always
Comment 1 Dyweni 2012-12-14 21:19:45 UTC
Created attachment 332322 [details]
=dev-db\sqlncli-11.0.1790.0 ebuild
Comment 2 Dyweni 2012-12-14 21:20:16 UTC
Created attachment 332324 [details]
The modified =dev-db\unixODBC-2.3.1 ebuild
Comment 3 Dyweni 2012-12-14 21:20:47 UTC
Created attachment 332326 [details]
Updated metadata for the modified =dev-db/unixODBC-2.3.1 ebuild

This add two new flags.
Comment 4 Hugo Mildenberger 2013-02-11 14:05:36 UTC
Created attachment 338588 [details]
ebuild revised wrt copyright and avoidance /usr/lib64 symlinks

List of the differences to the first ebuild:

-LICENSE is not GPL, but a Microsoft license specific to sqlncli (license file will be attached)

-DESCRIPTION should not hold non-ASCII characters (fix repoman complaint)

-HOMEPAGE now correct

-SRC_URL now correct

-Patch install.sh wrt ${DESTDIR} instead of transforming it on the fly using sed (patch will be attached.) 

-don't contaminate /usr/lib64 by creating arbitrary symlinks for each of library versions neeeded by the pre-compiled binaries as these versions already disappeared from the portage tree. Instead create these links in /opt/microsoft/sqlncli/lib64 and use patchelf --set-rpath to set the DT_NEEDED entry of the pre-compiled binaries going to be installed in /opt/microsoft/sqlncli. I don't know if this is the a good solution.

I've linked an example program with a modified version of unixODBC as suggested by Leel. Both this example program and the sqlcmd client did run without any obvious problem -- except that this test was hitherto offline-only. Example files will be attached too.
Comment 5 Hugo Mildenberger 2013-02-11 14:08:00 UTC
Created attachment 338590 [details]
Microsoft license for sqlncli
Comment 6 Hugo Mildenberger 2013-02-11 14:10:20 UTC
Created attachment 338594 [details, diff]
Patch install.sh in order to respect ${DESTDIR}
Comment 7 Hugo Mildenberger 2013-02-11 14:15:19 UTC
Created attachment 338596 [details]
A simple example program for testing sqlncli via unixODBC

Copy this file to dev-db/sqlncli/files/examples
Comment 8 Hugo Mildenberger 2013-02-11 14:16:42 UTC
Created attachment 338598 [details]
Makefile for sqlncli example program

Copy this file to dev-dv/sqlncli/files/examples/
Comment 9 Hugo Mildenberger 2013-02-11 14:20:05 UTC
Created attachment 338600 [details]
metadata for sqlncli ebuild

longdescription was copied from Microsoft sqlncli homepage.
Comment 10 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-11 14:45:38 UTC
Please use the latest header whenever possible, to make sure you use the right dates as well as to have the necessary third line. See /usr/portage/header.txt

Don't do things like my_symlink ... || die, you can use dosym which doesn't need die, see http://devmanual.gentoo.org/function-reference/install-functions for a full list of commands.

The deletes at the end of the install can likely be moved to src_prepare, or be removed altogether if you make sure you just don't install them. If you do keep it around in src_prepare, this can be simplied by first changing directory and then deleting them all in one line.

The install part feels quite busy, it might need some more documentation lines to clarify what each step does.

Other than that, it looks quite good.
Comment 11 Hugo Mildenberger 2013-02-11 19:18:04 UTC
Created attachment 338642 [details]
ebuild revised for more documentation, no my_* ()  and so on

Tom, I don't have an idea how I could avoid the delete statement or move it to src_prepare. This is a special situation which could only be avoided by not calling the install.sh script provided by Microsoft. Yet I hope the comments now make it now very clear what src_install() is meant to do.
Comment 12 Hugo Mildenberger 2013-02-12 12:10:21 UTC
Created attachment 338684 [details]
Compensate oversights introduced in the previous ebuild revision
Comment 13 Sok Ann Yap 2013-03-04 22:19:17 UTC
There was a new release on Jan 15 for version 11.0.2270.0 (http://www.microsoft.com/en-us/download/details.aspx?id=36437), and the driver was renamed from "SQL Server Native Client 11.0" to "ODBC Driver 11 for SQL Server" for unknown reason.