From 502592f3d59b986561ab5fdfa62f09114cfe57b2 Mon Sep 17 00:00:00 2001 From: fedx-sudo Date: Fri, 18 Mar 2022 06:57:28 -0600 Subject: [PATCH] quickemu 3.11 -> 3.14 --- pkgs/development/quickemu/default.nix | 5 ++--- .../quickemu/efi_vars_ensure_writable.patch | 13 ------------- .../quickemu/input_overrides.patch | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 pkgs/development/quickemu/efi_vars_ensure_writable.patch diff --git a/pkgs/development/quickemu/default.nix b/pkgs/development/quickemu/default.nix index aa9906c77ecd..7aa5b1602c38 100644 --- a/pkgs/development/quickemu/default.nix +++ b/pkgs/development/quickemu/default.nix @@ -43,17 +43,16 @@ in stdenv.mkDerivation rec { pname = "quickemu"; - version = "3.11"; + version = "3.14"; src = fetchFromGitHub { owner = "quickemu-project"; repo = "quickemu"; rev = version; - sha256 = "1xwf9vwbr57wmyxfcqzl1jnmfx3ffh7sfqf0zcdq41wqkm8s106n"; + sha256="sha256-7zaXazGzb36Nwk/meJ3lGD+l+fylWZYnhttDL1CXN9s="; }; patches = [ - ./efi_vars_ensure_writable.patch ./input_overrides.patch ]; diff --git a/pkgs/development/quickemu/efi_vars_ensure_writable.patch b/pkgs/development/quickemu/efi_vars_ensure_writable.patch deleted file mode 100644 index e146d0ba7682..000000000000 --- a/pkgs/development/quickemu/efi_vars_ensure_writable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/quickemu b/quickemu -index a9a60a5..1a932ac 100755 ---- a/quickemu -+++ b/quickemu -@@ -197,7 +197,7 @@ function efi_vars() { - - if [ ! -e "${VARS_OUT}" ]; then - if [ -e "${VARS_IN}" ]; then -- cp "${VARS_IN}" "${VARS_OUT}" -+ cp "${VARS_IN}" "${VARS_OUT}" && chmod +w "${VARS_OUT}" - else - echo "ERROR! ${VARS_IN} was not found. Please install edk2." - exit 1 diff --git a/pkgs/development/quickemu/input_overrides.patch b/pkgs/development/quickemu/input_overrides.patch index 228624edcf1b..42e4d2e18294 100644 --- a/pkgs/development/quickemu/input_overrides.patch +++ b/pkgs/development/quickemu/input_overrides.patch @@ -1,20 +1,29 @@ diff --git a/quickemu b/quickemu -index 1a932ac..ab2f752 100755 +index 24e1007..39cd5e4 100755 --- a/quickemu +++ b/quickemu +@@ -196,7 +196,7 @@ function efi_vars() { + + if [ ! -e "${VARS_OUT}" ]; then + if [ -e "${VARS_IN}" ]; then +- cp "${VARS_IN}" "${VARS_OUT}" ++ cp "${VARS_IN}" "${VARS_OUT}" && chmod +w "${VARS_OUT}" + else + echo "ERROR! ${VARS_IN} was not found. Please install edk2." + exit 1 @@ -383,7 +383,10 @@ function vm_boot() { # https://bugzilla.redhat.com/show_bug.cgi?id=1929357#c5 case ${secureboot} in on) -- if [ -e "/usr/share/OVMF/OVMF_CODE_4M.secboot.fd" ]; then +- if [ -e "/usr/share/OVMF/OVMF_CODE_4M.secboot.fd" ]; then + if [[ ${ENV_EFI_CODE_SECURE} && ${ENV_EFI_CODE_SECURE-x} ]] && [[ ${ENV_EFI_VARS_SECURE} && ${ENV_EFI_VARS_SECURE-x} ]]; then -+ EFI_CODE="${ENV_EFI_CODE_SECURE}" -+ efi_vars "${ENV_EFI_VARS_SECURE}" "${EFI_VARS}" ++ EFI_CODE="${ENV_EFI_CODE_SECURE}" ++ efi_vars "${ENV_EFI_VARS_SECURE}" "${EFI_VARS}" + elif [ -e "/usr/share/OVMF/OVMF_CODE_4M.secboot.fd" ]; then EFI_CODE="/usr/share/OVMF/OVMF_CODE_4M.secboot.fd" efi_vars "/usr/share/OVMF/OVMF_VARS_4M.fd" "${EFI_VARS}" elif [ -e "/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd" ]; then -@@ -402,7 +405,10 @@ function vm_boot() { +@@ -408,7 +411,10 @@ function vm_boot() { fi ;; *)