Skip to content

Commit 7a009cc

Browse files
Merge pull request #25688 from evidolob/use-gvisor-from-gomod
Use gvisor-tap-vsock version from go.mod file
2 parents a75cba0 + ce0617e commit 7a009cc

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ endif
218218

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

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

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

871871
.PHONY: rpm
872872
rpm: ## Build rpm packages

contrib/pkginstaller/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ifeq ($(ARCH), aarch64)
66
else
77
GOARCH:=$(ARCH)
88
endif
9-
GVPROXY_VERSION ?= 0.8.4
9+
GVPROXY_VERSION ?= $(shell grep github.com/containers/gvisor-tap-vsock ../../go.mod | cut -d" " -f2)
1010
VFKIT_VERSION ?= 0.6.1
1111
KRUNKIT_VERSION ?= 0.2.0
1212
GVPROXY_RELEASE_URL ?= https://github.com/containers/gvisor-tap-vsock/releases/download/v$(GVPROXY_VERSION)/gvproxy-darwin

winmake.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ function Win-SSHProxy {
7272

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

0 commit comments

Comments
 (0)