Skip to content

Use gvisor-tap-vsock version from go.mod file #25688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ endif

# gvisor-tap-vsock version for gvproxy.exe and win-sshproxy.exe downloads
# the upstream project ships pre-built binaries since version 0.7.1
GV_VERSION=v0.8.4
GVPROXY_VERSION=$(shell grep github.com/containers/gvisor-tap-vsock go.mod | cut -d" " -f2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps something like this instead (untested):

GVPROXY_VERSION=$(shell $(GO) list -m -f '{{.Version}}' github.com/containers/gvisor-tap-vsock)


###
### Primary entry-point targets
Expand Down Expand Up @@ -861,12 +861,12 @@ podman-remote-release-%.zip: test/version/version ## Build podman-remote for %=$
if [[ "$(GOARCH)" != "$(NATIVE_GOARCH)" ]]; then $(MAKE) clean-binaries; fi
-rm -rf "$(tmpsubdir)"

# Downloads pre-built gvproxy and win-sshproxy helpers. See comment on GV_VERSION declaration
# Downloads pre-built gvproxy and win-sshproxy helpers. See comment on GVPROXY_VERSION declaration
.PHONY: win-gvproxy
win-gvproxy: test/version/version
mkdir -p bin/windows/
curl -sSL -o bin/windows/gvproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GV_VERSION)/gvproxy-windowsgui.exe
curl -sSL -o bin/windows/win-sshproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GV_VERSION)/win-sshproxy.exe
curl -sSL -o bin/windows/gvproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/gvproxy-windowsgui.exe
curl -sSL -o bin/windows/win-sshproxy.exe --retry 5 https://github.com/containers/gvisor-tap-vsock/releases/download/$(GVPROXY_VERSION)/win-sshproxy.exe

.PHONY: rpm
rpm: ## Build rpm packages
Expand Down
2 changes: 1 addition & 1 deletion contrib/pkginstaller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ifeq ($(ARCH), aarch64)
else
GOARCH:=$(ARCH)
endif
GVPROXY_VERSION ?= 0.8.4
GVPROXY_VERSION ?= $(shell grep github.com/containers/gvisor-tap-vsock ../../go.mod | cut -d" " -f2)
VFKIT_VERSION ?= 0.6.0
KRUNKIT_VERSION ?= 0.2.0
GVPROXY_RELEASE_URL ?= https://github.com/containers/gvisor-tap-vsock/releases/download/v$(GVPROXY_VERSION)/gvproxy-darwin
Expand Down
3 changes: 2 additions & 1 deletion winmake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ function Win-SSHProxy {

New-Item -ItemType Directory -Force -Path "./bin/windows"
if (-Not $Version) {
$Version = "v0.8.4"
$match = Select-String -Path "$PSScriptRoot\go.mod" -Pattern "github.com/containers/gvisor-tap-vsock\s+(v[\d\.]+)"
$Version = $match.Matches.Groups[1].Value
}
curl.exe -sSL -o "./bin/windows/gvproxy.exe" --retry 5 "https://github.com/containers/gvisor-tap-vsock/releases/download/$Version/gvproxy-windowsgui.exe"
curl.exe -sSL -o "./bin/windows/win-sshproxy.exe" --retry 5 "https://github.com/containers/gvisor-tap-vsock/releases/download/$Version/win-sshproxy.exe"
Expand Down