From cc3afd8669513c1040aa5d7d47194f2a719f1639 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Tue, 12 Nov 2019 01:32:36 +0300 Subject: [PATCH] Fix parsing hexdump output hexdump output on i586 contained odd symbol '|' in the line where the word 'Modules' began, it broke previously used awk command. --- kernel.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index c9c40c1..27bd57c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1030,7 +1030,7 @@ mkdir -p "%{certs_dir_rnd}" echo 0 > %{certs_verify_tmp} _verify_signature(){ if [ -z "$1" ] || [ ! -f "$1" ]; then return; fi - if hexdump -C "$1" | awk -F '|' '{print $2}' | tr -d '\n' | \ + if hexdump -C "$1" | rev | cut -f 2 -d '|' | rev | tr -d '\n' | \ grep -q '~Module signature appended~' then echo $(($(cat %{certs_verify_tmp})+1)) > %{certs_verify_tmp}