[arch-commits] Commit in edk2/trunk (PKGBUILD edk2-ovmf.install edk2-shell.install)

David Runge dvzrv at archlinux.org
Tue Apr 21 15:48:03 UTC 2020


    Date: Tuesday, April 21, 2020 @ 15:48:02
  Author: dvzrv
Revision: 380685

upgpkg: edk2 202002-4: Adding symlinks for backwards compatibility with ovmf (FS#66322). Adding an install file for edk2-ovmf to explain how to change firmware locations in existing virtual machines.

Added:
  edk2/trunk/edk2-ovmf.install
  edk2/trunk/edk2-shell.install
Modified:
  edk2/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   12 ++++++++++--
 edk2-ovmf.install  |    5 +++++
 edk2-shell.install |    1 +
 3 files changed, 16 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-21 14:49:34 UTC (rev 380684)
+++ PKGBUILD	2020-04-21 15:48:02 UTC (rev 380685)
@@ -5,7 +5,7 @@
 pkgbase=edk2
 pkgname=('edk2-shell' 'edk2-ovmf')
 pkgver=202002
-pkgrel=3
+pkgrel=4
 pkgdesc="Modern, feature-rich firmware development environment for the UEFI specifications"
 arch=('any')
 url="https://github.com/tianocore/edk2"
@@ -146,6 +146,7 @@
   conflicts=('ovmf')
   replaces=('ovmf')
   license+=('MIT')
+  install="${pkgname}.install"
   cd "$pkgbase-$pkgver"
   local _arch
   # installing the various firmwares
@@ -156,12 +157,19 @@
       -t "${pkgdir}/usr/share/${pkgname}/${_arch,,}"
     install -vDm 644 "Build/Ovmf${_arch}-secure/${_build_type}_${_build_plugin}/FV/OVMF_CODE.fd" \
       "${pkgdir}/usr/share/${pkgname}/${_arch,,}/OVMF_CODE.secboot.fd"
+    # adding symlinks for previous ovmf location (only secure boot was provided as the default)
+    # https://bugs.archlinux.org/task/66322
+    install -vdm 755 "${pkgdir}/usr/share/ovmf/${_arch,,}"
+    ln -sfv "/usr/share/${pkgname}/${_arch,,}/OVMF_CODE.secboot.fd" \
+      "${pkgdir}/usr/share/ovmf/${_arch,,}/OVMF_CODE.fd"
+    ln -sfv "/usr/share/${pkgname}/${_arch,,}/OVMF_VARS.fd" \
+      "${pkgdir}/usr/share/ovmf/${_arch,,}/OVMF_VARS.fd"
   done
   # installing qemu descriptors in accordance with qemu:
   # https://git.qemu.org/?p=qemu.git;a=tree;f=pc-bios/descriptors
   # https://bugs.archlinux.org/task/64206
   install -vDm 644 ../*"${pkgname}"*.json -t "${pkgdir}/usr/share/qemu/firmware"
-  # adding a symlink for legacy applications
+  # adding a symlink for applications with questionable heuristics (such as lxd)
   ln -svf "/usr/share/${pkgname}" "${pkgdir}/usr/share/OVMF"
   # licenses
   install -vDm 644 License.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"

Added: edk2-ovmf.install
===================================================================
--- edk2-ovmf.install	                        (rev 0)
+++ edk2-ovmf.install	2020-04-21 15:48:02 UTC (rev 380685)
@@ -0,0 +1,5 @@
+post_upgrade() {
+  if [ "$(vercmp "$2" 202002-1)" -le 0 ]; then
+    echo -e "The firmware location has changed to /usr/share/edk2-ovmf/.\n Symlinks were created for backwards compatibility.\n To update the paths run 'virsh edit' on the virtual machines that use OVMF."
+  fi
+}

Added: edk2-shell.install
===================================================================
--- edk2-shell.install	                        (rev 0)
+++ edk2-shell.install	2020-04-21 15:48:02 UTC (rev 380685)
@@ -0,0 +1 @@
+# empty install file to satisfy makepkg



More information about the arch-commits mailing list