diff --git a/null_dereference_check.patch b/null_dereference_check.patch index 4a37061024abd89554ad3afa597db93ab879cb18..025efcbc885632bb7ca49204c1f234c282572937 100644 --- a/null_dereference_check.patch +++ b/null_dereference_check.patch @@ -66,7 +66,7 @@ diff -rNu unixODBC-2.3.9/DriverManager/SQLRowCount.c unixODBC-new/DriverManager/ +++ unixODBC-new/DriverManager/SQLRowCount.c 2021-11-26 11:32:24.967706787 +0800 @@ -139,6 +139,10 @@ SQLRETURN ret; - SQLCHAR s1[ 100 + LOG_MESSAGE_LEN ]; + SQLCHAR s0[ 24 ], s1[ 100 + LOG_MESSAGE_LEN ]; + if (!rowcount) { + return SQL_ERROR; diff --git a/odbcinst.ini b/odbcinst.ini index a99515c0b982971d12cf9b8165d565f1a5d351c6..d249926faf99e2beb2a28cad037b20d00223fa8f 100644 --- a/odbcinst.ini +++ b/odbcinst.ini @@ -11,18 +11,7 @@ Setup64 = /usr/lib64/libodbcpsqlS.so FileUsage = 1 -# Driver from the mysql-connector-odbc package -# Setup from the unixODBC package -[MySQL] -Description = ODBC for MySQL -Driver = /usr/lib/libmyodbc5.so -Setup = /usr/lib/libodbcmyS.so -Driver64 = /usr/lib64/libmyodbc5.so -Setup64 = /usr/lib64/libodbcmyS.so -FileUsage = 1 - - -# Driver from the freetds-libs package +# Driver from the freetds package # Setup from the unixODBC package [FreeTDS] Description = Free Sybase & MS SQL Driver diff --git a/unixODBC-2.3.12.tar.gz b/unixODBC-2.3.12.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..106b9e50a62bb61f5242fe4156033e6c837687ea Binary files /dev/null and b/unixODBC-2.3.12.tar.gz differ diff --git a/unixODBC-2.3.9.tar.gz b/unixODBC-2.3.9.tar.gz deleted file mode 100644 index c8813b69a4ded51a0abce6f518b50f209ca2dbff..0000000000000000000000000000000000000000 Binary files a/unixODBC-2.3.9.tar.gz and /dev/null differ diff --git a/unixODBC.spec b/unixODBC.spec index 773ae975d1165e16936b5c5faa2a2f26f02778fe..87c35fcf3e08263a14180492d6e562d5d8d72890 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,15 +1,16 @@ Name: unixODBC -Version: 2.3.9 -Release: 4 +Version: 2.3.12 +Release: 1 Summary: Open-source project that implements the ODBC API -License: GPLv2+ and LGPLv2+ -URL: http://www.unixODBC.org/ -Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz +License: GPL-2.0-or-later AND LGPL-2.1-or-later +URL: https://www.unixODBC.org/ +Source: https://www.unixODBC.org/%{name}-%{version}.tar.gz Source1: odbcinst.ini Patch0000: null_dereference_check.patch Patch0001: delete_password.patch Patch6001: backport-0001-CVE-2024-1013.patch Conflicts: iodbc +Conflicts: unixODBC-devel < 2.3.12 BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex readline-devel %description @@ -20,77 +21,76 @@ include GUI support for both KDE and GNOME. %package devel Summary: Development and header files for %{name} Requires: %{name} = %{version}-%{release} +Conflicts: unixODBC < 2.3.12 %description devel Development and header files for %{name} %prep %autosetup -p1 -autoreconf -vfi +rm -fr libltdl %build CFLAGS="%{optflags} -fno-strict-aliasing" CXXFLAGS="$CFLAGS" export CFLAGS CXXFLAGS - -%configure --with-gnu-ld=yes --enable-threads=yes --enable-drivers=yes --enable-driverc=yes - -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -make all +autoreconf -vfi +%configure --with-gnu-ld=yes --enable-threads=yes --enable-drivers=no --enable-driver-config=yes --disable-static +%disable_rpath +%make_build %install %make_install -install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} -rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so* +%delete_la +install -D -m644 %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/odbcinst.ini find doc -name 'Makefile*' | xargs rm -%post -/sbin/ldconfig - -%postun -/sbin/ldconfig - %files -%doc README COPYING AUTHORS ChangeLog NEWS doc +%license COPYING +%doc README AUTHORS ChangeLog NEWS doc %config(noreplace) %{_sysconfdir}/odbc* +# Binaries %{_bindir}/odbcinst %{_bindir}/isql %{_bindir}/dltest %{_bindir}/iusql %{_bindir}/odbc_config %{_bindir}/slencheck -%{_libdir}/*.so.* -%{_libdir}/libodbc.so -%{_libdir}/libodbcinst.so -%{_libdir}/libodbcpsqlS.so +# Shared libraries +%{_libdir}/libodbc.so.* +%{_libdir}/libodbccr.so.* +%{_libdir}/libodbcinst.so.* +# Driver config libs +%{_libdir}/libesoobS.so +%{_libdir}/libmimerS.so +%{_libdir}/libodbcdrvcfg1S.so +%{_libdir}/libodbcdrvcfg2S.so +%{_libdir}/libodbcminiS.so %{_libdir}/libodbcmyS.so +%{_libdir}/libodbcnnS.so +%{_libdir}/libodbcpsqlS.so +%{_libdir}/libodbctxtS.so +%{_libdir}/liboplodbcS.so +%{_libdir}/liboraodbcS.so +%{_libdir}/libsapdbS.so %{_libdir}/libtdsS.so -%{_mandir}/man*/* +# Man pages +%{_mandir}/man?/* %files devel %{_includedir}/* -%_libdir/pkgconfig/*.pc -%{_libdir}/libodbcdrvcfg2S.so -%{_libdir}/liboraodbcS.so -%{_libdir}/libodbcminiS.so +%{_libdir}/pkgconfig/*.pc +# Shared libraries, corresponding to those listed in main package +%{_libdir}/libodbc.so %{_libdir}/libodbccr.so -%{_libdir}/libmimerS.so -%{_libdir}/libodbcdrvcfg1S.so -%{_libdir}/libsapdbS.so -%{_libdir}/libesoobS.so -%{_libdir}/liboplodbcS.so -%{_libdir}/libodbcnnS.so -%{_libdir}/libtemplate.so -%{_libdir}/libnn.so -%{_libdir}/libodbctxtS.so -%exclude %{_libdir}/*.a -%exclude %{_libdir}/*.la -%exclude %{_libdir}/libltdl.* -%exclude %{_datadir}/libtool +%{_libdir}/libodbcinst.so %changelog +* Thu Oct 24 2024 Funda Wang - 2.3.12-1 +- update to 2.3.12 +- disable drivers build as they are not supported upstream +- drop sample MySQL settings, as we do not offer mysql-connector-odbc for now + * Thu Oct 24 2024 Funda Wang - 2.3.9-4 - fix CVE-2024-1013 diff --git a/unixODBC.yaml b/unixODBC.yaml index a724d4d52f6f2d5434cc6503e993328adde588a2..1ec8190e56955b3cc7d70b81f26be312dcd51176 100644 --- a/unixODBC.yaml +++ b/unixODBC.yaml @@ -1,4 +1,4 @@ -version_control: svn -src_repo: https://svn.code.sf.net/p/unixodbc/code/ -tag_prefix: 2.3.0 -seperator: . +version_control: github +src_repo: lurcher/unixODBC +tag_prefix: +separator: .