diff --git a/1001-xfsprogs-gcc10.patch b/1001-xfsprogs-gcc10.patch new file mode 100644 index 0000000000000000000000000000000000000000..cc597152b3cbb2df7756963d7929abefbaeafa39 --- /dev/null +++ b/1001-xfsprogs-gcc10.patch @@ -0,0 +1,68 @@ +From 0af5be8216f8201246e8c847c81531855bd0f31d Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Tue, 19 Apr 2022 18:26:06 +0800 +Subject: [PATCH] xfsprogs: do not redeclare globals provided by libraries + +--- + db/init.c | 1 - + logprint/logprint.c | 5 ++--- + mdrestore/xfs_mdrestore.c | 1 - + 3 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/db/init.c b/db/init.c +index 455220a..0ac3736 100644 +--- a/db/init.c ++++ b/db/init.c +@@ -27,7 +27,6 @@ static int force; + static struct xfs_mount xmount; + struct xfs_mount *mp; + static struct xlog xlog; +-libxfs_init_t x; + xfs_agnumber_t cur_agno = NULLAGNUMBER; + + static void +diff --git a/logprint/logprint.c b/logprint/logprint.c +index 7754a2a..0d6f682 100644 +--- a/logprint/logprint.c ++++ b/logprint/logprint.c +@@ -24,7 +24,6 @@ int print_buffer; + int print_overwrite; + int print_no_data; + int print_no_print; +-int print_exit = 1; /* -e is now default. specify -c to override */ + static int print_operation = OP_PRINT; + + static void +@@ -132,7 +131,7 @@ main(int argc, char **argv) + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + memset(&mount, 0, sizeof(mount)); +- ++ print_exit = 1; /* -e is now default. specify -c to override */ + progname = basename(argv[0]); + while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) { + switch (c) { +@@ -152,7 +151,7 @@ main(int argc, char **argv) + case 'e': + /* -e is now default + */ +- print_exit++; ++ print_exit = 1; + break; + case 'C': + print_operation = OP_COPY; +diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c +index 3375e08..1cd399d 100644 +--- a/mdrestore/xfs_mdrestore.c ++++ b/mdrestore/xfs_mdrestore.c +@@ -7,7 +7,6 @@ + #include "libxfs.h" + #include "xfs_metadump.h" + +-char *progname; + static int show_progress = 0; + static int show_info = 0; + static int progress_since_warning = 0; +-- +2.27.0 + diff --git a/xfsprogs.spec b/xfsprogs.spec index ffe0f61e58fa3b1491a80ec8c5ebea61038df129..67aa5d2ca1b1b9ec804403c6f0c1a6420d8e552a 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,7 +1,8 @@ +%define anolis_release .0.1 Summary: Utilities for managing the XFS filesystem Name: xfsprogs Version: 5.0.0 -Release: 10%{?dist} +Release: 10%{anolis_release}%{?dist} License: GPL+ and LGPLv2+ Group: System Environment/Base URL: https://xfs.wiki.kernel.org @@ -81,6 +82,11 @@ Patch60: xfsprogs-5.11.0-mkfs-fix-wrong-inobtcount-usage-error-output.patch Patch61: xfsprogs-5.12.0-libxfs-expose-inobtcount-in-xfs-geometry.patch Patch62: xfsprogs-5.12.0-libfrog-report-inobtcount-in-geometry.patch +# Begin: Anolis customized patches +# backport patch from upstream +Patch1001: 1001-xfsprogs-gcc10.patch +# End: Anolis customized patches + %description A set of commands to use the XFS filesystem, including mkfs.xfs. @@ -173,6 +179,7 @@ also want to install xfsprogs. %patch60 -p1 %patch61 -p1 %patch62 -p1 +%patch1001 -p1 %build export tagname=CC @@ -232,6 +239,9 @@ rm -rf $RPM_BUILD_ROOT/%{_mandir}/man8/xfs_scrub* %{_libdir}/*.so %changelog +* Tue Apr 19 2022 Weitao Zhou - 5.0.0-10.0.1 +- Fix gcc10 -fno-common compile issue for compatible with gcc10 build + * Thu Dec 09 2021 Bill O'Donnell 5.0.0-10 - xfsprogs: enable bigtime and inode btree counter features in RHEL8 (#2024201))