From 86492e72caa6ba3598d3dbafebfa57222c48f31c Mon Sep 17 00:00:00 2001 From: Michael Young Date: Jul 12 2018 18:39:22 +0000 Subject: build fixes i686 now want to build EFI hypervisor (actually x86_64) so let it --- diff --git a/xen.gcc8.temp.fix.patch b/xen.gcc8.temp.fix.patch index 2447c16..74321aa 100644 --- a/xen.gcc8.temp.fix.patch +++ b/xen.gcc8.temp.fix.patch @@ -9,3 +9,62 @@ SUBDIRS-y += xenstore SUBDIRS-y += misc SUBDIRS-y += examples +--- xen-4.10.0/tools/debugger/kdd/kdd.c.orig 2018-02-22 12:31:57.007039159 +0000 ++++ xen-4.10.0/tools/debugger/kdd/kdd.c 2018-02-22 18:27:37.213653422 +0000 +@@ -687,7 +687,7 @@ + } + } else { + /* 32-bit control-register space starts at 0x[2]cc, for 84 bytes */ +- uint32_t offset = addr; ++/* uint32_t offset = addr; + if (offset > 0x200) + offset -= 0x200; + offset -= 0xcc; +@@ -696,7 +696,9 @@ + len = 0; + } else { + memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len); +- } ++ } */ ++ /* disable above code due to compile issue for now */ ++ len = 0; + } + + s->txp.cmd.mem.addr = addr; +--- xen-4.10.0/tools/libxl/libxl_arm_acpi.c.orig 2017-12-13 11:37:59.000000000 +0000 ++++ xen-4.10.0/tools/libxl/libxl_arm_acpi.c 2018-02-28 12:37:08.887221211 +0000 +@@ -190,7 +190,7 @@ + struct acpi_table_rsdp *rsdp = (void *)dom->acpi_modules[0].data + offset; + + memcpy(rsdp->signature, "RSD PTR ", sizeof(rsdp->signature)); +- memcpy(rsdp->oem_id, ACPI_OEM_ID, sizeof(rsdp->oem_id)); ++ memcpy(rsdp->oem_id, ACPI_OEM_ID, sizeof(ACPI_OEM_ID)); + rsdp->length = acpitables[RSDP].size; + rsdp->revision = 0x02; + rsdp->xsdt_physical_address = acpitables[XSDT].addr; +@@ -205,11 +205,11 @@ + memcpy(h->signature, sig, 4); + h->length = len; + h->revision = rev; +- memcpy(h->oem_id, ACPI_OEM_ID, sizeof(h->oem_id)); +- memcpy(h->oem_table_id, ACPI_OEM_TABLE_ID, sizeof(h->oem_table_id)); ++ memcpy(h->oem_id, ACPI_OEM_ID, sizeof(ACPI_OEM_ID)); ++ memcpy(h->oem_table_id, ACPI_OEM_TABLE_ID, sizeof(ACPI_OEM_TABLE_ID)); + h->oem_revision = 0; + memcpy(h->asl_compiler_id, ACPI_ASL_COMPILER_ID, +- sizeof(h->asl_compiler_id)); ++ sizeof(ACPI_ASL_COMPILER_ID)); + h->asl_compiler_revision = 0; + h->checksum = 0; + } +--- xen-4.10.0/tools/xenpmd/xenpmd.c.orig 2018-02-28 16:18:50.377726049 +0000 ++++ xen-4.10.0/tools/xenpmd/xenpmd.c 2018-02-28 16:20:31.502426829 +0000 +@@ -352,7 +352,7 @@ + strlen(info->model_number) + + strlen(info->serial_number) + + strlen(info->battery_type) + +- strlen(info->oem_info) + 4)); ++ strlen(info->oem_info) + 4) & 0xff); + write_ulong_lsb_first(val+2, info->present); + write_ulong_lsb_first(val+10, info->design_capacity); + write_ulong_lsb_first(val+18, info->last_full_capacity); diff --git a/xen.spec b/xen.spec index 585481b..e5cb4a6 100644 --- a/xen.spec +++ b/xen.spec @@ -36,7 +36,8 @@ # --without efi %define build_efi %{?_without_efi: 0} %{?!_without_efi: 1} # xen only supports efi boot images on x86_64 or aarch64 -%ifnarch x86_64 aarch64 +# i686 builds a x86_64 hypervisor so add that as well +%ifnarch x86_64 aarch64 %{ix86} %define build_efi 0 %endif %if %build_efi && "%dist" < ".fc26" @@ -60,7 +61,7 @@ Summary: Xen is a virtual machine monitor Name: xen Version: 4.11.0 -Release: 0%{?dist} +Release: 1%{?dist} Group: Development/Libraries License: GPLv2+ and LGPLv2+ and BSD URL: http://xen.org/ @@ -116,6 +117,7 @@ Patch38: qemu.trad.CVE-2017-8309.patch Patch39: qemu.trad.CVE-2017-9330.patch Patch40: xen.gcc8.temp.fix.patch Patch41: xen.drop.brctl.patch +Patch42: xen.stubdom.build.patch %if %build_qemutrad @@ -324,6 +326,7 @@ manage Xen virtual machines. %patch3 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 # qemu-xen-traditional patches pushd tools/qemu-xen-traditional @@ -480,6 +483,9 @@ rm -rf %{buildroot}/%{_libdir}/*.a %if %build_efi # clean up extra efi files rm -rf %{buildroot}/%{_libdir}/efi +%ifarch %{ix86} +rm -rf %{buildroot}/usr/lib64/efi +%endif %endif %if ! %build_ocaml @@ -853,7 +859,7 @@ fi %endif %changelog -* Tue Jul 10 2018 Michael Young - 4.11.0-0 +* Thu Jul 12 2018 Michael Young - 4.11.0-1 - update to 4.11.0 (#1592976) remove patches for issues now fixed upstream adjust xen.use.fedora.ipxe.patch @@ -862,6 +868,9 @@ fi - add gcc BuildRequires - adjustments now /usr/bin/python is in a separate package - update hypervisor configuration for arm +- put back some gcc fixes needed for arm and i686 +- work around a build issue with perl +- i686 now want to build EFI hypervisor (actually x86_64) so let it * Wed Jun 27 2018 Michael Young - 4.10.1-5 - preemption checks bypassed in x86 PV MM handling [XSA-264, CVE-2018-12891] diff --git a/xen.stubdom.build.patch b/xen.stubdom.build.patch new file mode 100644 index 0000000..05d1b7c --- /dev/null +++ b/xen.stubdom.build.patch @@ -0,0 +1,11 @@ +--- xen-4.11.0/stubdom/Makefile.orig 2018-07-09 14:47:19.000000000 +0100 ++++ xen-4.11.0/stubdom/Makefile 2018-07-11 22:33:00.764078143 +0100 +@@ -87,7 +87,7 @@ + patch -d $@ -p0 < newlib.patch + patch -d $@ -p0 < newlib-chk.patch + patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch +- find $@ -type f | xargs perl -i.bak \ ++ find $@ -type f | xargs egrep -l "tzname|daylight|timezone" | xargs perl -i.bak \ + -pe 's/\b_(tzname|daylight|timezone)\b/$$1/g' + touch $@ +