Accepting request 894612 from home:vulyanov:branches:Virtualization

- Use git format-patch:
  0001-Don-t-build-virtctl-for-darwin-and-windows.patch
  0002-Don-t-use-Bazel-in-build-manifests.sh.patch
- Drop patches:
  dont-build-virtctl-darwin.patch
  dont-use-bazel-in-build-manifests.patch
  fix-double-free-of-VirDomain.patch

- Update to version 0.41.0
  Release notes https://github.com/kubevirt/kubevirt/releases/tag/v0.41.0

OBS-URL: https://build.opensuse.org/request/show/894612
OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=55
This commit is contained in:
James Fehlig 2021-05-21 20:30:04 +00:00 committed by Git OBS Bridge
parent feed7a9ad4
commit 5bf71ba120
8 changed files with 61 additions and 57 deletions

View File

@ -1,28 +1,35 @@
Don't build virtctl for darwin and windows
From f8882298f6a38a61add3af08136e86830cc97796 Mon Sep 17 00:00:00 2001
From: Vasiliy Ulyanov <vulyanov@suse.de>
Date: Thu, 20 May 2021 10:42:24 +0200
Subject: [PATCH 1/2] Don't build virtctl for darwin and windows
Noticed the following build failure when specifying '-buildmode=pie'
in GOFLAGS
/usr/lib64/go/1.13/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: cannot
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: cannot
find 1144: No such file or directory
The failure was encountered when building virtctl for darwin and windows.
Remove the builds for these OSes.
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---
hack/build-go.sh | 9 ---------
1 file changed, 9 deletions(-)
Index: kubevirt-0.37.0/hack/build-go.sh
===================================================================
--- kubevirt-0.37.0.orig/hack/build-go.sh
+++ kubevirt-0.37.0/hack/build-go.sh
@@ -114,15 +114,6 @@ for arg in $args; do
diff --git a/hack/build-go.sh b/hack/build-go.sh
index 9e0f3fe22..d46310f36 100755
--- a/hack/build-go.sh
+++ b/hack/build-go.sh
@@ -125,15 +125,6 @@ for arg in $args; do
kubevirt::version::get_version_vars
echo "$KUBEVIRT_GIT_VERSION" >${CMD_OUT_DIR}/${BIN_NAME}/.version
-
- # build virtctl also for darwin and windows
- if [ "${BIN_NAME}" = "virtctl" ]; then
- # build virtctl also for darwin and windows on amd64
- if [ "${BIN_NAME}" = "virtctl" -a "${ARCH}" = "amd64" ]; then
- GOOS=darwin GOARCH=amd64 go_build -i -o ${CMD_OUT_DIR}/${BIN_NAME}/${ARCH_BASENAME}-darwin-amd64 -ldflags "$(kubevirt::version::ldflags)" $(pkg_dir darwin amd64)
- GOOS=windows GOARCH=amd64 go_build -i -o ${CMD_OUT_DIR}/${BIN_NAME}/${ARCH_BASENAME}-windows-amd64.exe -ldflags "$(kubevirt::version::ldflags)" $(pkg_dir windows amd64)
- # Create symlinks to the latest binary of each architecture
@ -32,3 +39,6 @@ Index: kubevirt-0.37.0/hack/build-go.sh
)
else
(
--
2.31.1

View File

@ -1,4 +1,7 @@
Don't use Bazel in build-manifests.sh
From 1228a2f14f4f3aeab91a43f7a71a74ecf61fb8f9 Mon Sep 17 00:00:00 2001
From: Vasiliy Ulyanov <vulyanov@suse.de>
Date: Thu, 20 May 2021 10:48:30 +0200
Subject: [PATCH 2/2] Don't use Bazel in build-manifests.sh
This is a partial revert of the commit
@ -8,20 +11,26 @@ which switches to using Bazel during manifests build. That in turn
does not work well during OBS build since Bazel tends to download
dependencies from the web.
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
---
hack/build-manifests.sh | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hack/build-manifests.sh b/hack/build-manifests.sh
index 79b8676b8..6add64769 100755
index c93f19e3f..abfd6fa07 100755
--- a/hack/build-manifests.sh
+++ b/hack/build-manifests.sh
@@ -33,20 +33,15 @@ kubevirt_logo_path="assets/kubevirt_logo.png"
@@ -33,19 +33,16 @@ kubevirt_logo_path="assets/kubevirt_logo.png"
rm -rf ${MANIFESTS_OUT_DIR}
rm -rf ${MANIFEST_TEMPLATES_OUT_DIR}
-rm -rf "${TESTS_OUT_DIR}/tools"
-mkdir -p "${TESTS_OUT_DIR}/tools"
-templator=${TESTS_OUT_DIR}/tools/manifest-templator
-
+templator=${KUBEVIRT_DIR}/tools/manifest-templator/manifest-templator
-bazel run \
- --config=${ARCHITECTURE} \
- --config=${HOST_ARCHITECTURE} \
- //:build-manifest-templator -- ${templator}
+(cd ${KUBEVIRT_DIR}/tools/manifest-templator/ && go_build)
@ -30,27 +39,10 @@ index 79b8676b8..6add64769 100755
for arg in $args; do
infile=${KUBEVIRT_DIR}/manifests/${arg}
outfile=${KUBEVIRT_DIR}/manifests/${arg}.tmp
- ${templator} \
+
+ ${KUBEVIRT_DIR}/tools/manifest-templator/manifest-templator \
${templator} \
--process-files \
--generated-manifests-dir=${KUBEVIRT_DIR}/manifests/generated/ \
--input-file=${infile} >${outfile}
@@ -75,7 +70,7 @@ for arg in $args; do
outfile=${final_out_dir}/${manifest}
template_outfile=${final_templates_out_dir}/${manifest}.j2
- ${templator} \
+ ${KUBEVIRT_DIR}/tools/manifest-templator/manifest-templator \
--process-vars \
--namespace=${namespace} \
--cdi-namespace=${cdi_namespace} \
@@ -103,7 +98,7 @@ for arg in $args; do
continue
fi
- ${templator} \
+ ${KUBEVIRT_DIR}/tools/manifest-templator/manifest-templator \
--process-vars \
--namespace="{{ namespace }}" \
--cdi-namespace="{{ cdi_namespace }}" \
--
2.31.1

View File

@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="filename">kubevirt</param>
<param name="revision">v0.40.0</param>
<param name="revision">v0.41.0</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="url">https://github.com/kubevirt/kubevirt</param>

View File

@ -1,14 +0,0 @@
Fix double free of VirDomain
diff --git a/pkg/virt-launcher/virtwrap/manager.go b/pkg/virt-launcher/virtwrap/manager.go
index a3fe15e39..660423269 100644
--- a/pkg/virt-launcher/virtwrap/manager.go
+++ b/pkg/virt-launcher/virtwrap/manager.go
@@ -1494,7 +1494,6 @@ func (l *LibvirtDomainManager) SyncVMI(vmi *v1.VirtualMachineInstance, useEmulat
if err != nil {
return nil, err
}
- defer dom.Free()
logger.Info("Domain defined.")
} else {
logger.Reason(err).Error("Getting the domain failed.")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:946d12e04b3489d323735296705c47903f42adefdccacae517c67ef5d681adf2
size 12769493

3
kubevirt-0.41.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:310312295755f9952486eda027e73a4b53ed7dce0e117df02e6c68288c406b6a
size 12858383

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu May 20 11:34:20 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Use git format-patch:
0001-Don-t-build-virtctl-for-darwin-and-windows.patch
0002-Don-t-use-Bazel-in-build-manifests.sh.patch
- Drop patches:
dont-build-virtctl-darwin.patch
dont-use-bazel-in-build-manifests.patch
fix-double-free-of-VirDomain.patch
-------------------------------------------------------------------
Thu May 20 08:52:49 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>
- Update to version 0.41.0
Release notes https://github.com/kubevirt/kubevirt/releases/tag/v0.41.0
-------------------------------------------------------------------
Tue May 18 05:15:45 UTC 2021 - Vasily Ulyanov <vasily.ulyanov@suse.com>

View File

@ -17,7 +17,7 @@
Name: kubevirt
Version: 0.40.0
Version: 0.41.0
Release: 0
Summary: Container native virtualization
License: Apache-2.0
@ -28,9 +28,8 @@ Source1: kubevirt-psp-caasp.yaml
Source2: kubevirt_containers_meta
Source3: kubevirt_containers_meta.service
Source100: %{name}-rpmlintrc
Patch0: dont-build-virtctl-darwin.patch
Patch1: dont-use-bazel-in-build-manifests.patch
Patch2: fix-double-free-of-VirDomain.patch
Patch0: 0001-Don-t-build-virtctl-for-darwin-and-windows.patch
Patch1: 0002-Don-t-use-Bazel-in-build-manifests.sh.patch
BuildRequires: glibc-devel-static
BuildRequires: golang-packaging
BuildRequires: pkgconfig