From 008e940d56c8c412fe1d48dc6830f978bc93aff2 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Fri, 25 Sep 2020 11:07:41 +0800 Subject: [PATCH] Remove superfluous declaration of program_name this change has given better compatible with both gcc8 and gcc10 toolchain, should be maintained util upstream fixes Signed-off-by: Liwei Ge Signed-off-by: weitao zhou --- ...n-of-program_name-to-fix-gcc10-issue.patch | 26 +++++++++++++++++++ cpio.spec | 10 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 1001-remove-superfluous-declaration-of-program_name-to-fix-gcc10-issue.patch diff --git a/1001-remove-superfluous-declaration-of-program_name-to-fix-gcc10-issue.patch b/1001-remove-superfluous-declaration-of-program_name-to-fix-gcc10-issue.patch new file mode 100644 index 0000000..0b1ceaf --- /dev/null +++ b/1001-remove-superfluous-declaration-of-program_name-to-fix-gcc10-issue.patch @@ -0,0 +1,26 @@ +From 641d3f489cf6238bb916368d4ba0d9325a235afb Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Mon, 20 Jan 2020 07:45:39 +0200 +Subject: Minor fix * src/global.c: Remove superfluous declaration of + program_name + +--- + src/global.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/global.c b/src/global.c +index fb3abe9..acf92bc 100644 +--- a/src/global.c ++++ b/src/global.c +@@ -184,9 +184,6 @@ unsigned int warn_option = 0; + /* Extract to standard output? */ + bool to_stdout_option = false; + +-/* The name this program was run with. */ +-char *program_name; +- + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ + int (*xstat) (); +-- +cgit v1.2.1 diff --git a/cpio.spec b/cpio.spec index ee1404e..ba1c411 100644 --- a/cpio.spec +++ b/cpio.spec @@ -1,7 +1,8 @@ +%define anolis_release .0.1 Summary: A GNU archiving program Name: cpio Version: 2.12 -Release: 11%{?dist} +Release: 11%{anolis_release}%{?dist} License: GPLv3+ URL: http://www.gnu.org/software/cpio/ Source: ftp://ftp.gnu.org/gnu/cpio/cpio-%{version}.tar.bz2 @@ -58,6 +59,10 @@ Patch10: cpio-2.12-improper-input-validation.patch # https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=b1c85839bf1381f749dd45bf6a5a38924e3315a0 Patch11: cpio-2.13-CVE-2021-38185.patch +# Begin: Anolis customized patches +# backport from upstream +Patch1001: 1001-remove-superfluous-declaration-of-program_name-to-fix-gcc10-issue.patch +# End: Anolis customized patches Provides: bundled(gnulib) Provides: /bin/cpio @@ -119,6 +124,9 @@ make check || { %{_infodir}/*.info* %changelog +* Thu Apr 14 2022 Weitao Zhou 2.12-11.0.1 +- Remove superfluous declaration of program_name to fix gcc10 build issue + * Mon Sep 20 2021 Ondrej Dubaj - 2.12-11 - Fixed CVE-2021-38185 (#1992511) -- Gitee