quickemu 3.11 -> 3.14

This commit is contained in:
fedx-sudo 2022-03-18 06:57:28 -06:00
parent b314818898
commit 502592f3d5
3 changed files with 16 additions and 21 deletions

View file

@ -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
];

View file

@ -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

View file

@ -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
;;
*)