File dont-build-virtctl-darwin.patch of Package kubevirt.22268

Don't build virtctl for darwin and windows

Noticed the following build failure when specifying '-buildmode=pie'

/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 
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: Jim Fehlig <>

Index: kubevirt-0.37.0/hack/
--- kubevirt-0.37.0.orig/hack/
+++ kubevirt-0.37.0/hack/
@@ -114,15 +114,6 @@ for arg in $args; do
             echo "$KUBEVIRT_GIT_VERSION" >${CMD_OUT_DIR}/${BIN_NAME}/.version
-            # build virtctl also for darwin and windows
-            if [ "${BIN_NAME}" = "virtctl" ]; 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
-                (cd ${CMD_OUT_DIR}/${BIN_NAME} && ln -sf ${ARCH_BASENAME}-darwin-amd64 ${BIN_NAME}-darwin)
-                (cd ${CMD_OUT_DIR}/${BIN_NAME} && ln -sf ${ARCH_BASENAME}-windows-amd64.exe ${BIN_NAME}-windows.exe)
-            fi
openSUSE Build Service is sponsored by