From c210c24d8fac99c2b70cd33a000f5b25544d4b71 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 23 Jul 2024 07:24:47 +0200 Subject: [PATCH] fix _kKVER --- usr/lib/archboot/common.sh | 3 ++- usr/lib/archboot/release.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/lib/archboot/common.sh b/usr/lib/archboot/common.sh index 35449ee7f..72f5318b1 100644 --- a/usr/lib/archboot/common.sh +++ b/usr/lib/archboot/common.sh @@ -167,7 +167,8 @@ _kver() { # x86_64: rg -Noazm 1 'ABCDEF\x00+(.*) \(.*@' -r '$1' ${1} # aarch64 compressed and uncompressed: # rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' ${1} - # riscv64: zcat ${1} | rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' + # riscv64, rg cannot handle compression without extension: + # zcat ${1} | rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' if [[ -f "${1}" ]]; then rg -Noazm 1 'ABCDEF\x00+(.*) \(.*@' -r '$1' "${1}" ||\ rg -Noazm 1 'Linux version (.*) \(.*@' -r '$1' "${1}" ||\ diff --git a/usr/lib/archboot/release.sh b/usr/lib/archboot/release.sh index cd259dcdd..efffb8b6d 100644 --- a/usr/lib/archboot/release.sh +++ b/usr/lib/archboot/release.sh @@ -39,7 +39,7 @@ _create_iso() { _create_archboot_db "${_W_DIR}${_CACHEDIR}" #shellcheck disable=SC1090 . "${_W_DIR}/etc/archboot/${_ARCH}.conf" - _KVER="$(_kver $(echo ${_W_DIR}/${_KERNEL}))" + _KVER="$(_kver $(echo ${_W_DIR}${_KERNEL}))" #shellcheck disable=SC2116,SC2046,SC2027,2086 _ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-${_KVER}" if ! [[ "${_RUNNING_ARCH}" == "${_ARCH}" ]]; then