unixODBC/unixODBC.spec
hanqiudan 6facb056fd [Backport] fix CVE-2024-1013
Offering:EulerOS Server
CVE:CVE-2024-1013
Reference:45f501e1be
Type:CVE
reason:fix CVE-2024-1013
(cherry picked from commit ac762de92e85b0a7971f4556ca38b1f83dd114c6)
2024-03-25 11:09:50 +08:00

103 lines
2.6 KiB
RPMSpec

Name: unixODBC
Version: 2.3.7
Release: 3.h1
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: so-version-bump.patch
Patch0001: keep-typedefs.patch
Patch0002: fix_leaks.patch
Patch0003: 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
* Sat Mar 23 2024 hanqiudan <hanqiudan@huawei.com> - 2.3.7-3.h1
- fix CVE-2024-1013
* 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