runtime: skip golang version check in OBS pkg

Skip the golang version check when building the runtime, passing to make
`SKIP_GO_VERSION_CHECK=1`. This check requires yq, that's not packaged
for most distributions and it can't be downloaded at build time on OBS.
It is the responsibility of the package maintainer to verify that the
correct golang version is used.

Fixes: #242

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
Marco Vedovati
2018-11-19 19:22:36 +01:00
parent 08956e4a4c
commit 3084801cd8
2 changed files with 11 additions and 3 deletions

View File

@@ -27,7 +27,10 @@ override_dh_auto_build:
tar xzf /usr/src/packages/SOURCES/go$(GO_VERSION).linux-@GO_ARCH@.tar.gz -C /usr/src/packages/BUILD/local
ln -s /usr/src/packages/BUILD /usr/src/packages/BUILD/go/src/$(IMPORTNAME)
cd $(GOPATH)/src/$(IMPORTNAME)/; \
make QEMUPATH=/usr/bin/$(DEFAULT_QEMU) COMMIT=@HASH@
make \
QEMUPATH=/usr/bin/$(DEFAULT_QEMU) \
COMMIT=@HASH@ \
SKIP_GO_VERSION_CHECK=1
override_dh_auto_install:
mkdir -p debian/$(PKG_NAME)
@@ -37,6 +40,7 @@ override_dh_auto_install:
DESTDIR=$(shell pwd)/debian/$(PKG_NAME)/ \
PREFIX=/usr \
COMMIT=@HASH@ \
QEMUPATH=/usr/bin/$(DEFAULT_QEMU)
QEMUPATH=/usr/bin/$(DEFAULT_QEMU) \
SKIP_GO_VERSION_CHECK=1
sed -i -e '/^initrd =/d' $(shell pwd)/debian/$(PKG_NAME)/usr/share/defaults/kata-containers/configuration.toml

View File

@@ -69,7 +69,10 @@ export GOPATH=$HOME/rpmbuild/BUILD/go/
mkdir -p $HOME/rpmbuild/BUILD/go/src/%{DOMAIN}/%{ORG}
ln -s $HOME/rpmbuild/BUILD/kata-runtime-%{version} $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
cd $HOME/rpmbuild/BUILD/go/src/%{IMPORTNAME}
make QEMUPATH=/usr/bin/%{DEFAULT_QEMU} COMMIT=@HASH@
make \
QEMUPATH=/usr/bin/%{DEFAULT_QEMU} \
COMMIT=@HASH@ \
SKIP_GO_VERSION_CHECK=1
%check
export http_proxy=http://127.0.0.1:9/
@@ -88,6 +91,7 @@ make \
PREFIX=/usr \
QEMUPATH=/usr/bin/%{DEFAULT_QEMU} \
COMMIT=@HASH@ \
SKIP_GO_VERSION_CHECK=1 \
install
sed -i -e '/^initrd =/d' %{buildroot}/usr/share/defaults/kata-containers/configuration.toml