Accepting request 602139 from Virtualization
- Fix autoinstall of qemu-guest-agent by getting the modalias string right (bsc#1091143) - Guard strncpy call with GCC pragma to disable warning about possible incorrect usage, when in fact it is correct. This is for gcc 8 compatibility (bsc#1090355) ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch - Add WantedBy for enable qemu-ga@.service auto start (bsc#1090369) - fix qemu-ga service file name (bsc#1089067) - Fix autoinstall of qemu-guest-agent by getting the modalias string right (bsc#1091143) - Guard strncpy call with GCC pragma to disable warning about possible incorrect usage, when in fact it is correct. This is for gcc 8 compatibility (bsc#1090355) ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch - Add WantedBy for enable qemu-ga@.service auto start (bsc#1090369) - fix qemu-ga service file name (bsc#1089067) OBS-URL: https://build.opensuse.org/request/show/602139 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=139
This commit is contained in:
commit
7197400e25
43
ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
Normal file
43
ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From cd6ca646c12371f0146d43ea5a6b7574342c2a7f Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Rogers <brogers@suse.com>
|
||||
Date: Wed, 25 Apr 2018 10:26:28 -0600
|
||||
Subject: [PATCH] [efi] guard strncpy with gcc warning ignore pragma
|
||||
|
||||
Using gcc 8 with the -Wstringop-truncation option, and with warnings
|
||||
treated as errors, the following error is emitted:
|
||||
|
||||
util/elf2efi.c:494:2: error: 'strncpy' specified bound 8 equals destination
|
||||
size [-Werror=stringop-truncation]
|
||||
strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use gcc pragmas surrounding this line of code which avoid this warning. The
|
||||
strncpy usage here is correct.
|
||||
|
||||
[BR: BSC#1090355]
|
||||
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||||
---
|
||||
src/util/elf2efi.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
|
||||
index 6718df77..93cdda03 100644
|
||||
--- a/src/util/elf2efi.c
|
||||
+++ b/src/util/elf2efi.c
|
||||
@@ -494,7 +494,13 @@ static struct pe_section * process_section ( struct elf_file *elf,
|
||||
memset ( new, 0, sizeof ( *new ) + section_filesz );
|
||||
|
||||
/* Fill in section header details */
|
||||
+/* gcc 8 warning gives false positive here - our usage is correct */
|
||||
+#pragma GCC diagnostic push
|
||||
+#if __GNUC__ >= 8
|
||||
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
|
||||
+#endif
|
||||
strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
|
||||
+#pragma GCC diagnostic pop
|
||||
new->hdr.Misc.VirtualSize = section_memsz;
|
||||
new->hdr.VirtualAddress = shdr->sh_addr;
|
||||
new->hdr.SizeOfRawData = section_filesz;
|
||||
--
|
||||
2.16.3
|
||||
|
@ -9,3 +9,6 @@ Type=simple
|
||||
ExecStart=-/usr/bin/qemu-ga -p /dev/%I
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
|
||||
[Install]
|
||||
WantedBy=dev-%i.device
|
||||
|
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 27 20:50:49 UTC 2018 - brogers@suse.com
|
||||
|
||||
- Fix autoinstall of qemu-guest-agent by getting the modalias string
|
||||
right (bsc#1091143)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 26 17:20:01 UTC 2018 - brogers@suse.com
|
||||
|
||||
- Guard strncpy call with GCC pragma to disable warning about possible
|
||||
incorrect usage, when in fact it is correct. This is for gcc 8
|
||||
compatibility (bsc#1090355)
|
||||
ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 23 13:02:30 UTC 2018 - lma@suse.com
|
||||
|
||||
- Add WantedBy for enable qemu-ga@.service auto start (bsc#1090369)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 10 10:50:31 UTC 2018 - kwalter@suse.com
|
||||
|
||||
- fix qemu-ga service file name (bsc#1089067)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 5 21:33:37 UTC 2018 - brogers@suse.com
|
||||
|
||||
|
@ -225,6 +225,7 @@ Patch1101: seabios-switch-to-python3-as-needed.patch
|
||||
# PATCH-FIX-OPENSUSE ipxe-stable-buildid.patch brogers@suse.com -- reproducible builds
|
||||
Patch1200: ipxe-stable-buildid.patch
|
||||
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
|
||||
Patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
|
||||
|
||||
# sgabios
|
||||
# PATCH-FIX-OPENSUSE sgabios-stable-buildid.patch brogers@suse.com -- reproducible builds
|
||||
@ -730,7 +731,7 @@ Group: System/Emulators/PC
|
||||
Provides: qemu:%_bindir/qemu-ga
|
||||
Requires(pre): shadow
|
||||
Requires(post): udev
|
||||
Supplements: modalias(acpi*:QEMU0002:*)
|
||||
Supplements: modalias(acpi*:QEMU0002%3A*)
|
||||
Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*)
|
||||
Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*)
|
||||
%{?systemd_requires}
|
||||
@ -906,6 +907,7 @@ pushd roms/ipxe
|
||||
%if 0%{?suse_version} <= 1320
|
||||
%patch1201 -p1
|
||||
%endif
|
||||
%patch1202 -p1
|
||||
popd
|
||||
|
||||
pushd roms/sgabios
|
||||
@ -1288,7 +1290,7 @@ install -D -m 0644 %{SOURCE4} %{buildroot}%{_mandir}/man1/kvm_stat.1.gz
|
||||
%endif
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/80-kvm.rules
|
||||
%endif
|
||||
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga.service
|
||||
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga@.service
|
||||
%if 0%{?is_opensuse}
|
||||
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
||||
%endif
|
||||
@ -1342,19 +1344,19 @@ fi
|
||||
|
||||
%pre guest-agent
|
||||
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm
|
||||
%service_add_pre qemu-ga.service
|
||||
%service_add_pre qemu-ga@.service
|
||||
|
||||
%preun guest-agent
|
||||
%service_del_preun qemu-ga.service
|
||||
%service_del_preun qemu-ga@.service
|
||||
|
||||
%post guest-agent
|
||||
%service_add_post qemu-ga.service
|
||||
%service_add_post qemu-ga@.service
|
||||
if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then
|
||||
/usr/bin/systemctl start qemu-ga.service || :
|
||||
/usr/bin/systemctl start qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0.service || :
|
||||
fi
|
||||
|
||||
%postun guest-agent
|
||||
%service_del_postun qemu-ga.service
|
||||
%service_del_postun qemu-ga@.service
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
%pre ksm
|
||||
@ -1603,7 +1605,7 @@ fi
|
||||
%defattr(-, root, root)
|
||||
%_mandir/man8/qemu-ga.8.gz
|
||||
%attr(0755,root,kvm) %_bindir/qemu-ga
|
||||
%{_unitdir}/qemu-ga.service
|
||||
%{_unitdir}/qemu-ga@.service
|
||||
%{_udevrulesdir}/80-qemu-ga.rules
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
|
24
qemu.changes
24
qemu.changes
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 27 20:50:49 UTC 2018 - brogers@suse.com
|
||||
|
||||
- Fix autoinstall of qemu-guest-agent by getting the modalias string
|
||||
right (bsc#1091143)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 26 17:20:01 UTC 2018 - brogers@suse.com
|
||||
|
||||
- Guard strncpy call with GCC pragma to disable warning about possible
|
||||
incorrect usage, when in fact it is correct. This is for gcc 8
|
||||
compatibility (bsc#1090355)
|
||||
ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 23 13:02:30 UTC 2018 - lma@suse.com
|
||||
|
||||
- Add WantedBy for enable qemu-ga@.service auto start (bsc#1090369)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 10 10:50:31 UTC 2018 - kwalter@suse.com
|
||||
|
||||
- fix qemu-ga service file name (bsc#1089067)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 5 21:33:37 UTC 2018 - brogers@suse.com
|
||||
|
||||
|
18
qemu.spec
18
qemu.spec
@ -225,6 +225,7 @@ Patch1101: seabios-switch-to-python3-as-needed.patch
|
||||
# PATCH-FIX-OPENSUSE ipxe-stable-buildid.patch brogers@suse.com -- reproducible builds
|
||||
Patch1200: ipxe-stable-buildid.patch
|
||||
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
|
||||
Patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
|
||||
|
||||
# sgabios
|
||||
# PATCH-FIX-OPENSUSE sgabios-stable-buildid.patch brogers@suse.com -- reproducible builds
|
||||
@ -730,7 +731,7 @@ Group: System/Emulators/PC
|
||||
Provides: qemu:%_bindir/qemu-ga
|
||||
Requires(pre): shadow
|
||||
Requires(post): udev
|
||||
Supplements: modalias(acpi*:QEMU0002:*)
|
||||
Supplements: modalias(acpi*:QEMU0002%3A*)
|
||||
Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*)
|
||||
Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*)
|
||||
%{?systemd_requires}
|
||||
@ -906,6 +907,7 @@ pushd roms/ipxe
|
||||
%if 0%{?suse_version} <= 1320
|
||||
%patch1201 -p1
|
||||
%endif
|
||||
%patch1202 -p1
|
||||
popd
|
||||
|
||||
pushd roms/sgabios
|
||||
@ -1288,7 +1290,7 @@ install -D -m 0644 %{SOURCE4} %{buildroot}%{_mandir}/man1/kvm_stat.1.gz
|
||||
%endif
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/80-kvm.rules
|
||||
%endif
|
||||
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga.service
|
||||
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga@.service
|
||||
%if 0%{?is_opensuse}
|
||||
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
||||
%endif
|
||||
@ -1342,19 +1344,19 @@ fi
|
||||
|
||||
%pre guest-agent
|
||||
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm
|
||||
%service_add_pre qemu-ga.service
|
||||
%service_add_pre qemu-ga@.service
|
||||
|
||||
%preun guest-agent
|
||||
%service_del_preun qemu-ga.service
|
||||
%service_del_preun qemu-ga@.service
|
||||
|
||||
%post guest-agent
|
||||
%service_add_post qemu-ga.service
|
||||
%service_add_post qemu-ga@.service
|
||||
if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then
|
||||
/usr/bin/systemctl start qemu-ga.service || :
|
||||
/usr/bin/systemctl start qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0.service || :
|
||||
fi
|
||||
|
||||
%postun guest-agent
|
||||
%service_del_postun qemu-ga.service
|
||||
%service_del_postun qemu-ga@.service
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
%pre ksm
|
||||
@ -1603,7 +1605,7 @@ fi
|
||||
%defattr(-, root, root)
|
||||
%_mandir/man8/qemu-ga.8.gz
|
||||
%attr(0755,root,kvm) %_bindir/qemu-ga
|
||||
%{_unitdir}/qemu-ga.service
|
||||
%{_unitdir}/qemu-ga@.service
|
||||
%{_udevrulesdir}/80-qemu-ga.rules
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
|
18
qemu.spec.in
18
qemu.spec.in
@ -147,6 +147,7 @@ Patch1101: seabios-switch-to-python3-as-needed.patch
|
||||
# PATCH-FIX-OPENSUSE ipxe-stable-buildid.patch brogers@suse.com -- reproducible builds
|
||||
Patch1200: ipxe-stable-buildid.patch
|
||||
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
|
||||
patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
|
||||
|
||||
# sgabios
|
||||
# PATCH-FIX-OPENSUSE sgabios-stable-buildid.patch brogers@suse.com -- reproducible builds
|
||||
@ -652,7 +653,7 @@ Group: System/Emulators/PC
|
||||
Provides: qemu:%_bindir/qemu-ga
|
||||
Requires(pre): shadow
|
||||
Requires(post): udev
|
||||
Supplements: modalias(acpi*:QEMU0002:*)
|
||||
Supplements: modalias(acpi*:QEMU0002%3A*)
|
||||
Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*)
|
||||
Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*)
|
||||
%{?systemd_requires}
|
||||
@ -749,6 +750,7 @@ pushd roms/ipxe
|
||||
%if 0%{?suse_version} <= 1320
|
||||
%patch1201 -p1
|
||||
%endif
|
||||
%patch1202 -p1
|
||||
popd
|
||||
|
||||
pushd roms/sgabios
|
||||
@ -1131,7 +1133,7 @@ install -D -m 0644 %{SOURCE4} %{buildroot}%{_mandir}/man1/kvm_stat.1.gz
|
||||
%endif
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/80-kvm.rules
|
||||
%endif
|
||||
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga.service
|
||||
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/qemu-ga@.service
|
||||
%if 0%{?is_opensuse}
|
||||
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
|
||||
%endif
|
||||
@ -1185,19 +1187,19 @@ fi
|
||||
|
||||
%pre guest-agent
|
||||
%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm
|
||||
%service_add_pre qemu-ga.service
|
||||
%service_add_pre qemu-ga@.service
|
||||
|
||||
%preun guest-agent
|
||||
%service_del_preun qemu-ga.service
|
||||
%service_del_preun qemu-ga@.service
|
||||
|
||||
%post guest-agent
|
||||
%service_add_post qemu-ga.service
|
||||
%service_add_post qemu-ga@.service
|
||||
if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then
|
||||
/usr/bin/systemctl start qemu-ga.service || :
|
||||
/usr/bin/systemctl start qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0.service || :
|
||||
fi
|
||||
|
||||
%postun guest-agent
|
||||
%service_del_postun qemu-ga.service
|
||||
%service_del_postun qemu-ga@.service
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
%pre ksm
|
||||
@ -1446,7 +1448,7 @@ fi
|
||||
%defattr(-, root, root)
|
||||
%_mandir/man8/qemu-ga.8.gz
|
||||
%attr(0755,root,kvm) %_bindir/qemu-ga
|
||||
%{_unitdir}/qemu-ga.service
|
||||
%{_unitdir}/qemu-ga@.service
|
||||
%{_udevrulesdir}/80-qemu-ga.rules
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
|
Loading…
Reference in New Issue
Block a user