Files
kata-containers/obs-packaging/runtime/debian.rules-template
Marco Vedovati 3084801cd8 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>
2018-11-20 11:47:35 +01:00

47 lines
1.3 KiB
Makefile

#!/usr/bin/make -f
export DH_VERBOSE = 1
export PKG_NAME=kata-runtime
export DOMAIN=github.com
export ORG=kata-containers
export PROJECT=runtime
export IMPORTNAME=$(DOMAIN)/$(ORG)/$(PROJECT)
export DH_GOPKG:=$(IMPORTNAME)
export DEB_BUILD_OPTIONS=nocheck
export PATH:=/usr/src/packages/BUILD/local/go/bin:$(PATH)
export GOPATH=/usr/src/packages/BUILD/go
export GOROOT=/usr/src/packages/BUILD/local/go
export DH_OPTIONS
export DEFAULT_QEMU=qemu-lite-system-x86_64
GO_VERSION=@GO_VERSION@
%:
dh $@
override_dh_auto_clean:
override_dh_auto_build:
mkdir -p /usr/src/packages/BUILD/local/
mkdir -p /usr/src/packages/BUILD/go/src/$(DOMAIN)/$(ORG)/
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@ \
SKIP_GO_VERSION_CHECK=1
override_dh_auto_install:
mkdir -p debian/$(PKG_NAME)
cd $(GOPATH)/src/$(IMPORTNAME)/; \
make install \
DESTDIR=$(shell pwd)/debian/$(PKG_NAME)/ \
PREFIX=/usr \
COMMIT=@HASH@ \
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