From 62f0bb3c7f716b8d2eb0597a562f86a0259e9eb8 Mon Sep 17 00:00:00 2001 From: jiazhiguang Date: Fri, 4 Sep 2020 21:02:45 +0800 Subject: [PATCH] supports build and sign enclave on host of CentOS 7.1 OS --- shim/runtime/v2/rune/v2/rune.go | 6 +++--- shim/runtime/v2/rune/v2/service.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shim/runtime/v2/rune/v2/rune.go b/shim/runtime/v2/rune/v2/rune.go index 2caaddc..6f84bb9 100644 --- a/shim/runtime/v2/rune/v2/rune.go +++ b/shim/runtime/v2/rune/v2/rune.go @@ -97,9 +97,9 @@ func (s *service) carrierMain(req *taskAPI.CreateTaskRequest) (carrier.Carrier, } timeStart = time.Now() materialRealPath := signingMaterial - if carrierKind == rune.Occlum { - materialRealPath = filepath.Join(req.Bundle, signingMaterial) - } + //if carrierKind == rune.Occlum { + // materialRealPath = filepath.Join(req.Bundle, signingMaterial) + //} if cfg.Signature.ServerAddress == "" { publicKey, signature, err = mockSign(materialRealPath) if err != nil { diff --git a/shim/runtime/v2/rune/v2/service.go b/shim/runtime/v2/rune/v2/service.go index 10f8a9b..691639e 100644 --- a/shim/runtime/v2/rune/v2/service.go +++ b/shim/runtime/v2/rune/v2/service.go @@ -329,10 +329,10 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ * timeStart = time.Now() container, err := runc.NewContainer(ctx, s.platform, r) - /*if carr.Name() == "occlum" { + /*//FIXME debug + if carrierKind == "occlum" { //if err != nil { // logrus.Errorf("rune Create NewContainer error: %++v", err) - //FIXME debug if _, err := os.Stat(r.Bundle); err == nil { path := "/tmp/rune-container-test/runc-rootfs" os.RemoveAll(path) -- GitLab