mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-08 03:24:15 +00:00
snap: apply patch in runtime to fix DESTDIR
This is a hotfix to fix https://github.com/kata-containers/runtime/pull/1162 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
526c5ffd76
commit
7c25b606ba
27
snap/1162-runtime.patch
Normal file
27
snap/1162-runtime.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 1c11f74..9c4709b 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -248,11 +248,11 @@ ifeq (,$(findstring $(DEFAULT_HYPERVISOR),$(KNOWN_HYPERVISORS)))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(DEFAULT_HYPERVISOR),$(HYPERVISOR_QEMU))
|
||||||
|
- DEFAULT_HYPERVISOR_CONFIG_PATH = $(CONFIG_PATH_QEMU)
|
||||||
|
+ DEFAULT_HYPERVISOR_CONFIG_FILE = $(CONFIG_FILE_QEMU)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(DEFAULT_HYPERVISOR),$(HYPERVISOR_FC))
|
||||||
|
- DEFAULT_HYPERVISOR_CONFIG_PATH = $(CONFIG_PATH_FC)
|
||||||
|
+ DEFAULT_HYPERVISOR_CONFIG_FILE = $(CONFIG_FILE_FC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CONFDIR := $(DEFAULTSDIR)/$(PROJECT_DIR)
|
||||||
|
@@ -546,7 +546,7 @@ install-bin-libexec: $(BINLIBEXECLIST)
|
||||||
|
|
||||||
|
install-configs: $(CONFIGS)
|
||||||
|
$(QUIET_INST)$(foreach f,$(CONFIGS),$(call INSTALL_CONFIG,$f,$(dir $(CONFIG_PATH))))
|
||||||
|
- $(QUIET_INST)ln -sf $(DEFAULT_HYPERVISOR_CONFIG_PATH) $(CONFIG_PATH)
|
||||||
|
+ $(QUIET_INST)(cd $(dir $(DESTDIR)/$(CONFIG_PATH)) && ln -sf $(DEFAULT_HYPERVISOR_CONFIG_FILE) $(CONFIG_FILE))
|
||||||
|
|
||||||
|
install-scripts: $(SCRIPTS)
|
||||||
|
$(QUIET_INST)$(foreach f,$(SCRIPTS),$(call INSTALL_EXEC,$f,$(SCRIPTS_DIR)))
|
@ -33,6 +33,7 @@ parts:
|
|||||||
build-attributes: [no-patchelf]
|
build-attributes: [no-patchelf]
|
||||||
override-build: |
|
override-build: |
|
||||||
pkg_name=runtime
|
pkg_name=runtime
|
||||||
|
patch1="$(realpath ../../../snap/1162-runtime.patch)"
|
||||||
|
|
||||||
# set GOPATH
|
# set GOPATH
|
||||||
export GOPATH=$(realpath go)
|
export GOPATH=$(realpath go)
|
||||||
@ -46,6 +47,9 @@ parts:
|
|||||||
git clone -b ${SNAPCRAFT_PROJECT_VERSION} https://github.com/kata-containers/${pkg_name} ${pkg_gopath}
|
git clone -b ${SNAPCRAFT_PROJECT_VERSION} https://github.com/kata-containers/${pkg_name} ${pkg_gopath}
|
||||||
cd ${pkg_gopath}
|
cd ${pkg_gopath}
|
||||||
|
|
||||||
|
#Issue: https://github.com/kata-containers/runtime/pull/1162
|
||||||
|
patch -p1 < "${patch1}"
|
||||||
|
|
||||||
# build and install
|
# build and install
|
||||||
make \
|
make \
|
||||||
PREFIX=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr \
|
PREFIX=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr \
|
||||||
|
Loading…
Reference in New Issue
Block a user