summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Mulvey2020-08-10 21:25:43 -0700
committerSam Mulvey2020-08-10 21:25:43 -0700
commitc4863046c32988848dd230853ef5d1dc3d3d719b (patch)
treebf9e279b8ae6491cc0f87f260da87820835ed545
parent2a2c0d9e15eb2f837622d133a917743c7266bdc0 (diff)
downloadaur-c4863046c32988848dd230853ef5d1dc3d3d719b.tar.gz
4.14.0-1
-rw-r--r--.SRCINFO29
-rw-r--r--ChangeLog4
-rw-r--r--PKGBUILD97
-rw-r--r--grub-mkconfig-helper230
-rw-r--r--grub.conf3
-rw-r--r--xen_4.14.0_fixes.patch34
-rw-r--r--xen_gcc10_1_omnibus.patch115
7 files changed, 98 insertions, 414 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4ac2805cd224..3a5dadbbcbe3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = xen
pkgdesc = Open-source type-1 or baremetal hypervisor
- pkgver = 4.13.1
- pkgrel = 4
+ pkgver = 4.14.0
+ pkgrel = 1
url = https://xenproject.org/
arch = x86_64
license = GPL2
@@ -36,7 +36,7 @@ pkgbase = xen
makedepends = flex
makedepends = pixman
makedepends = ocaml
- noextract = ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz
+ makedepends = fig2dev
noextract = gmp-4.3.2.tar.bz2
noextract = grub-0.97.tar.gz
noextract = lwip-1.3.0.tar.gz
@@ -46,15 +46,10 @@ pkgbase = xen
noextract = tpm_emulator-0.7.4.tar.gz
noextract = zlib-1.2.3.tar.gz
options = !buildflags
- source = https://downloads.xenproject.org/release/xen/4.13.1/xen-4.13.1.tar.gz
- source = https://downloads.xenproject.org/release/xen/4.13.1/xen-4.13.1.tar.gz.sig
- source = http://xenbits.xen.org/xen-extfiles/ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz
- source = https://src.fedoraproject.org/rpms/xen/raw/master/f/xen.gcc10.fixes.patch
- source = https://src.fedoraproject.org/rpms/xen/raw/master/f/xen.ocaml.4.10.patch
- source = xen_gcc10_1_omnibus.patch
- source = grub-mkconfig-helper
+ source = https://downloads.xenproject.org/release/xen/4.14.0/xen-4.14.0.tar.gz
+ source = https://downloads.xenproject.org/release/xen/4.14.0/xen-4.14.0.tar.gz.sig
+ source = xen_4.14.0_fixes.patch
source = efi-xen.cfg
- source = grub.conf
source = xen.conf
source = tmpfiles.conf
source = xen-ucode-extract.sh
@@ -69,15 +64,10 @@ pkgbase = xen
source = http://xenbits.xen.org/xen-extfiles/tpm_emulator-0.7.4.tar.gz
source = http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz
validpgpkeys = 23E3222C145F4475FA8060A783FE14C957E82BD9
- sha512sums = b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
+ sha512sums = ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0
sha512sums = SKIP
- sha512sums = 8120696ba6d79fd9189664deed9b0489825d8d1edf7b931023b3979b7b9f82248e5b808c4517036cd40a85442ddf51a8dcad3b05d7f3c3cc6650654d53da4050
- sha512sums = a93b8f33a38af4434fb1fa0e1e24d6374105f7c6088fc011eccdd5d5576ad78152bf27b675ef37471bd6b45468f75499c08e0bb937ee880557acba3edec98a07
- sha512sums = abacb29fde9b583648651a076cc8697538dea51d7fcc8c2160e951548e7022a0c83c89ddac3d1b3e46e05cb265e8fe14c0d9248d055e914909232180b42b194f
- sha512sums = eac4aaaaee05b8c0de88a78ba45329c4344b42c8d34651a6f7e99a7c7f16bfb9933a26fffbc5fb5d22e8561d07dfc13fe591aacb5f9a1d49aa725b253aad03ec
- sha512sums = 1e95d8767bb0d4df6d95ac1f29e7fa7a74b4483f8bb46efcf95e08ddc9481d17c8e315f095e8d5ebf6e319811099e083566acc45aa3803aa4de4e8d17af04180
+ sha512sums = 95b489d8ce2ba85ba48a50d8b5e087c9f3955a2750a16206502e3fdaa2bbbcb2a316586c78ae02937659cb862ddb10479bd0139a77b7dd4235bf07bb7982ee14
sha512sums = 1bbcbcd9fb8344a207409ec9f0064a45b726416f043f902ca587f5e4fa58497a759be4ffd584fa32318e960aa478864cc05ec026c444e8d27ca8e3248bd67420
- sha512sums = 72b58aa4e2d0ba1242d789000f9a9df0969461b5eca119f92a9d5980e4340b6b2f502aac42b62bb85c9f580067e6120b79e6a30f961e7aa88394738a3ba2cc4c
sha512sums = ccaa2ff82e4203b11e5dec9aeccac2e165721d8067e0094603ecaa7a70b78c9eb9e2287a32687883d26b6ceae6f8d2ad7636ddf949eb658637b3ceaa6999711b
sha512sums = 53ba61587cc2e84044e935531ed161e22c36d9e90b43cab7b8e63bcc531deeefacca301b5dff39ce89210f06f1d1e4f4f5cf49d658ed5d9038c707e3c95c66ef
sha512sums = a9230ec6ef9636ac3f3e4b72b1747ee8c4648a8bf4bd8dc3650365e34f1f67474429dbdd24996907d277b0ff5f235574643e781cb3ff37da954e899ddadbe0d6
@@ -118,11 +108,12 @@ pkgname = xen
optdepends = ed2k-ovmf: UEFI support
optdepends = seabios: SeaBIOS payload support
optdepends = xen-docs: HTML documentation and man pages
+ optdepends = grub-xen-git: GRUB and pvgrub2 bootloader support
+ optdepends = qemu: HVM and PV support
backup = etc/conf.d/xencommons
backup = etc/conf.d/xendomains
backup = etc/xen/efi-xen.cfg
backup = etc/xen/cpupool
- backup = etc/xen/grub.conf
backup = etc/xen/xl.conf
pkgname = xen-docs
diff --git a/ChangeLog b/ChangeLog
index ff03b676d939..90c3ab395b21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-08-10 Sam Mulvey
+ * 4.14.0-1
+ * option to build own QEMU is added, and default
+
2020-08-20 Sam Mulvey
* 4.13.1-4
diff --git a/PKGBUILD b/PKGBUILD
index caffe987b8eb..6933ba23a009 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,11 +3,11 @@
# Build Options
_build_stubdom=${build_stubdom:-true}
+_build_qemu=${build_qemu:-true}
# Check http://xenbits.xen.org/xen-extfiles/ for updates
_gmp=4.3.2
_grub=0.97
-_ipxe=1dd56dbd11082fb622c2ed21cfaced4f47d798a6
_lwip=1.3.0
_newlib=1.16.0
_pciutils=2.2.9
@@ -17,27 +17,24 @@ _zlib=1.2.3
pkgbase=xen
pkgname=("xen" "xen-docs")
-pkgver=4.13.1
-pkgrel=4
+pkgver=4.14.0
+pkgrel=1
pkgdesc='Open-source type-1 or baremetal hypervisor'
arch=('x86_64')
url='https://xenproject.org/'
license=('GPL2')
+options=(!buildflags)
+# Original depends line
makedepends=('zlib' 'python' 'ncurses' 'openssl' 'libx11' 'libuuid.so' 'yajl' 'libaio' 'glib2' 'pkgconf'
'bridge-utils' 'iproute2' 'inetutils' 'acpica' 'lib32-glibc' 'gnutls'
'vde2' 'lzo' 'pciutils' 'sdl') # last line from namcap, these depends are the xen depends
-makedepends+=('wget' 'pandoc' 'valgrind' 'git' 'bin86' 'dev86' 'bison' 'gettext' 'flex' 'pixman' 'ocaml')
+# Actual makedepends.
+makedepends+=('wget' 'pandoc' 'valgrind' 'git' 'bin86' 'dev86' 'bison' 'gettext' 'flex' 'pixman' 'ocaml' 'fig2dev')
-options=(!buildflags)
-_source=("https://downloads.xenproject.org/release/xen/$pkgver/$pkgname-$pkgver.tar.gz"{,.sig}
- "http://xenbits.xen.org/xen-extfiles/ipxe-git-$_ipxe.tar.gz"
- "https://src.fedoraproject.org/rpms/xen/raw/master/f/xen.gcc10.fixes.patch"
- "https://src.fedoraproject.org/rpms/xen/raw/master/f/xen.ocaml.4.10.patch"
- "xen_gcc10_1_omnibus.patch"
- "grub-mkconfig-helper"
+source=("https://downloads.xenproject.org/release/xen/$pkgver/$pkgname-$pkgver.tar.gz"{,.sig}
+ "xen_4.14.0_fixes.patch"
"efi-xen.cfg"
- "grub.conf"
"xen.conf"
"tmpfiles.conf"
"xen-ucode-extract.sh"
@@ -53,37 +50,17 @@ _stubdom_source=("http://xenbits.xen.org/xen-extfiles/gmp-$_gmp.tar.bz2"
"http://xenbits.xen.org/xen-extfiles/tpm_emulator-$_tpm_emulator.tar.gz"
"http://xenbits.xen.org/xen-extfiles/zlib-$_zlib.tar.gz")
-noextract=("ipxe-git-$_ipxe.tar.gz")
-
-
-if [ "${_build_stubdom}" == "true" ]; then
- source=("${_source[@]}" "${_stubdom_source[@]}")
-
- for file in "${_stubdom_source[@]}"; do
- noextract+=( $(basename ${file}) )
- done
-
- _config_stubdom='--enable-stubdom'
-else
- _config_stubdom='--disable-stubdom'
-fi
-
-
-sha512sums=('b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90'
+sha512sums=('ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0'
'SKIP'
- '8120696ba6d79fd9189664deed9b0489825d8d1edf7b931023b3979b7b9f82248e5b808c4517036cd40a85442ddf51a8dcad3b05d7f3c3cc6650654d53da4050'
- 'a93b8f33a38af4434fb1fa0e1e24d6374105f7c6088fc011eccdd5d5576ad78152bf27b675ef37471bd6b45468f75499c08e0bb937ee880557acba3edec98a07'
- 'abacb29fde9b583648651a076cc8697538dea51d7fcc8c2160e951548e7022a0c83c89ddac3d1b3e46e05cb265e8fe14c0d9248d055e914909232180b42b194f'
- 'eac4aaaaee05b8c0de88a78ba45329c4344b42c8d34651a6f7e99a7c7f16bfb9933a26fffbc5fb5d22e8561d07dfc13fe591aacb5f9a1d49aa725b253aad03ec'
- '1e95d8767bb0d4df6d95ac1f29e7fa7a74b4483f8bb46efcf95e08ddc9481d17c8e315f095e8d5ebf6e319811099e083566acc45aa3803aa4de4e8d17af04180'
+ '95b489d8ce2ba85ba48a50d8b5e087c9f3955a2750a16206502e3fdaa2bbbcb2a316586c78ae02937659cb862ddb10479bd0139a77b7dd4235bf07bb7982ee14'
'1bbcbcd9fb8344a207409ec9f0064a45b726416f043f902ca587f5e4fa58497a759be4ffd584fa32318e960aa478864cc05ec026c444e8d27ca8e3248bd67420'
- '72b58aa4e2d0ba1242d789000f9a9df0969461b5eca119f92a9d5980e4340b6b2f502aac42b62bb85c9f580067e6120b79e6a30f961e7aa88394738a3ba2cc4c'
'ccaa2ff82e4203b11e5dec9aeccac2e165721d8067e0094603ecaa7a70b78c9eb9e2287a32687883d26b6ceae6f8d2ad7636ddf949eb658637b3ceaa6999711b'
'53ba61587cc2e84044e935531ed161e22c36d9e90b43cab7b8e63bcc531deeefacca301b5dff39ce89210f06f1d1e4f4f5cf49d658ed5d9038c707e3c95c66ef'
'a9230ec6ef9636ac3f3e4b72b1747ee8c4648a8bf4bd8dc3650365e34f1f67474429dbdd24996907d277b0ff5f235574643e781cb3ff37da954e899ddadbe0d6'
'7a832de9b35f4b77ee80d33310b23886f4d48d1d42c3d6ef6f8e2b428bec7332a285336864b61cfa01d9a14c2023674015beb7527bd5849b069f2be88e6500cd'
- '99921b94a29fa7988c7fb5c17da8e598e777c972d6cae8c8643c991e5ff911a25525345ea8913945313d5c49fecf9da8cc3b83d47ab03928341e917b304370a9'
- '2e0b0fd23e6f10742a5517981e5171c6e88b0a93c83da701b296f5c0861d72c19782daab589a7eac3f9032152a0fc7eff7f5362db8fccc4859564a9aa82329cf'
+ '99921b94a29fa7988c7fb5c17da8e598e777c972d6cae8c8643c991e5ff911a25525345ea8913945313d5c49fecf9da8cc3b83d47ab03928341e917b304370a9')
+
+_stub_sums=('2e0b0fd23e6f10742a5517981e5171c6e88b0a93c83da701b296f5c0861d72c19782daab589a7eac3f9032152a0fc7eff7f5362db8fccc4859564a9aa82329cf'
'c2bc9ffc8583aeae71cee9ddcc4418969768d4e3764d47307da54f93981c0109fb07d84b061b3a3628bd00ba4d14a54742bc04848110eb3ae8ca25dbfbaabadb'
'1465b58279af1647f909450e394fe002ca165f0ff4a0254bfa9fe0e64316f50facdde2729d79a4e632565b4500cf4d6c74192ac0dd3bc9fe09129bbd67ba089d'
'40eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3'
@@ -92,6 +69,25 @@ sha512sums=('b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe145
'4928b5b82f57645be9408362706ff2c4d9baa635b21b0d41b1c82930e8c60a759b1ea4fa74d7e6c7cae1b7692d006aa5cb72df0c3b88bf049779aa2b566f9d35'
'021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e')
+if [ "${_build_stubdom}" == "true" ]; then
+ source=("${source[@]}" "${_stubdom_source[@]}")
+ sha512sums=("${sha512sums[@]}" "${_stub_sums[@]}")
+
+ for file in "${_stubdom_source[@]}"; do
+ noextract+=( $(basename ${file}) )
+ done
+
+ _config_stubdom='--enable-stubdom'
+else
+ _config_stubdom='--disable-stubdom'
+fi
+
+if [ "${_build_qemu}" == "true" ]; then
+ _config_qemu=""
+else
+ _config_qemu="--with-system-qemu=/usr/bin/qemu-system-x86_64"
+fi
+
validpgpkeys=('23E3222C145F4475FA8060A783FE14C957E82BD9') # Xen.org Xen tree code signing (signatures on the xen hypervisor and tools) <pgp@xen.org>
@@ -101,9 +97,8 @@ validpgpkeys=('23E3222C145F4475FA8060A783FE14C957E82BD9') # Xen.org Xen tree cod
prepare() {
cd "${pkgbase}-${pkgver}"
- patch -p1 < ../xen.gcc10.fixes.patch
- patch -p1 < ../xen.ocaml.4.10.patch
- patch -p1 < ../xen_gcc10_1_omnibus.patch
+ # mostly from: https://github.com/olafhering/xen/commit/1a1d86fef44444e8e265fd8bc687f8238a0d1615
+ patch -p1 < ../xen_4.14.0_fixes.patch
if [ "${_build_stubdom}" == "true" ]; then
@@ -113,8 +108,6 @@ prepare() {
fi
- cp ../ipxe-git-$_ipxe.tar.gz tools/firmware/etherboot/ipxe.tar.gz
-
# Fix Install Paths.
sed 's,/var/run,/run,g' -i tools/hotplug/Linux/locking.sh
sed 's,/var/run,/run,g' -i tools/misc/xenpvnetboot
@@ -126,6 +119,14 @@ prepare() {
build() {
cd "${pkgbase}-${pkgver}"
+ if [ "${_build_stubdom}" == "true" ]; then
+ echo "NOTE: Xen build with stubdom support."
+ fi
+
+ if [ "${_build_qemu}" == "true" ]; then
+ echo "NOTE: Xen build with integrated QEMU."
+ fi
+
./configure \
--prefix=/usr \
@@ -135,9 +136,9 @@ build() {
--enable-systemd \
--disable-qemu-traditional \
${_config_stubdom} \
+ ${_config_qemu} \
--with-sysconfig-leaf-dir=conf.d \
--with-system-ovmf=/usr/share/ovmf/x64/OVMF.fd \
- --with-system-qemu=/usr/bin/qemu-system-x86_64 \
--with-system-seabios=/usr/share/qemu/bios-256k.bin
make XEN_VENDORVERSION=arch
@@ -152,7 +153,12 @@ package_xen() {
optdepends=('ed2k-ovmf: UEFI support'
'seabios: SeaBIOS payload support'
- 'xen-docs: HTML documentation and man pages')
+ 'xen-docs: HTML documentation and man pages'
+ 'grub-xen-git: GRUB and pvgrub2 bootloader support')
+
+ if [ "${_build_qemu}" == "false" ]; then
+ optdepends+=("qemu: HVM and PV support")
+ fi
install="xen.install"
@@ -161,7 +167,6 @@ package_xen() {
"etc/conf.d/xendomains"
"etc/xen/efi-xen.cfg"
"etc/xen/cpupool"
- "etc/xen/grub.conf"
"etc/xen/xl.conf"
)
@@ -199,8 +204,6 @@ package_xen() {
rm -r "${pkgdir}/etc/init.d"
# Install files for Arch Linux.
- install -D -m 0644 "${srcdir}/grub.conf" "${pkgdir}/etc/xen/grub.conf"
- install -D -m 0755 "${srcdir}/grub-mkconfig-helper" "${pkgdir}/etc/grub.d/09_xen"
install -D -m 0644 "${srcdir}/efi-xen.cfg" "${pkgdir}/etc/xen/efi-xen.cfg"
install -D -m 0644 "${srcdir}/xen.conf" "${pkgdir}/usr/lib/modules-load.d/xen.conf"
install -D -m 0644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/${pkgbase}.conf"
diff --git a/grub-mkconfig-helper b/grub-mkconfig-helper
deleted file mode 100644
index 7478cb85ffeb..000000000000
--- a/grub-mkconfig-helper
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/usr/bin/env bash
-
-##
-## grub-mkconfig helper script specific to Arch Linux
-## Contributed by "Keshav Amburay" <the ddoott ridikulus ddoott rat aatt geemmayil ddoott ccoomm>
-## Updated on 08 February 2014
-##
-## Script based on do_grub_config() function in Arch Linux Archboot ISO Installer/Setup script
-## Some parts taken from /etc/grub.d/10_linux script shipped by GRUB(2) upstream
-##
-## This script can be freely distributed and/or modified
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## This script is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-
-## Adapted for use with the xen AUR package, to ensure feature comparity
-## Modified by "David Sutton" <kantras - gmail com>
-
-_FUNC_GRUB_FILE_PRESENT() {
-
- [[ -z "${GRUB_PLATFORM}" ]] && GRUB_PLATFORM="x86"
-
- if [[ "${GRUB_PLATFORM}" == "x86" ]]; then
- check="--is-x86-linux32"
- elif [[ "${GRUB_PLATFORM}" == "i386-xen-pae" ]]; then
- check="--is-i386-xen-pae-domu"
- elif [[ "${GRUB_PLATFORM}" == "x86_64-xen" ]]; then
- check="--is-x86_64-xen-domu"
- else
- check="--is-${GRUB_PLATFORM}-linux"
- fi
-
- case "${GRUB_PLATFORM}" in
- x86)
- list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do
- if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi
- done)" ;;
- *)
- list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do
- if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi
- done)" ;;
- esac
-}
-
-set -e
-
-prefix="/usr"
-exec_prefix="${prefix}"
-datarootdir="/usr/share"
-datadir="${datarootdir}"
-sysconfdir="/etc"
-
-. "${datarootdir}/grub/grub-mkconfig_lib"
-
-. "${sysconfdir}/default/grub"
-
-export XEN_HYPERVISOR_CMDLINE="xsave=1"
-export XEN_LINUX_CMDLINE="console=tty0"
-
-[[ -r "${sysconfdir}/xen/grub.conf" ]] && . "${sysconfdir}/xen/grub.conf"
-
-[[ -z "${XEN_LINUX_CMDLINE_OVERRIDE}" ]] && XEN_LINUX_CMDLINE_OVERRIDE="0"
-
-export TEXTDOMAIN="grub"
-export TEXTDOMAINDIR="${datarootdir}/locale"
-
-CLASS="--class xen --class arch-linux --class arch --class gnu-linux --class gnu --class os"
-
-[[ "${grub_file}" != "" ]] && _FUNC_GRUB_FILE_PRESENT
-
-BOOT_PART_FS_UUID="$(${grub_probe} --target="fs_uuid" "/boot" 2>/dev/null)"
-BOOT_PART_HINTS_STRING="$(${grub_probe} --target="hints_string" "/boot" 2>/dev/null || true)"
-BOOT_PART_FS="$(${grub_probe} --target="fs" "/boot" 2>/dev/null)"
-
-ROOT_PART_GRUB_DEVICE="$(${grub_probe} --target=device / || true)"
-ROOT_PART_FS="$(${grub_probe} --device ${ROOT_PART_GRUB_DEVICE} --target=fs 2> /dev/null || echo "unknown")"
-
-if [[ "${GRUB_LINUX_ROOT_DEVICE}" == "" ]]; then
-
- case "${ROOT_PART_FS}" in
- btrfs)
- rootsubvol="$(make_system_path_relative_to_its_root /)"
- rootsubvol="${rootsubvol#/}"
- if [[ "${rootsubvol}" != "" ]]; then
- GRUB_LINUX_ROOT_DEVICE="subvol=${rootsubvol}"
- fi
- ;;
- zfs)
- rpool="$(${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true)"
- bootfs="$(make_system_path_relative_to_its_root / | sed -e "s,@$,,")"
- GRUB_LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs}"
- ;;
- esac
-
- if [[ "${GRUB_DEVICE_UUID}" == "" ]] || \
- [[ "${GRUB_DISABLE_LINUX_UUID}" == "true" ]] || \
- [[ ! -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ]] || \
- uses_abstraction "${GRUB_DEVICE}" lvm ; then
- GRUB_LINUX_ROOT_DEVICE="${GRUB_DEVICE}"
- else
- GRUB_LINUX_ROOT_DEVICE="UUID=${GRUB_DEVICE_UUID}"
- fi
-fi
-
-[[ "${GRUB_LINUX_PARAMS}" == "" ]] && GRUB_LINUX_PARAMS="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-if [[ "${XEN_LINUX_CMDLINE_OVERRIDE}" == "0" ]]; then
- GRUB_LINUX_PARAMS="${GRUB_LINUX_PARAMS} ${XEN_LINUX_CMDLINE}"
-else
- GRUB_LINUX_PARAMS="${XEN_LINUX_CMDLINE}"
-fi
-
-xen_list=`for i in /boot/xen.gz /boot/xen-*.gz /xen-*.gz ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i "; fi
-done`
-
-while [ "x$xen_list" != "x" ] ; do
- xen=`version_find_latest $xen_list`
- echo "Found Xen hypervisor image: $xen" >&2
- XEN_BASENAME=`basename $xen`
- XEN_VERSION=`echo $XEN_BASENAME | sed -e "s,^[^0-9]*-,,g" | sed -e "s,.gz,,g"`
-
- for _KERNEL_ in ${list} ; do
-
- echo "Found linux image: ${_KERNEL_}" >&2
-
- basename="$(basename "${_KERNEL_}")"
- dirname="$(dirname "${_KERNEL_}")"
- REAL_DIR="$(make_system_path_relative_to_its_root "${dirname}")"
-
- _KERNEL_FILE_="$(echo ${_KERNEL_} | sed 's,/boot/,,g')"
- _KERNEL_PKG_="pkg-$(echo ${_KERNEL_FILE_} | sed 's,vmlinuz-,,g')"
-
- _INITRAMFS_="${_KERNEL_FILE_/vmlinuz-/initramfs-}.img"
-
- if [[ -e "/boot/${_INITRAMFS_}" ]]; then
-
- echo "Found initramfs image: /boot/${_INITRAMFS_}" >&2
-
- cat << EOF
-
-menuentry "Xen ${XEN_VERSION} / Arch Linux ${_KERNEL_PKG_} kernel" ${CLASS} {
- $(save_default_entry)
- if [ x\$feature_all_video_module = xy ]; then
- insmod all_video
- fi
- set gfxpayload=keep
- insmod ${BOOT_PART_FS}
- if [ x\$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
- else
- search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID}
- fi
- echo '$(printf "Loading Xen %s ..." ${XEN_VERSION})'
- multiboot2 ${REAL_DIR}/${XEN_BASENAME} ${XEN_HYPERVISOR_CMDLINE}
- echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...'
- module2 ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
- echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel initramfs ...'
- module2 ${REAL_DIR}/${_INITRAMFS_}
-}
-
-EOF
- fi
-
- _INITRAMFS_FALLBACK_="${_KERNEL_FILE_/vmlinuz-/initramfs-}-fallback.img"
-
- if [[ -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then
-
- echo "Found fallback initramfs image: /boot/${_INITRAMFS_FALLBACK_}" >&2
-
- cat << EOF
-
-menuentry "Xen ${XEN_VERSION} / Arch Linux ${_KERNEL_PKG_} kernel (fallback initramfs)" ${CLASS} {
- $(save_default_entry)
- if [ x\$feature_all_video_module = xy ]; then
- insmod all_video
- fi
- set gfxpayload=keep
- insmod ${BOOT_PART_FS}
- if [ x\$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
- else
- search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID}
- fi
- echo '$(printf "Loading Xen %s ..." ${XEN_VERSION})'
- multiboot2 ${REAL_DIR}/${XEN_BASENAME} ${XEN_HYPERVISOR_CMDLINE}
- echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...'
- module2 ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
- echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel fallback initramfs ...'
- module2 ${REAL_DIR}/${_INITRAMFS_FALLBACK_}
-}
-
-EOF
- fi
-
- if [[ ! -e "/boot/${_INITRAMFS_}" ]] && [[ ! -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then
- cat << EOF
-
-menuentry "Xen ${XEN_VERSION} / Arch Linux ${_KERNEL_PKG_} kernel (no initramfs)" ${CLASS} {
- $(save_default_entry)
- if [ x\$feature_all_video_module = xy ]; then
- insmod all_video
- fi
- set gfxpayload=keep
- insmod ${BOOT_PART_FS}
- if [ x\$feature_platform_search_hint = xy ]; then
- search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
- else
- search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID}
- fi
- echo '$(printf "Loading Xen %s ..." ${XEN_VERSION})'
- multiboot2 ${REAL_DIR}/${XEN_BASENAME} ${XEN_HYPERVISOR_CMDLINE}
- echo 'Loading Arch Linux ${_KERNEL_PKG_} kernel ...'
- module2 ${REAL_DIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
-}
-
-EOF
- fi
-
- done
-
- xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $xen | tr '\n' ' '`
-done
-
-
diff --git a/grub.conf b/grub.conf
deleted file mode 100644
index e456973db062..000000000000
--- a/grub.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-#XEN_HYPERVISOR_CMDLINE="xsave=1"
-#XEN_LINUX_CMDLINE="console=tty0"
-#XEN_LINUX_CMDLINE_OVERRIDE=0
diff --git a/xen_4.14.0_fixes.patch b/xen_4.14.0_fixes.patch
new file mode 100644
index 000000000000..db0916f42298
--- /dev/null
+++ b/xen_4.14.0_fixes.patch
@@ -0,0 +1,34 @@
+diff -Naur orig/tools/libxl/libxlu_pci.c patched/tools/libxl/libxlu_pci.c
+--- orig/tools/libxl/libxlu_pci.c 2020-07-23 08:07:51.000000000 -0700
++++ patched/tools/libxl/libxlu_pci.c 2020-07-29 14:40:08.956666630 -0700
+@@ -50,6 +50,7 @@
+ unsigned state = STATE_DOMAIN;
+ unsigned dom, bus, dev, func, vslot = 0;
+ char *buf2, *tok, *ptr, *end, *optkey = NULL;
++ dom = bus = dev = func = 0;
+
+ if ( NULL == (buf2 = ptr = strdup(str)) )
+ return ERROR_NOMEM;
+diff -Naur orig/tools/libxl/libxl_utils.c patched/tools/libxl/libxl_utils.c
+--- orig/tools/libxl/libxl_utils.c 2020-07-23 08:07:51.000000000 -0700
++++ patched/tools/libxl/libxl_utils.c 2020-07-29 14:40:08.956666630 -0700
+@@ -1252,14 +1252,16 @@
+ struct sockaddr_un *un, const char *path,
+ const char *what)
+ {
+- if (sizeof(un->sun_path) <= strlen(path)) {
++ size_t len = strlen(path);
++
++ if (sizeof(un->sun_path) <= len) {
+ LOG(ERROR, "UNIX socket path '%s' is too long for %s", path, what);
+- LOG(DEBUG, "Path must be less than %zu bytes", sizeof(un->sun_path));
++ LOG(DEBUG, "Path of len %zu must be less than %zu bytes", len, sizeof(un->sun_path));
+ return ERROR_INVAL;
+ }
+ memset(un, 0, sizeof(struct sockaddr_un));
+ un->sun_family = AF_UNIX;
+- strncpy(un->sun_path, path, sizeof(un->sun_path));
++ memcpy(un->sun_path, path, len);
+ return 0;
+ }
+
diff --git a/xen_gcc10_1_omnibus.patch b/xen_gcc10_1_omnibus.patch
deleted file mode 100644
index 64fcb519f103..000000000000
--- a/xen_gcc10_1_omnibus.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-diff -Naur orig/stubdom/Makefile changed/stubdom/Makefile
---- orig/stubdom/Makefile 2020-05-14 05:19:32.000000000 -0700
-+++ changed/stubdom/Makefile 2020-05-20 12:06:15.266666457 -0700
-@@ -231,6 +231,7 @@
- patch -d $@ -p1 < vtpm-cmake-Wextra.patch
- patch -d $@ -p1 < vtpm-implicit-fallthrough.patch
- patch -d $@ -p1 < vtpm_TPM_ChangeAuthAsymFinish.patch
-+ patch -d $@ -p1 < vtpm_gcc10_1.patch
- mkdir $@/build
- cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
- touch $@
-diff -Naur orig/stubdom/vtpm_gcc10_1.patch changed/stubdom/vtpm_gcc10_1.patch
---- orig/stubdom/vtpm_gcc10_1.patch 1969-12-31 16:00:00.000000000 -0800
-+++ changed/stubdom/vtpm_gcc10_1.patch 2020-05-20 12:04:59.593333123 -0700
-@@ -0,0 +1,48 @@
-+diff -Naur orig/tpm/tpm_emulator_extern.h changed/tpm/tpm_emulator_extern.h
-+--- orig/tpm/tpm_emulator_extern.h 2020-05-20 11:58:56.533333115 -0700
-++++ changed/tpm/tpm_emulator_extern.h 2020-05-20 11:50:57.153333124 -0700
-+@@ -29,7 +29,7 @@
-+ TPM_LOG_ERROR
-+ };
-+
-+-void (*tpm_log)(int priority, const char *fmt, ...);
-++extern void (*tpm_log)(int priority, const char *fmt, ...);
-+
-+ #if defined(_WIN32) || defined(_WIN64)
-+ #define __BFILE__ ((strrchr(__FILE__, '\\') ? : __FILE__ - 1) + 1)
-+@@ -44,27 +44,27 @@
-+ #define error(fmt, ...) tpm_log(TPM_LOG_ERROR, "%s:%d: Error: " fmt "\n", \
-+ __BFILE__, __LINE__, ## __VA_ARGS__)
-+ /* initialization */
-+-int (*tpm_extern_init)(void);
-+-void (*tpm_extern_release)(void);
-++extern int (*tpm_extern_init)(void);
-++extern void (*tpm_extern_release)(void);
-+
-+ /* memory allocation */
-+
-+-void* (*tpm_malloc)(size_t size);
-++extern void* (*tpm_malloc)(size_t size);
-+
-+-void (*tpm_free)(/*const*/ void *ptr);
-++extern void (*tpm_free)(/*const*/ void *ptr);
-+
-+ /* random numbers */
-+
-+-void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
-++extern void (*tpm_get_extern_random_bytes)(void *buf, size_t nbytes);
-+
-+ /* usec since last call */
-+
-+-uint64_t (*tpm_get_ticks)(void);
-++extern uint64_t (*tpm_get_ticks)(void);
-+
-+ /* file handling */
-+
-+-int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
-+-int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
-++extern int (*tpm_write_to_storage)(uint8_t *data, size_t data_length);
-++extern int (*tpm_read_from_storage)(uint8_t **data, size_t *data_length);
-+
-+ #endif /* _TPM_EMULATOR_EXTERN_H_ */
-+
-diff -Naur orig/stubdom/vtpmmgr/vtpmmgr.h changed/stubdom/vtpmmgr/vtpmmgr.h
---- orig/stubdom/vtpmmgr/vtpmmgr.h 2020-05-14 05:19:32.000000000 -0700
-+++ changed/stubdom/vtpmmgr/vtpmmgr.h 2020-05-20 12:04:28.506666463 -0700
-@@ -50,7 +50,7 @@
- #define RSA_KEY_SIZE 0x0800
- #define RSA_CIPHER_SIZE (RSA_KEY_SIZE / 8)
-
--enum {
-+extern enum {
- TPM1_HARDWARE = 1,
- TPM2_HARDWARE,
- } tpm_version;
-diff -Naur orig/tools/firmware/etherboot/patches/ipxe_gcc10_1.patch changed/tools/firmware/etherboot/patches/ipxe_gcc10_1.patch
---- orig/tools/firmware/etherboot/patches/ipxe_gcc10_1.patch 1969-12-31 16:00:00.000000000 -0800
-+++ changed/tools/firmware/etherboot/patches/ipxe_gcc10_1.patch 2020-05-20 12:06:53.043333126 -0700
-@@ -0,0 +1,30 @@
-+diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
-+index 1dd14794..8aaa2754 100644
-+--- a/src/Makefile.housekeeping
-++++ b/src/Makefile.housekeeping
-+@@ -130,7 +130,7 @@ eval :
-+ # Check for various tool workarounds
-+ #
-+
-+-WORKAROUND_CFLAGS :=
-++WORKAROUND_CFLAGS := -Wno-array-bounds -Wno-enum-conversion
-+ WORKAROUND_ASFLAGS :=
-+ WORKAROUND_LDFLAGS :=
-+
-+@@ -170,6 +170,16 @@ CFI_FLAGS := $(shell $(CFI_TEST) && \
-+ WORKAROUND_CFLAGS += $(CFI_FLAGS)
-+ endif
-+
-++# gcc 10 switched default behavior from -fcommon to -fno-common. Since
-++# "__shared" relies on the legacy behavior, explicitly specify it.
-++#
-++ifeq ($(CCTYPE),gcc)
-++FCOMMON_TEST = $(CC) -fcommon -x c -c /dev/null \
-++ -o /dev/null >/dev/null 2>&1
-++FCOMMON_FLAGS := $(shell $(FCOMMON_TEST) && $(ECHO) '-fcommon')
-++WORKAROUND_CFLAGS += $(FCOMMON_FLAGS)
-++endif
-++
-+ # gcc 4.6 generates spurious warnings if -Waddress is in force.
-+ # Inhibit this.
-+ #
-diff -Naur orig/tools/firmware/etherboot/patches/series changed/tools/firmware/etherboot/patches/series
---- orig/tools/firmware/etherboot/patches/series 2020-05-14 05:19:32.000000000 -0700
-+++ changed/tools/firmware/etherboot/patches/series 2020-05-20 12:13:35.533333130 -0700
-@@ -1 +1,2 @@
- boot_prompt_option.patch
-+ipxe_gcc10_1.patch