- Fix -buildmode=pie fix-goflags-overwrite.patch, dont-build-virtctl-darwin.patch OBS-URL: https://build.opensuse.org/request/show/848440 OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=23
35 lines
1.6 KiB
Diff
35 lines
1.6 KiB
Diff
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.35.0/hack/build-go.sh
|
|
===================================================================
|
|
--- kubevirt-0.35.0.orig/hack/build-go.sh
|
|
+++ kubevirt-0.35.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
|
|
(
|