!31 arch: disambiguate $(( in arch-syscall-validate
From: @tong_1001 Reviewed-by: @lvying6 Signed-off-by: @lvying6
This commit is contained in:
commit
55f3af9f9e
45
backport-arch-disambiguate-in-arch-syscall-validate.patch
Normal file
45
backport-arch-disambiguate-in-arch-syscall-validate.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
From 94f684f858673365c8dc103affe54de698f63421 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kir Kolyshkin <kolyshkin@gmail.com>
|
||||||
|
Date: Wed, 31 Aug 2022 10:34:39 -0700
|
||||||
|
Subject: [PATCH] arch: disambiguate $(( in arch-syscall-validate
|
||||||
|
|
||||||
|
shellcheck complains:
|
||||||
|
|
||||||
|
> In arch-syscall-validate line 785:
|
||||||
|
> sc_list=$((for abi in $abi_list; do
|
||||||
|
> ^-- SC1102 (error): Shells disambiguate $((
|
||||||
|
> differently or not at all. For $(command substitution)
|
||||||
|
, add space after $( . For $((arithmetics)), fix parsing errors.
|
||||||
|
|
||||||
|
Another tool, shfmt, can't even parse the file:
|
||||||
|
|
||||||
|
> arch-syscall-validate:785:17: not a valid arithmetic operator: abi
|
||||||
|
|
||||||
|
Add a space to resolve this.
|
||||||
|
|
||||||
|
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
||||||
|
Acked-by: Paul Moore <paul@paul-moore.com>
|
||||||
|
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
|
||||||
|
---
|
||||||
|
src/arch-syscall-validate | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate
|
||||||
|
index 3b69e9b..91b6bef 100755
|
||||||
|
--- a/src/arch-syscall-validate
|
||||||
|
+++ b/src/arch-syscall-validate
|
||||||
|
@@ -728,9 +728,9 @@ function gen_csv() {
|
||||||
|
eval output_$abi=$(mktemp -t syscall_validate_XXXXXX)
|
||||||
|
dump_$2_$abi "$1" > $(eval echo $`eval echo output_$abi`)
|
||||||
|
done
|
||||||
|
- sc_list=$((for abi in $abi_list; do
|
||||||
|
+ sc_list=$( (for abi in $abi_list; do
|
||||||
|
cat $(eval echo $`eval echo output_$abi`);
|
||||||
|
- done) | awk -F "," '{ print $1 }' | sort -u)
|
||||||
|
+ done) | awk -F "," '{ print $1 }' | sort -u)
|
||||||
|
|
||||||
|
# output a simple header
|
||||||
|
printf "#syscall (v%s %s)" \
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: libseccomp
|
Name: libseccomp
|
||||||
Version: 2.5.3
|
Version: 2.5.3
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Interface to the syscall filtering mechanism
|
Summary: Interface to the syscall filtering mechanism
|
||||||
License: LGPLv2
|
License: LGPLv2
|
||||||
URL: https://github.com/seccomp/libseccomp
|
URL: https://github.com/seccomp/libseccomp
|
||||||
@ -8,6 +8,7 @@ Source0: https://github.com/seccomp/libseccomp/releases/download/v%{version}/%{n
|
|||||||
|
|
||||||
Patch0: backport-bpf-pfc-Add-handling-for-0-syscalls-in-the-binary-tr.patch
|
Patch0: backport-bpf-pfc-Add-handling-for-0-syscalls-in-the-binary-tr.patch
|
||||||
Patch1: backport-tests-Add-a-binary-tree-test-with-zero-syscalls.patch
|
Patch1: backport-tests-Add-a-binary-tree-test-with-zero-syscalls.patch
|
||||||
|
Patch2: backport-arch-disambiguate-in-arch-syscall-validate.patch
|
||||||
|
|
||||||
BuildRequires: gcc gperf autoconf automake
|
BuildRequires: gcc gperf autoconf automake
|
||||||
|
|
||||||
@ -71,6 +72,9 @@ make check
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 14 2022 shixuantong <shixuantong1@huawei.com> - 2.5.3-3
|
||||||
|
- arch: disambiguate in arch-syscall-validate
|
||||||
|
|
||||||
* Sat Aug 27 2022 zoulin <zoulin13@h-partners.com> - 2.5.3-2
|
* Sat Aug 27 2022 zoulin <zoulin13@h-partners.com> - 2.5.3-2
|
||||||
- backport patches from upstream
|
- backport patches from upstream
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user