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'
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 
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 <jfehlig@suse.com>

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
 
             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
-                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
         )
     else
         (
openSUSE Build Service is sponsored by