finch
finch copied to clipboard
`/opt/finch/bin/socket_vmnet --version` shows the commit hash of `runfinch/finch`, not the commit hash of `lima-vm/socket_vmnet`
Describe the bug
/opt/finch/bin/socket_vmnet --version
shows the commit hash of https://github.com/runfinch/finch, not the commit hash of https://github.com/lima-vm/socket_vmnet
Steps to reproduce
$ finch version
Finch version: v0.1.0
$ /opt/finch/bin/socket_vmnet --version
a16a541
This commit hash exists (https://github.com/runfinch/finch/commit/a16a541) on https://github.com/runfinch/finch , but does not exist on https://github.com/lima-vm/socket_vmnet/commit/a16a541
Expected behavior
It should print a valid commit hash of https://github.com/lima-vm/socket_vmnet
Additional context
/opt/finch/bin/socket_vmnet
seems built from https://github.com/runfinch/finch-core/blob/4e5d8285fa98ef0b851aab095c81a8bf30683f27/Makefile#L21 but the version is accidentally set to the version of https://github.com/runfinch/finch ?
Confirmed that the commit hash is wrong, and from the finch initial commit. Investigating
Since we are building socket_vment from a tarball instead of a git repo / submodule, it's picking up the commit hash from the wrong repo when this line in the socket_vmnet Makefile is executed:
VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)
I think the fix is to set a VERSION parameter here, something like:
SOCKET_VMNET_VERSION := $(or $(SOCKET_VMNET_VERSION),"8b16e51")
...
cd $(SOCKET_VMNET_DEPDIR) && PREFIX=$(SOCKET_VMNET_TEMP_PREFIX) VERSION=$(SOCKET_VMNET_VERSION) $(MAKE) install.bin
Will link to the related finch-core PR when its available.