From 025defab32601a5d0c95de33dc6bbc68c26ef322 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 28 Oct 2024 00:24:04 +0800 Subject: [PATCH] link against icu-uc for icu >= 76 --- 0008-xfsprogs-link-with-icu-uc.patch | 64 ++++++++++++++++++++++++++++ xfsprogs.spec | 33 ++++++-------- 2 files changed, 77 insertions(+), 20 deletions(-) create mode 100644 0008-xfsprogs-link-with-icu-uc.patch diff --git a/0008-xfsprogs-link-with-icu-uc.patch b/0008-xfsprogs-link-with-icu-uc.patch new file mode 100644 index 0000000..56c9c66 --- /dev/null +++ b/0008-xfsprogs-link-with-icu-uc.patch @@ -0,0 +1,64 @@ +--- xfsprogs-6.6.0/m4/package_icu.m4.orig 2024-10-27 22:46:47.430672600 +0800 ++++ xfsprogs-6.6.0/m4/package_icu.m4 2024-10-27 22:46:57.464699700 +0800 +@@ -1,5 +1,5 @@ + AC_DEFUN([AC_HAVE_LIBICU], +- [ PKG_CHECK_MODULES([libicu], [icu-i18n], [have_libicu=yes], [have_libicu=no]) ++ [ PKG_CHECK_MODULES([libicu], [icu-i18n icu-uc], [have_libicu=yes], [have_libicu=no]) + AC_SUBST(have_libicu) + AC_SUBST(libicu_CFLAGS) + AC_SUBST(libicu_LIBS) +--- xfsprogs-6.6.0/configure.orig 2024-10-27 23:37:11.085870900 +0800 ++++ xfsprogs-6.6.0/configure 2024-10-27 23:38:23.931613100 +0800 +@@ -16909,19 +16909,19 @@ + fi + + pkg_failed=no +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icu-i18n" >&5 +-printf %s "checking for icu-i18n... " >&6; } ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icu-i18n icu-uc" >&5 ++printf %s "checking for icu-i18n icu-uc... " >&6; } + + if test -n "$libicu_CFLAGS"; then + pkg_cv_libicu_CFLAGS="$libicu_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n icu-uc\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "icu-i18n icu-uc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_libicu_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n" 2>/dev/null` ++ pkg_cv_libicu_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n icu-uc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -16933,12 +16933,12 @@ + pkg_cv_libicu_LIBS="$libicu_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n icu-uc\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "icu-i18n icu-uc") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_libicu_LIBS=`$PKG_CONFIG --libs "icu-i18n" 2>/dev/null` ++ pkg_cv_libicu_LIBS=`$PKG_CONFIG --libs "icu-i18n icu-uc" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -16959,9 +16959,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- libicu_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n" 2>&1` ++ libicu_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n icu-uc" 2>&1` + else +- libicu_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n" 2>&1` ++ libicu_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n icu-uc" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$libicu_PKG_ERRORS" >&5 diff --git a/xfsprogs.spec b/xfsprogs.spec index abb028f..9a8ee32 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,8 +1,8 @@ Name: xfsprogs Version: 6.6.0 -Release: 7 +Release: 8 Summary: Administration and debugging tools for the XFS file system -License: GPL+ and LGPLv2+ +License: GPL-1.0-or-later AND LGPL-2.1-or-later URL: https://xfs.wiki.kernel.org Source0: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz @@ -26,6 +26,7 @@ Patch4: 0004-xfs_db-fix-leak-in-flist_find_ftyp.patch Patch5: 0005-xfs_db-add-helper-for-flist_find_type-for-clearer-fi.patch Patch6: 0006-xfs_io-fix-mread-with-length-1-mod-page-size.patch Patch7: 0007-xfs_scrub-don-t-call-phase_end-if-phase_rusage-was-n.patch +Patch8: 0008-xfsprogs-link-with-icu-uc.patch %description xfsprogs are the userspace utilities that manage XFS filesystems. @@ -44,44 +45,35 @@ you have backups of your data! %package devel Summary: The header files for XFS filesystem -Requires: xfsprogs = %{version}-%{release}, libuuid-devel +Requires: xfsprogs = %{version}-%{release} +Requires: libuuid-devel %description devel -It contains the header files for the developing of XFS +It contains the header files for the developing of XFS filesystem. -%package help -Summary: Including man files for xfsprogs -Requires: man -BuildArch: noarch - -%description help -This contains man files for the using of xfsprogs. - +%package_help %prep %autosetup -n %{name}-%{version} -p1 %build export tagname=CC - %configure --enable-editline=yes --enable-blkid=yes --enable-lto=no -make %{?_smp_mflags} +%make_build %install make DIST_ROOT=%{buildroot} install install-dev \ PKG_ROOT_SBIN_DIR=%{_sbindir} PKG_ROOT_LIB_DIR=%{_libdir} +%delete_la_and_a -rm -f %{buildroot}{%{_lib}/*.{la,a,so},%{_libdir}/*.{la,a}} rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/ %find_lang %{name} -%ldconfig_scriptlets - %files -f %{name}.lang -%doc doc/CHANGES README +%doc doc/CHANGES README %{_libdir}/*.so.* %{_sbindir}/* %{_unitdir}/* @@ -106,9 +98,10 @@ rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/ %{_mandir}/man*/* %exclude %{_mandir}/man8/xfs_scrub* - - %changelog +* Sun Oct 27 2024 Funda Wang - 6.6.0-8 +- link against icu-uc for icu >= 76 + * Sat Jul 6 2024 liuh - 6.6.0-7 - xfs_scrub: don't call phase_end if phase_rusage was not initialized -- Gitee