moby/hyperkit

Hyperkit Build from Release Tarball Fails Assertions Related to Git Version

dshick-nydig opened this issue · 0 comments

Makefile issue:

hyperkit/Makefile

Lines 1 to 2 in adc4ea8

GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)
GIT_VERSION_SHA1 := $(shell git rev-parse HEAD)

Release tarballs are not git repositories. This causes failed assertions when connecting with VPNKit.

Assertion failed: (sizeof(VERSION_SHA1) == sizeof(init_msg.commit) + 1), function vpnkit_connect
, file src/lib/pci_virtio_net_vpnkit.c, line 324.

Failed Assertion:

/* msg.commit is not NULL terminated */
assert(sizeof(VERSION_SHA1) == sizeof(init_msg.commit) + 1);
memcpy(&init_msg.commit, VERSION_SHA1, sizeof(init_msg.commit));

This causes problems for the homebrew build of hyperkit: Homebrew/homebrew-core#85232