Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Dmitry Butskoy
3ef1461967 Update to 1.5.18 2026-08-11 22:03:54 +03:00
Michal Schorm
e1705a147f [bugfix] Fix FTBFS with nettle 4.0: 'sha1_digest()' also lost length parameter
The existing nettle 4.0 patch fixed 'nettle_md4_digest()' and
'nettle_md5_digest()' but missed 'sha1_digest()' in
'sec_negotiate_gnutls.h', which also dropped the length parameter
in nettle 4.0.

Replace the unconditional patch with version-guarded '#ifdef' blocks
matching upstream commit 67663a0 ("Fix compatibility with Nettle 4
library"), covering all three digest functions with backwards
compatibility for nettle < 4.

Co-Authored-By: Claude AI <noreply@anthropic.com>
2026-07-29 14:18:33 +02:00
Michal Schorm
2bc4071fb0 [Fedora 45 Change] Ship drop-in snippet for ODBC driver self-registration
Install '10-freetds.ini' to '/usr/lib/odbc/odbcinst.d/' so the
unixODBC file trigger automatically registers the driver in
'/etc/odbcinst.ini'. Uses bare library name 'libtdsodbc.so'
resolved via the compiled-in MODULEDIR.

Snippet directory layout:
- Snippets are installed to '%{_prefix}/lib/odbc/odbcinst.d/' rather
  than directly to '%{_prefix}/lib/odbc/' to separate configuration
  from content — on multilib systems, '%{_prefix}/lib/odbc/' may also
  contain 32-bit driver '.so' files, and the RPM file triggers that
  watch the snippet directory would fire spuriously on '.so' installs
- Both '%{_prefix}/lib/odbc/' and '%{_prefix}/lib/odbc/odbcinst.d/'
  are co-owned by this package per Fedora directory ownership guidelines

Co-Authored-By: Claude AI <noreply@anthropic.com>

This commit is part of a Fedora 45 Self Contained Change:
  https://fedoraproject.org/wiki/Changes/ODBC_stack_modernization
2026-07-29 12:44:41 +02:00
Michal Schorm
82aca510e3 [bugfix] Fix FTBFS with nettle 4.0: digest functions changed signature
Nettle 4.0 (in Fedora 45) changed 'md5_digest()' and 'md4_digest()'
from 3 arguments '(ctx, length, digest)' to 2 arguments '(ctx, digest)'.
The digest length is now implicit (always the algorithm's native size).

FreeTDS wraps the nettle API in inline functions in
'include/freetds/utils/md5.h' and 'include/freetds/utils/md4.h'.
Both called 'nettle_md5_digest(ctx, 16, digest)' and
'nettle_md4_digest(ctx, 16, digest)' respectively, which no longer
compiles:

  error: too many arguments to function 'nettle_md5_digest';
         expected 2, have 3

Drop the now-removed length argument from both call sites.

Co-Authored-By: Claude AI <noreply@anthropic.com>
2026-07-29 12:44:37 +02:00
Fedora Release Engineering
bbe3fd78e5 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-15 23:28:07 +00:00
Michal Schorm
7b373fa3c7 [bugfix] Move ODBC plugin libtdsodbc.so to '%{_libdir}/odbc/' (rhbz#2453060)
Move the ODBC driver symlink 'libtdsodbc.so' from '%{_libdir}/' to
'%{_libdir}/odbc/' to keep ODBC driver plugins out of the bare library
directory. The 'odbc/' subdirectory name is driver-manager-neutral and
consistent with Debian's convention and mdbtools-odbc in Fedora.

The versioned 'libtdsodbc.so.0' stays in '%{_libdir}/' (in '-libs')
because freetds links against it at build time. Only the unversioned
symlink (used as an ODBC plugin entry point) moves to the subdirectory.

Related: rhbz#2453060

Co-Authored-By: Claude AI <noreply@anthropic.com>
2026-04-15 21:11:02 +02:00
3 changed files with 39 additions and 5 deletions

3
10-freetds.ini Normal file
View file

@ -0,0 +1,3 @@
[FreeTDS]
Description = Free Sybase & MS SQL Driver
Driver = libtdsodbc.so

View file

@ -2,14 +2,15 @@
Name: freetds
Summary: Implementation of the TDS (Tabular DataStream) protocol
Version: 1.4.23
Release: 4%{?dist}
Version: 1.5.18
Release: 1%{?dist}
# Automatically converted from old format: LGPLv2+ and GPLv2+ - review is highly recommended.
License: LGPL-2.0-or-later AND GPL-2.0-or-later
URL: http://www.freetds.org/
Source0: https://www.freetds.org/files/stable/%{name}-%{version}.tar.bz2
Source1: freetds-tds_sysdep_public.h
Source2: 10-freetds.ini
BuildRequires: unixODBC-devel, readline-devel, gnutls-devel, krb5-devel
BuildRequires: libgcrypt-devel
@ -99,6 +100,13 @@ make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
chmod -x $RPM_BUILD_ROOT%{_sysconfdir}/*
# Move ODBC plugin to a dedicated subdirectory (rhbz#2453060)
# libtdsodbc.so is a symlink to libtdsodbc.so.0 -- recreate it with
# a correct relative path from the subdirectory back to the parent
mkdir -p $RPM_BUILD_ROOT%{_libdir}/odbc
unlink $RPM_BUILD_ROOT%{_libdir}/libtdsodbc.so
ln -s ../libtdsodbc.so.0 $RPM_BUILD_ROOT%{_libdir}/odbc/libtdsodbc.so
mv -f $RPM_BUILD_ROOT%{_includedir}/tds_sysdep_public.h \
$RPM_BUILD_ROOT%{_includedir}/tds_sysdep_public_%{bits}.h
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_includedir}/tds_sysdep_public.h
@ -111,6 +119,10 @@ mv -f samples/unixodbc.freetds.driver.template \
mkdir samples-odbc
mv -f samples/*odbc* samples-odbc
# ODBC driver registration drop-in snippet
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/odbc/odbcinst.d
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_prefix}/lib/odbc/odbcinst.d/
# deinstall it for our own way...
mv -f $RPM_BUILD_ROOT%{_docdir}/%{name} docdir
find docdir -type f -print0 | xargs -0 chmod -x
@ -131,7 +143,11 @@ find docdir -type f -print0 | xargs -0 chmod -x
%files libs
%license COPYING_LIB.txt
%{_libdir}/*.so.*
%{_libdir}/libtdsodbc.so
%dir %{_libdir}/odbc
%{_libdir}/odbc/libtdsodbc.so
%dir %{_prefix}/lib/odbc
%dir %{_prefix}/lib/odbc/odbcinst.d
%{_prefix}/lib/odbc/odbcinst.d/10-freetds.ini
%doc samples-odbc
%config(noreplace) %{_sysconfdir}/*.conf
%{_mandir}/man5/*
@ -141,7 +157,7 @@ find docdir -type f -print0 | xargs -0 chmod -x
%license COPYING_LIB.txt
%doc samples
%{_libdir}/*.so
%exclude %{_libdir}/libtdsodbc.so
%exclude %{_libdir}/odbc/libtdsodbc.so
%{_includedir}/*
@ -150,6 +166,21 @@ find docdir -type f -print0 | xargs -0 chmod -x
%changelog
* Tue Aug 11 2026 Dmitry Butskoy <Dmitry@Butskoy.name> - 1.5.18-1
- update to 1.5.18 (#2513794)
* Wed Jul 29 2026 Michal Schorm <mschorm@redhat.com> - 1.4.23-8
- Fix FTBFS with nettle 4.0: 'sha1_digest()' also lost length parameter
* Mon Jul 20 2026 Michal Schorm <mschorm@redhat.com> - 1.4.23-7
- Ship drop-in snippet for ODBC driver self-registration
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.23-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Mon Mar 30 2026 Michal Schorm <mschorm@redhat.com> - 1.4.23-5
- Move ODBC plugin libtdsodbc.so to %%{_libdir}/odbc/ (rhbz#2453060)
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.23-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (freetds-1.4.23.tar.bz2) = 9b51b21d9c5dc7cac3d9fdccb3a600a6b3b2a0df6f7a0396497ba3377c9a6925b3e4ea3dfbb671bd4563c321692bea82c6f70c2ccefb30eaa0d006ebd3aac249
SHA512 (freetds-1.5.18.tar.bz2) = 9410b992d5b6a2bede00a6e81256b9f426d1477d7b9a2ea74c0481b2a5c3840c35171916a24f7820e101bfc44cf67dbf7c6c5d69010415c19178d91e7949859e