From 4b703de37dc89f2fa4d4d96358d749767cf1d458 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 29 Sep 2005 22:41:56 +0000 Subject: [PATCH] Fixes for bz 161399, 162676. --- nortldglobal.patch | 22 ++++++++++++++++++++++ parserupdate.patch | 17 +++++++++++++++++ unixODBC.spec | 20 +++++++++++++++++--- 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 nortldglobal.patch create mode 100644 parserupdate.patch diff --git a/nortldglobal.patch b/nortldglobal.patch new file mode 100644 index 0000000..2c59576 --- /dev/null +++ b/nortldglobal.patch @@ -0,0 +1,22 @@ +Although we want to use the latest libltdl, there is one patch that must +be made to avoid problems in Perl::ODBC: don't use RTLD_GLOBAL in the +call to dlopen(). + + +diff -Naur unixODBC-2.2.11.save/libltdl/ltdl.c unixODBC-2.2.11/libltdl/ltdl.c +--- unixODBC-2.2.11.save/libltdl/ltdl.c 2005-09-29 16:18:17.000000000 -0400 ++++ unixODBC-2.2.11/libltdl/ltdl.c 2005-09-29 16:45:11.000000000 -0400 +@@ -1107,7 +1107,12 @@ + lt_user_data loader_data; + const char *filename; + { +- lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); ++/* ++ * this need takeing out, otherwise things like perl break ++ * lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW); ++ */ ++ ++ lt_module module = dlopen (filename, LT_LAZY_OR_NOW ); + + if (!module) + { diff --git a/parserupdate.patch b/parserupdate.patch new file mode 100644 index 0000000..7cd349c --- /dev/null +++ b/parserupdate.patch @@ -0,0 +1,17 @@ +Force bison invocation to include -d flag so that yac.h is rebuilt. +The copy supplied in the 2.2.11 distribution does not have the same +symbol numbering that's generated by current Bison, and so the lexer +is out-of-step with the grammar if it just uses that version. This +results in complete failure of the sqp library, leading to reported +problems with text-file driver (bz #162676). + + +diff -Naur unixODBC-2.2.11.orig/sqp/Makefile.am unixODBC-2.2.11/sqp/Makefile.am +--- unixODBC-2.2.11.orig/sqp/Makefile.am 2004-09-13 08:30:29.000000000 -0400 ++++ unixODBC-2.2.11/sqp/Makefile.am 2005-09-29 15:19:52.000000000 -0400 +@@ -1,3 +1,5 @@ ++AM_YFLAGS = -d ++ + if HAVE_FLEX + + noinst_LTLIBRARIES = libsqplc.la diff --git a/unixODBC.spec b/unixODBC.spec index 31c1b86..2810312 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ Summary: A complete ODBC driver manager for Linux. Name: unixODBC Version: 2.2.11 -Release: 2 +Release: 3 License: LGPL Group: System Environment/Libraries Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz @@ -9,8 +9,9 @@ Source1: odbcinst.ini Source2: ODBCConfig.desktop Source3: DataManager.desktop Patch1: depcomp.patch -Patch2: installedltdl.patch Patch3: unixODBC-2.2.11-symbols.patch +Patch4: parserupdate.patch +Patch5: nortldglobal.patch URL: http://www.unixODBC.org/ Conflicts: iodbc BuildPrereq: kdelibs-devel qt-devel libmng-devel XFree86-devel automake autoconf libtool @@ -46,8 +47,8 @@ This package contains components for the ODBCConfig and DataManager %prep %setup -q %patch1 -p1 -%patch2 -p1 %patch3 -p1 +%patch4 -p1 # 2.2.8 includes a libtool that is too old for some of our architectures. # Blow it away and replace with build system's libtool. (We intend to use @@ -63,6 +64,9 @@ if [ -f libltdl/mkinstalldirs ]; then cp -f libltdl/mkinstalldirs . fi +# libltdl patch has to be applied after the above +%patch5 -p1 + %build # pick up qt path export QTDIR= @@ -102,6 +106,10 @@ cp DataManager/ODBC.xpm $RPM_BUILD_ROOT%{_datadir}/icons/odbc.xpm cp DataManagerII/LinuxODBC.xpm $RPM_BUILD_ROOT/usr/share/icons cp DataManagerII/ODBC.xpm $RPM_BUILD_ROOT/usr/share/icons/odbc.xpm +# copy text driver documentation into main doc directory +mkdir -p doc/Drivers/txt +cp -pr Drivers/txt/doc/* doc/Drivers/txt + # don't want to install doc Makefiles as docs find doc -name 'Makefile*' | xargs rm @@ -160,6 +168,12 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Thu Sep 29 2005 Tom Lane 2.2.11-3 +- Force update of yac.h because the copy in the distributed tarball does not + match bison 2.0's numbering of symbols (bz #162676) +- Include documentation of text-file driver +- Use private libltdl so we can omit RTLD_GLOBAL from dlopen flags (bz #161399) + * Sat Sep 24 2005 Tom Lane 2.2.11-2 - Remove Makefiles accidentally included in docs installation (bz #168819) - Updates to keep newer libtool code from installing itself as part of package