Accepting request 534273 from home:bfrogers:branches:Virtualization

- Don't tie glusterfs support to specific arch
- Build skiboot firmware (OPAL), particularly since it's fairly easy to do so

OBS-URL: https://build.opensuse.org/request/show/534273
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=371
This commit is contained in:
Bruce Rogers 2017-10-16 15:47:06 +00:00 committed by Git OBS Bridge
parent c29aade90b
commit 8ea6ba3ae6
7 changed files with 205 additions and 15 deletions

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Oct 16 14:50:03 UTC 2017 - brogers@suse.com
- Don't tie glusterfs support to specific arch
- Build skiboot firmware (OPAL), particularly since it's fairly
easy to do so
-------------------------------------------------------------------
Fri Oct 13 10:57:49 UTC 2017 - henrik.kuhn@origenis.de
- Added the global macro 'with_glusterfs' in order to re-enable
glusterfs support. The macro enable easier future adjustments
for various ARCH/targets/requiremnets.
At first glusterfs support is enabled for openSUSE Leap 42.x and
Factory for ARCH x86_64.
-------------------------------------------------------------------
Wed Oct 4 16:21:04 UTC 2017 - brogers@suse.com

View File

@ -19,6 +19,7 @@
%define noarch_supported 1110
%define build_x86_firmware_from_source 0
%define build_skiboot_from_source 0
%define build_slof_from_source 0
%define kvm_available 0
%define legacy_qemu_kvm 0
@ -38,11 +39,13 @@
%endif
%ifarch ppc64
%define build_skiboot_from_source 1
%define build_slof_from_source 1
%endif
%ifarch ppc64le
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%define build_skiboot_from_source 1
%define build_slof_from_source 1
%endif
%endif
@ -59,6 +62,10 @@
%define with_systemd 1
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%define with_glusterfs 1
%endif
%ifarch x86_64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
%define with_rbd 1
@ -193,6 +200,10 @@ Patch1200: sgabios-stable-buildid.patch
# SLOF (Currently no patches)
# skiboot
Patch1400: skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch
Patch1401: skiboot-libc-stdio-vsnprintf.c-add-expli.patch
# this is to make lint happy
Source300: qemu-rpmlintrc
Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch
@ -227,7 +238,7 @@ BuildRequires: gcc6
%endif
%endif
BuildRequires: glib2-devel
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%if 0%{?with_glusterfs}
BuildRequires: glusterfs-devel
%endif
%if 0%{?suse_version} >= 1220
@ -367,7 +378,7 @@ BuildRequires: qemu-ppc = %version
BuildRequires: qemu-s390 = %version
BuildRequires: qemu-tools = %version
BuildRequires: qemu-x86 = %version
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%if 0%{?with_glusterfs}
BuildRequires: qemu-block-gluster = %version
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
@ -413,7 +424,7 @@ Recommends: qemu-arm
Suggests: qemu-arm
%endif
Suggests: qemu-block-dmg
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%if 0%{?with_glusterfs}
Suggests: qemu-block-gluster
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
@ -431,10 +442,17 @@ Suggests: qemu-lang
Recommends: qemu-ksm = %{version}
%endif
%if %{build_slof_from_source}
%define ppc_default_built_firmware {%nil}
%if %{build_skiboot_from_source} && %{build_slof_from_source}
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
%else
%if %{build_skiboot_from_source}
%define ppc_extra_built_firmware {skiboot.lid}
%endif
%if %{build_slof_from_source}
%define ppc_extra_built_firmware {slof.bin}
%endif
%endif
%ifarch ppc64
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
@ -647,7 +665,7 @@ as PC and PowerMac systems.
This sub-package contains a module for accessing Mac OS X image files
from qemu-img tool and QEMU system emulation.
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%if 0%{?with_glusterfs}
%package block-gluster
Summary: Universal CPU emulator -- GlusterFS block support
Group: System/Emulators/PC
@ -884,6 +902,11 @@ popd
pushd roms/SLOF
popd
pushd roms/skiboot
%patch1400 -p1
%patch1401 -p1
popd
# as a safeguard, delete the firmware files that we intend to build
for i in %built_firmware
do
@ -927,7 +950,7 @@ echo '%{version}' > roms/seabios/.version
--enable-gcrypt \
--disable-nettle \
%endif
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%if 0%{?with_glusterfs}
--enable-glusterfs \
%else
--disable-glusterfs \
@ -1132,6 +1155,10 @@ for i in %supported_nics_small
done
%endif
%if %{build_skiboot_from_source}
make %{?_smp_mflags} -C roms skiboot SKIBOOT_VERSION=skiboot-5.3.7
%endif
%if %{build_slof_from_source}
make %{?_smp_mflags} -C roms slof
%endif
@ -1509,7 +1536,7 @@ fi
%dir %_libdir/%name
%_libdir/%name/block-dmg-bz2.so
%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315
%if 0%{?with_glusterfs}
%files block-gluster
%defattr(-, root, root)
%dir %_libdir/%name

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Oct 16 14:50:03 UTC 2017 - brogers@suse.com
- Don't tie glusterfs support to specific arch
- Build skiboot firmware (OPAL), particularly since it's fairly
easy to do so
-------------------------------------------------------------------
Fri Oct 13 10:57:49 UTC 2017 - henrik.kuhn@origenis.de

View File

@ -19,6 +19,7 @@
%define noarch_supported 1110
%define build_x86_firmware_from_source 0
%define build_skiboot_from_source 0
%define build_slof_from_source 0
%define kvm_available 0
%define legacy_qemu_kvm 0
@ -38,11 +39,13 @@
%endif
%ifarch ppc64
%define build_skiboot_from_source 1
%define build_slof_from_source 1
%endif
%ifarch ppc64le
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%define build_skiboot_from_source 1
%define build_slof_from_source 1
%endif
%endif
@ -59,13 +62,14 @@
%define with_systemd 1
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%define with_glusterfs 1
%endif
%ifarch x86_64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
%define with_rbd 1
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%define with_glusterfs 1
%endif
%endif
%ifarch aarch64
@ -196,6 +200,10 @@ Patch1200: sgabios-stable-buildid.patch
# SLOF (Currently no patches)
# skiboot (OPAL)
Patch1400: skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch
Patch1401: skiboot-libc-stdio-vsnprintf.c-add-expli.patch
# this is to make lint happy
Source300: qemu-rpmlintrc
Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch
@ -434,10 +442,17 @@ Suggests: qemu-lang
Recommends: qemu-ksm = %{version}
%endif
%if %{build_slof_from_source}
%define ppc_default_built_firmware {%nil}
%if %{build_skiboot_from_source} && %{build_slof_from_source}
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
%else
%if %{build_skiboot_from_source}
%define ppc_extra_built_firmware {skiboot.lid}
%endif
%if %{build_slof_from_source}
%define ppc_extra_built_firmware {slof.bin}
%endif
%endif
%ifarch ppc64
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
@ -887,6 +902,11 @@ popd
pushd roms/SLOF
popd
pushd roms/skiboot
%patch1400 -p1
%patch1401 -p1
popd
# as a safeguard, delete the firmware files that we intend to build
for i in %built_firmware
do
@ -1135,6 +1155,10 @@ for i in %supported_nics_small
done
%endif
%if %{build_skiboot_from_source}
make %{?_smp_mflags} -C roms skiboot SKIBOOT_VERSION=skiboot-5.3.7
%endif
%if %{build_slof_from_source}
make %{?_smp_mflags} -C roms slof
%endif

View File

@ -19,6 +19,7 @@
%define noarch_supported 1110
%define build_x86_firmware_from_source 0
%define build_skiboot_from_source 0
%define build_slof_from_source 0
%define kvm_available 0
%define legacy_qemu_kvm 0
@ -38,11 +39,13 @@
%endif
%ifarch ppc64
%define build_skiboot_from_source 1
%define build_slof_from_source 1
%endif
%ifarch ppc64le
%if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315
%define build_skiboot_from_source 1
%define build_slof_from_source 1
%endif
%endif
@ -59,13 +62,14 @@
%define with_systemd 1
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%define with_glusterfs 1
%endif
%ifarch x86_64
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) )
%define with_rbd 1
%endif
%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} )
%define with_glusterfs 1
%endif
%endif
%ifarch aarch64
@ -158,6 +162,10 @@ Patch1200: sgabios-stable-buildid.patch
# SLOF (Currently no patches)
# skiboot
Patch1400: skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch
Patch1401: skiboot-libc-stdio-vsnprintf.c-add-expli.patch
# this is to make lint happy
Source300: qemu-rpmlintrc
Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch
@ -396,10 +404,17 @@ Suggests: qemu-lang
Recommends: qemu-ksm = %{version}
%endif
%if %{build_slof_from_source}
%define ppc_default_built_firmware {%nil}
%if %{build_skiboot_from_source} && %{build_slof_from_source}
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
%else
%if %{build_skiboot_from_source}
%define ppc_extra_built_firmware {skiboot.lid}
%endif
%if %{build_slof_from_source}
%define ppc_extra_built_firmware {slof.bin}
%endif
%endif
%ifarch ppc64
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
@ -811,6 +826,11 @@ popd
pushd roms/SLOF
popd
pushd roms/skiboot
%patch1400 -p1
%patch1401 -p1
popd
# as a safeguard, delete the firmware files that we intend to build
for i in %built_firmware
do
@ -1059,6 +1079,10 @@ for i in %supported_nics_small
done
%endif
%if %{build_skiboot_from_source}
make %{?_smp_mflags} -C roms skiboot SKIBOOT_VERSION=skiboot-5.3.7
%endif
%if %{build_slof_from_source}
make %{?_smp_mflags} -C roms slof
%endif

View File

@ -0,0 +1,64 @@
From d2c3aad5b260f52dbc87dc93e81733daad154051 Mon Sep 17 00:00:00 2001
From: Stewart Smith <stewart@linux.vnet.ibm.com>
Date: Wed, 10 May 2017 19:33:52 +1000
Subject: [PATCH] GCC7: fixes for -Wimplicit-fallthrough expected regexes
It turns out GCC7 adds a useful warning and does fancy things like
parsing your comments to work out that you intended to do the fallthrough.
There's a few places where we don't match the regex. Fix them, as it's
harmless to do so.
Found by building on Fedora Rawhide in Travis.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
core/pcie-slot.c | 3 ++-
hw/fsp/fsp-sysparam.c | 2 +-
platforms/ibm-fsp/firenze-pci.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index 62933a40..80972a6f 100644
--- a/core/pcie-slot.c
+++ b/core/pcie-slot.c
@@ -383,7 +383,8 @@ static int64_t pcie_slot_sm_freset(struct pci_slot *slot)
PCI_SLOT_STATE_FRESET_POWER_OFF);
return pci_slot_set_sm_timeout(slot, msecs_to_tb(50));
}
- /* No power state change, fall through */
+ /* No power state change, */
+ /* fallthrough */
case PCI_SLOT_STATE_FRESET_POWER_OFF:
PCIE_SLOT_DBG(slot, "FRESET: Power is off, turn on\n");
if (slot->ops.set_power_state)
diff --git a/hw/fsp/fsp-sysparam.c b/hw/fsp/fsp-sysparam.c
index 2dbf05c6..5d7ae91e 100644
--- a/hw/fsp/fsp-sysparam.c
+++ b/hw/fsp/fsp-sysparam.c
@@ -100,7 +100,7 @@ static int fsp_sysparam_process(struct sysparam_req *r)
case 0x00: /* XXX Is that even possible ? */
case 0x11: /* Data in request */
memcpy(r->ubuf, &r->resp.data.words[2], len);
- /* pass through */
+ /* fallthrough */
case 0x12: /* Data in TCE */
stlen = len;
break;
diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c
index fd15e88a..66f6efa9 100644
--- a/platforms/ibm-fsp/firenze-pci.c
+++ b/platforms/ibm-fsp/firenze-pci.c
@@ -507,7 +507,8 @@ static int64_t firenze_pci_slot_freset(struct pci_slot *slot)
msecs_to_tb(FIRENZE_PCI_SLOT_DELAY));
}
- /* Fall through: Power is off, turn it on */
+ /* Power is off, turn it on */
+ /* Fallthrough */
case FIRENZE_PCI_SLOT_FRESET_POWER_OFF:
/* Update last power status */
pval = (uint8_t *)(plat_slot->req->rw_buf);
--
2.14.1

View File

@ -0,0 +1,28 @@
From bfb0e54f493d4003a397d5c1b50fc77195e7ffb5 Mon Sep 17 00:00:00 2001
From: Stewart Smith <stewart@linux.vnet.ibm.com>
Date: Thu, 2 Feb 2017 16:35:40 +1100
Subject: [PATCH] libc/stdio/vsnprintf.c: add explicit fallthrough
silences recent GCC warning
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
libc/stdio/vsnprintf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c
index fbb84a0b..e83cee84 100644
--- a/libc/stdio/vsnprintf.c
+++ b/libc/stdio/vsnprintf.c
@@ -164,6 +164,7 @@ print_format(char **buffer, size_t bufsize, const char *format, void *var)
break;
case 'X':
upper = true;
+ /* fallthrough */
case 'x':
sizec[i] = '\0';
value = (unsigned long) var & convert[length_mod];
--
2.14.1