From 00ba009053d8a005a60d2338d9e3e046277fef6c Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Mon, 2 Aug 2021 18:12:52 +0800 Subject: [PATCH] build: do not remove dtrace temp files Signed-off-by: Liwei Ge --- ...o-not-remove-temp-dtrace-probe-files.patch | 47 +++++++++++++++++++ libvirt.spec | 9 +++- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 1000-Do-not-remove-temp-dtrace-probe-files.patch diff --git a/1000-Do-not-remove-temp-dtrace-probe-files.patch b/1000-Do-not-remove-temp-dtrace-probe-files.patch new file mode 100644 index 0000000..781dc7f --- /dev/null +++ b/1000-Do-not-remove-temp-dtrace-probe-files.patch @@ -0,0 +1,47 @@ +From 5e5efc07947598de75f63380d48fa5b962fbadd9 Mon Sep 17 00:00:00 2001 +From: Liwei Ge +Date: Tue, 17 Nov 2020 02:00:28 -0500 +Subject: [PATCH] Do not remove temp dtrace probe files + +Build hit error with dtrace enabled: +File "/usr/bin/dtrace", line 432, in main + os.remove(fname) +FileNotFoundError: [Errno 2] No such file or directory: '../src/libvirt_probes.o.dtrace-temp.c' + +Remove a temp file that doesn't exists could cause build failure. update Makefile +to keep temp dtrace files. + +Signed-off-by: Liwei Ge +--- + src/Makefile.am | 2 +- + src/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index c9b5eeb..e90b313 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -475,7 +475,7 @@ tapset_DATA += libvirt_probes.stp libvirt_functions.stp + + .PRECIOUS: %_probes.o + %_probes.o: %_probes.d +- $(AM_V_GEN)$(DTRACE) -o $@ -G -s $< ++ $(AM_V_GEN)$(DTRACE) -k -o $@ -G -s $< + + %_probes.lo: %_probes.o + $(AM_V_GEN)printf %s\\n \ +diff --git a/src/Makefile.in b/src/Makefile.in +index c114180..6b43808 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -15856,7 +15856,7 @@ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \ + + @WITH_DTRACE_PROBES_TRUE@.PRECIOUS: %_probes.o + @WITH_DTRACE_PROBES_TRUE@%_probes.o: %_probes.d +-@WITH_DTRACE_PROBES_TRUE@ $(AM_V_GEN)$(DTRACE) -o $@ -G -s $< ++@WITH_DTRACE_PROBES_TRUE@ $(AM_V_GEN)$(DTRACE) -k -o $@ -G -s $< + + @WITH_DTRACE_PROBES_TRUE@%_probes.lo: %_probes.o + @WITH_DTRACE_PROBES_TRUE@ $(AM_V_GEN)printf %s\\n \ +-- +2.18.1 diff --git a/libvirt.spec b/libvirt.spec index d49212a..5eb9cd0 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -1,5 +1,5 @@ # -*- rpm-spec -*- - +%define anolis_release .0.1 # This spec file assumes you are building on a Fedora or RHEL version # that's still supported by the vendor. It may work on other distros # or versions, but no effort will be made to ensure that going forward. @@ -219,7 +219,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 6.0.0 -Release: 37%{?dist}%{?extra_release} +Release: 37%{anolis_release}%{?dist}%{?extra_release} License: LGPLv2+ URL: https://libvirt.org/ @@ -773,6 +773,8 @@ Patch541: libvirt-conf-remove-duplicated-firmware-type-attribute.patch Patch542: libvirt-security-fix-SELinux-label-generation-logic.patch Patch543: libvirt-storage_driver-Unlock-object-on-ACL-fail-in-storagePoolLookupByTargetPath.patch +Patch1000: 1000-Do-not-remove-temp-dtrace-probe-files.patch + Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -2548,6 +2550,9 @@ exit 0 %changelog +* Fri Dec 17 2021 Liwei Ge - 6.0.0-37.0.1 +- Do not remove dtrace temp files + * Fri Aug 6 2021 Jiri Denemark - 6.0.0-37 - security: fix SELinux label generation logic (CVE-2021-3631) - storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath (CVE-2021-3667) -- Gitee