unixODBC/unixODBC.spec
Funda Wang 5d86aae7ea fix CVE-2024-1013
(cherry picked from commit d427467d8b1c63c8b0a4345cb611bcd0577c6acb)
2024-10-24 11:15:36 +08:00

111 lines
2.9 KiB
RPMSpec

Name: unixODBC
Version: 2.3.9
Release: 4
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
Source1: odbcinst.ini
Patch0000: null_dereference_check.patch
Patch0001: delete_password.patch
Patch6001: backport-0001-CVE-2024-1013.patch
Conflicts: iodbc
BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex readline-devel
%description
The unixODBC Project goals are to develop and promote unixODBC to be the
definitive standard for ODBC on non MS Windows platforms. This is to
include GUI support for both KDE and GNOME.
%package devel
Summary: Development and header files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
Development and header files for %{name}
%prep
%autosetup -p1
autoreconf -vfi
%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
%install
%make_install
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so*
find doc -name 'Makefile*' | xargs rm
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc README COPYING AUTHORS ChangeLog NEWS doc
%config(noreplace) %{_sysconfdir}/odbc*
%{_bindir}/odbcinst
%{_bindir}/isql
%{_bindir}/dltest
%{_bindir}/iusql
%{_bindir}/odbc_config
%{_bindir}/slencheck
%{_libdir}/*.so.*
%{_libdir}/libodbc.so
%{_libdir}/libodbcinst.so
%{_libdir}/libodbcpsqlS.so
%{_libdir}/libodbcmyS.so
%{_libdir}/libtdsS.so
%{_mandir}/man*/*
%files devel
%{_includedir}/*
%_libdir/pkgconfig/*.pc
%{_libdir}/libodbcdrvcfg2S.so
%{_libdir}/liboraodbcS.so
%{_libdir}/libodbcminiS.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
%changelog
* Thu Oct 24 2024 Funda Wang <fundawang@yeah.net> - 2.3.9-4
- fix CVE-2024-1013
* Thu Dec 16 2021 Haoran Yang <yanghaoran7@huawei.com> - 2.3.9-3
- add delete_password.patch (hiding password in unixODBC log)
* Fri Nov 26 2021 Haoran Yang <yanghaoran7@huawei.com> - 2.3.9-2
- add null_dereference_check.patch
* Thu Nov 25 2021 Haoran Yang <yanghaoran7@huawei.com> - 2.3.9-1
- update unixODBC from version 2.3.7 to 2.3.9 and delete old patches
* Mon Nov 8 2021 Haoran Yang <yanghaoran7@huawei.com> - 2.3.7-3
- fix some leaks and eliminate duplicated code
* Tue Nov 5 2019 Lijin Yang <yanglijin@huawei.com> - 1.1.0-14
- Package init