From 263d1e6b2ef084e38f559d5daea247b22345f500 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 7 Sep 2024 13:56:31 +0200 Subject: [PATCH] move ukify to function --- usr/lib/archboot/common.sh | 6 ++++++ usr/lib/archboot/release.sh | 4 +--- usr/lib/archboot/uki.sh | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr/lib/archboot/common.sh b/usr/lib/archboot/common.sh index dabda043c..10becb87f 100644 --- a/usr/lib/archboot/common.sh +++ b/usr/lib/archboot/common.sh @@ -373,6 +373,12 @@ _create_cpio() { echo "Build complete." } +_run_ukify() { + /usr/lib/systemd/ukify build --linux="${_KERNEL}" \ + ${_INTEL_UCODE} ${_AMD_UCODE} --initrd="${initrd}" --cmdline="${_CMDLINE}" \ + --os-release=@"${_OSREL}" --splash="${_SPLASH}" --output="${_UKI}" &>"${_NO_LOG}" +} + _reproducibility() { # Reproducibility: set all timestamps to 0 fd . "${1}" -u --min-depth 1 -X touch -hcd "@0" diff --git a/usr/lib/archboot/release.sh b/usr/lib/archboot/release.sh index 61e368ae1..95167d3e0 100644 --- a/usr/lib/archboot/release.sh +++ b/usr/lib/archboot/release.sh @@ -130,9 +130,7 @@ _create_iso() { [[ "${initrd}" == "${_INITRD_LATEST}" ]] && _UKI="boot/${_NAME}-latest-${_ARCH}.efi" [[ "${initrd}" == "${_INITRD_LOCAL}" ]] && _UKI="boot/${_NAME}-local-${_ARCH}.efi" #shellcheck disable=SC2086 - ${_NSPAWN} "${_W_DIR}" /usr/lib/systemd/ukify build --linux="${_KERNEL}" \ - ${_INTEL_UCODE} ${_AMD_UCODE} --initrd="${initrd}" --cmdline="${_CMDLINE}" \ - --os-release=@"${_OSREL}" --splash="${_SPLASH}" --output="${_UKI}" &>"${_NO_LOG}" || exit 1 + ${_NSPAWN} "${_W_DIR}" _run_ukify done # fix permission and timestamp mv "${_W_DIR}"/boot ./ diff --git a/usr/lib/archboot/uki.sh b/usr/lib/archboot/uki.sh index eae70fa10..2768814dd 100644 --- a/usr/lib/archboot/uki.sh +++ b/usr/lib/archboot/uki.sh @@ -62,9 +62,7 @@ _systemd_ukify() { [[ -n "/${_INTEL_UCODE}" ]] && _INTEL_UCODE="--initrd=/${_INTEL_UCODE}" _AMD_UCODE="--initrd=/${_AMD_UCODE}" #shellcheck disable=SC2086 - /usr/lib/systemd/ukify build --linux="${_KERNEL}" \ - ${_INTEL_UCODE} ${_AMD_UCODE} --initrd="${_INITRD}" --cmdline="${_CMDLINE}" \ - --os-release=@"${_OSREL}" --splash="${_SPLASH}" --output="${_UKI}" &>"${_NO_LOG}" || exit 1 + _run_ukify || exit 1 } _create_cksum() {