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>
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
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>
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>
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>