snap: apply patch in runtime to fix config paths

This is a hotfix to fix https://github.com/kata-containers/runtime/issues/1185

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2019-01-28 09:15:36 -06:00
parent 7c25b606ba
commit 7d77ae9ca8
2 changed files with 25 additions and 0 deletions

22
snap/1185-runtime.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/cli/main.go b/cli/main.go
index a01a02dc5..a021a0a77 100644
--- a/cli/main.go
+++ b/cli/main.go
@@ -250,6 +250,8 @@ func beforeSubcommands(c *cli.Context) error {
var runtimeConfig oci.RuntimeConfig
var err error
+ katautils.SetConfigOptions(name, defaultRuntimeConfiguration, defaultSysConfRuntimeConfiguration)
+
handleShowConfig(c)
if userWantsUsage(c) || (c.NArg() == 1 && (c.Args()[0] == checkCmd)) {
@@ -302,8 +304,6 @@ func beforeSubcommands(c *cli.Context) error {
ignoreLogging = true
}
- katautils.SetConfigOptions(name, defaultRuntimeConfiguration, defaultSysConfRuntimeConfiguration)
-
configFile, runtimeConfig, err = katautils.LoadConfiguration(c.GlobalString(configFilePathOption), ignoreLogging, false)
if err != nil {
fatal(err)

View File

@ -34,6 +34,7 @@ parts:
override-build: |
pkg_name=runtime
patch1="$(realpath ../../../snap/1162-runtime.patch)"
patch2="$(realpath ../../../snap/1185-runtime.patch)"
# set GOPATH
export GOPATH=$(realpath go)
@ -49,6 +50,8 @@ parts:
#Issue: https://github.com/kata-containers/runtime/pull/1162
patch -p1 < "${patch1}"
#Issue: https://github.com/kata-containers/runtime/issues/1185
patch -p1 < "${patch2}"
# build and install
make \