diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..0a80fdce31f59c062e2abba28776e9521eddff30 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..ca8d37225e18187a8d8671db29115449df1301b2 --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/samba diff --git a/backport-samba-link-against-icu-uc.patch b/backport-samba-link-against-icu-uc.patch new file mode 100644 index 0000000000000000000000000000000000000000..71e4f1bb14b91754b3d0aab07af7badcc4eb57c4 --- /dev/null +++ b/backport-samba-link-against-icu-uc.patch @@ -0,0 +1,108 @@ +From 05807488fd340751ee976c5f8a367013ff94843e Mon Sep 17 00:00:00 2001 +From: Earl Chew +Date: Sat, 16 Dec 2023 08:48:36 -0800 +Subject: [PATCH] Combine ICU libraries icu-i18n and icu-uc into a single + dependency + +Rather than probing for icu-i18n, icu-uc, and icudata libraries +separately, only probe for icu-i18n, and icu-uc, as direct dependencies +This avoids overlinking with icudata, and allows the package +to build even when ICU is not installed as a system library. + +RN: Only use icu-i18n and icu-uc to express ICU dependency + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=15623 + +Signed-off-by: Earl Chew +Reviewed-by: Andrew Bartlett +Reviewed-by: Douglas Bagnall +--- + lib/util/charset/iconv.c | 8 ++++---- + lib/util/charset/wscript_build | 3 ++- + lib/util/charset/wscript_configure | 17 +++++++---------- + 3 files changed, 13 insertions(+), 15 deletions(-) + +diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c +index 131df6409866..074794a26e31 100644 +--- a/lib/util/charset/iconv.c ++++ b/lib/util/charset/iconv.c +@@ -26,7 +26,7 @@ + #include "lib/util/charset/charset.h" + #include "lib/util/charset/charset_proto.h" + +-#ifdef HAVE_ICU_I18N ++#ifdef HAVE_ICUI18N + #include + #include + #endif +@@ -168,7 +168,7 @@ static size_t sys_iconv(void *cd, + } + #endif + +-#ifdef HAVE_ICU_I18N ++#ifdef HAVE_ICUI18N + static size_t sys_uconv(void *cd, + const char **inbuf, + size_t *inbytesleft, +@@ -334,7 +334,7 @@ static bool is_utf16(const char *name) + + static int smb_iconv_t_destructor(smb_iconv_t hwd) + { +-#ifdef HAVE_ICU_I18N ++#ifdef HAVE_ICUI18N + /* + * This has to come first, as the cd_direct member won't be an iconv + * handle and must not be passed to iconv_close(). +@@ -418,7 +418,7 @@ _PUBLIC_ smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode, + } + #endif + +-#ifdef HAVE_ICU_I18N ++#ifdef HAVE_ICUI18N + if (strcasecmp(fromcode, "UTF8-NFD") == 0 && + strcasecmp(tocode, "UTF8-NFC") == 0) + { +diff --git a/lib/util/charset/wscript_build b/lib/util/charset/wscript_build +index c69a17170ad6..3af90a0ad574 100644 +--- a/lib/util/charset/wscript_build ++++ b/lib/util/charset/wscript_build +@@ -6,7 +6,8 @@ bld.SAMBA_SUBSYSTEM('ICONV_WRAPPER', + weird.c + charset_macosxfs.c + ''', +- public_deps='iconv replace talloc ' + bld.env['icu-libs']) ++ deps=bld.env['icu-libs'], ++ public_deps='iconv replace talloc') + + bld.SAMBA_SUBSYSTEM('charset', + public_headers='charset.h', +diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure +index 58858f69b319..c49b55a4fd4b 100644 +--- a/lib/util/charset/wscript_configure ++++ b/lib/util/charset/wscript_configure +@@ -37,15 +37,12 @@ conf.CHECK_CODE(''' + lib='iconv', + headers='errno.h iconv.h') + +-if conf.CHECK_CFG(package='icu-i18n', ++if conf.CHECK_CFG(package='icu-i18n icu-uc', + args='--cflags --libs', +- msg='Checking for icu-i18n', +- uselib_store='ICU_I18N'): +- for lib in conf.env['LIB_ICU_I18N']: +- conf.CHECK_LIB(lib, shlib=True, mandatory=True) +- conf.env['icu-libs'] = ' '.join(conf.env['LIB_ICU_I18N']) +- if not conf.CHECK_HEADERS('unicode/ustring.h'): +- conf.fatal('Found libicu, but unicode/ustring.h is missing') ++ msg='Checking for icu-i18n icu-uc', ++ uselib_store='ICUI18N'): ++ conf.env['icu-libs'] = 'icui18n icuuc' ++ conf.CHECK_LIB(conf.env['icu-libs'], shlib=True, mandatory=True) ++ if not conf.CHECK_HEADERS('unicode/ustring.h', lib='icui18n icuuc'): ++ conf.fatal('Found icui18n, but unicode/ustring.h is missing') + conf.DEFINE('HAVE_UTF8_NORMALISATION', 1) +-else: +- conf.env['icu-libs'] = '' +-- +GitLab + diff --git a/samba-4.19.3.tar.gz b/samba-4.19.3.tar.gz index fbf4354ba1fb4d5dcfd77d53bcc3ae99d3994c66..8962c03b3317d40bf00d70dd6b62ae42daf911ff 100644 Binary files a/samba-4.19.3.tar.gz and b/samba-4.19.3.tar.gz differ diff --git a/samba.spec b/samba.spec index 69d3bec9a8bc9defdb718b1a93672af370424950..dd8b9e53303043607a76a267c6cd55e2a5789776 100644 --- a/samba.spec +++ b/samba.spec @@ -53,7 +53,7 @@ Name: samba Version: 4.19.3 -Release: 6 +Release: 7 Summary: A suite for Linux to interoperate with Windows License: GPL-3.0-or-later AND LGPL-3.0-or-later @@ -73,6 +73,7 @@ Source201: README.downgrade Patch1: remove-sensitive-info.patch Patch2: backport-0001-s4-dsdb-strcasecmp_with_ldb_val-avoids-overflow.patch +Patch3: backport-samba-link-against-icu-uc.patch BuildRequires: avahi-devel bison dbus-devel docbook-style-xsl e2fsprogs-devel flex gawk gnupg2 gnutls-devel >= 3.4.7 gpgme-devel @@ -426,7 +427,7 @@ to manage Samba AD. %package pidl Summary: Perl IDL compiler package for %{name} -Requires: perl(Parse::Yapp) perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(Parse::Yapp) Requires: perl-interpreter Requires: perl(FindBin) BuildArch: noarch @@ -3595,6 +3596,9 @@ fi %endif %changelog +* Sun Oct 27 2024 Funda Wang - 4.19.3-7 +- fix build with icu >= 76 where icu-i18n and icu-uc becomes separated + * Tue Sep 24 2024 xinghe - 4.19.3-6 - Type:bugfix - ID:NA