get instance correctly for eu-ar -N, use make macros and upstream patch for no stdin flag
This commit is contained in:
parent
7c6dfb6efe
commit
0cdb3635a3
34
Get-instance-correctly-for-eu-ar-N-option.patch
Normal file
34
Get-instance-correctly-for-eu-ar-N-option.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 246d6d0ffcfe9ac6ef3581ca74399036aa827590 Mon Sep 17 00:00:00 2001
|
||||
From: panxiaohe <panxh.life@foxmail.com>
|
||||
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
|
||||
|
||||
@ -1,18 +1,23 @@
|
||||
From 6ac20db56ab5e431b128a9f80d294bcf82111e29 Mon Sep 17 00:00:00 2001
|
||||
From: panxiaohe <panxh.life@foxmail.com>
|
||||
Date: Thu, 17 Feb 2022 15:39:23 +0800
|
||||
Subject: [PATCH] eu-elfclassify: --no-stdin option should use
|
||||
classify_flag_no_stdin
|
||||
From 6398e94e9ac9a170da088768198d4a2b6e989e19 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wielaard <mark@klomp.org>
|
||||
Date: Sun, 24 Apr 2022 17:48:39 +0200
|
||||
Subject: [PATCH] elfclassify: Fix --no-stdin flag
|
||||
|
||||
The no-stdin option was using the wrong flag, classify_flag_stdin,
|
||||
instead of classify_flag_no_stdin.
|
||||
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=28724
|
||||
|
||||
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
||||
---
|
||||
src/elfclassify.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/elfclassify.c b/src/elfclassify.c
|
||||
index 535cc49..712e08f 100644
|
||||
index 2f70b29a..25fe9a65 100644
|
||||
--- a/src/elfclassify.c
|
||||
+++ b/src/elfclassify.c
|
||||
@@ -948,7 +948,7 @@ separated by newlines"), 2 },
|
||||
@@ -946,7 +946,7 @@ separated by newlines"), 2 },
|
||||
{ "stdin0", classify_flag_stdin0, NULL, 0,
|
||||
N_("Also read file names to process from standard input, \
|
||||
separated by ASCII NUL bytes"), 2 },
|
||||
@ -22,5 +27,5 @@ index 535cc49..712e08f 100644
|
||||
{ "compressed", 'z', NULL, 0,
|
||||
N_("Try to open compressed files or embedded (kernel) ELF images"),
|
||||
--
|
||||
1.8.3.1
|
||||
2.27.0
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
# -*- rpm-spec from http://elfutils.org/ -*-
|
||||
Name: elfutils
|
||||
Version: 0.185
|
||||
Release: 9
|
||||
Release: 10
|
||||
Summary: A collection of utilities and DSOs to handle ELF files and DWARF data
|
||||
URL: http://elfutils.org/
|
||||
License: GPLv3+ and (GPLv2+ or LGPLv3+)
|
||||
Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2
|
||||
|
||||
Patch0: eu-elfclassify-no-stdin-should-use-classify_flag_no_stdin.patch
|
||||
Patch0: backport-elfclassify-Fix-no-stdin-flag.patch
|
||||
Patch1: Fix-segfault-in-eu-ar-m.patch
|
||||
Patch2: Fix-error-of-parsing-object-file-perms.patch
|
||||
Patch3: Fix-issue-of-moving-files-by-ar-or-br.patch
|
||||
Patch4: Get-instance-correctly-for-eu-ar-N-option.patch
|
||||
|
||||
Provides: elfutils-libelf elfutils-default-yama-scope default-yama-scope elfutils-libs
|
||||
Obsoletes: elfutils-libelf elfutils-default-yama-scope elfutils-libs
|
||||
@ -113,7 +114,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}
|
||||
@ -133,7 +134,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}
|
||||
@ -241,6 +242,11 @@ exit 0
|
||||
%systemd_postun_with_restart debuginfod.service
|
||||
|
||||
%changelog
|
||||
* Fri Aug 26 2022 panxiaohe <panxh.life@foxmail.com> - 0.185-10
|
||||
- Get instance correctly for eu-ar -N option
|
||||
- Use make macros
|
||||
- Use upstream patch for no stdin flag
|
||||
|
||||
* Wed Aug 24 2022 yixiangzhike <yixiangzhike007@163.com> - 0.185-9
|
||||
- Fix issue of moving files by ar or br
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user