diff --git a/Get-instance-correctly-for-eu-ar-N-option.patch b/Get-instance-correctly-for-eu-ar-N-option.patch new file mode 100644 index 0000000000000000000000000000000000000000..ad0828ff481d662e1e90a42e46b6464a19e5cbf1 --- /dev/null +++ b/Get-instance-correctly-for-eu-ar-N-option.patch @@ -0,0 +1,34 @@ +From 246d6d0ffcfe9ac6ef3581ca74399036aa827590 Mon Sep 17 00:00:00 2001 +From: panxiaohe +Date: Fri, 12 Aug 2022 17:05:40 +0800 +Subject: [PATCH] get instance correctly for eu-ar -N option + +--- + src/ar.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ar.c b/src/ar.c +index 42126aa..f8166d3 100644 +--- a/src/ar.c ++++ b/src/ar.c +@@ -518,7 +518,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, + ENTRY entry; + entry.key = arhdr->ar_name; + ENTRY *res = hsearch (entry, FIND); +- if (res != NULL && (instance < 0 || instance-- == 0) ++ if (res != NULL && (instance < 0 || --instance == 0) + && !found[(char **) res->data - argv]) + found[(char **) res->data - argv] = do_extract = true; + } +@@ -952,7 +952,7 @@ do_oper_delete (const char *arfname, char **argv, int argc, + ENTRY entry; + entry.key = arhdr->ar_name; + ENTRY *res = hsearch (entry, FIND); +- if (res != NULL && (instance < 0 || instance-- == 0) ++ if (res != NULL && (instance < 0 || --instance == 0) + && !found[(char **) res->data - argv]) + found[(char **) res->data - argv] = do_delete = true; + } +-- +2.27.0 + diff --git a/elfutils.spec b/elfutils.spec index da0c2b009b5328ef82d76af37beb423d91b18e8d..7a2db7e6eb321b335580070f02e3e20467fe20f8 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ # -*- rpm-spec from http://elfutils.org/ -*- Name: elfutils Version: 0.187 -Release: 4 +Release: 5 Summary: A collection of utilities and DSOs to handle ELF files and DWARF data URL: http://elfutils.org/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -10,6 +10,7 @@ Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 Patch0: Fix-segfault-in-eu-ar-m.patch Patch1: Fix-error-of-parsing-object-file-perms.patch Patch2: Fix-issue-of-moving-files-by-ar-or-br.patch +Patch3: Get-instance-correctly-for-eu-ar-N-option.patch Requires: elfutils-libelf = %{version}-%{release} Requires: elfutils-libs = %{version}-%{release} @@ -162,7 +163,7 @@ such servers to download those files on demand. %build %configure --program-prefix=%{_programprefix} -make -s %{?_smp_mflags} +%make_build %install rm -rf ${RPM_BUILD_ROOT} @@ -182,7 +183,7 @@ touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite %check # run-debuginfod-find.sh is a bad test -make -s %{?_smp_mflags} check || (cat tests/test-suite.log; true) +%make_build check || (cat tests/test-suite.log; true) %clean rm -rf ${RPM_BUILD_ROOT} @@ -305,6 +306,10 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Fri Aug 26 2022 panxiaohe - 0.187-5 +- Get instance correctly for eu-ar -N option +- Use make macros + * Wed Aug 24 2022 yixiangzhike - 0.187-4 - Fix issue of moving files by ar or br