From 38fadba9e88dcaa6644bdc0e7bf23e849f77240d Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Thu, 23 Jun 2022 14:21:52 +0200 Subject: [PATCH 1/3] Create database copy in tmp directory (#974) Signed-off-by: perdasilva Upstream-repository: operator-registry Upstream-commit: 79e8f2518d57040e604ef4a68c9edef199d7d653 --- staging/operator-registry/pkg/lib/tmp/copy.go | 2 +- .../operator-framework/operator-registry/pkg/lib/tmp/copy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/staging/operator-registry/pkg/lib/tmp/copy.go b/staging/operator-registry/pkg/lib/tmp/copy.go index c61e04c6a7..bbad3cf4c0 100644 --- a/staging/operator-registry/pkg/lib/tmp/copy.go +++ b/staging/operator-registry/pkg/lib/tmp/copy.go @@ -9,7 +9,7 @@ import ( // CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err func CopyTmpDB(original string) (path string, err error) { - dst, err := ioutil.TempFile(".", "db-") + dst, err := ioutil.TempFile("tmp", "db-") if err != nil { return "", err } diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go b/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go index c61e04c6a7..bbad3cf4c0 100644 --- a/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go +++ b/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go @@ -9,7 +9,7 @@ import ( // CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err func CopyTmpDB(original string) (path string, err error) { - dst, err := ioutil.TempFile(".", "db-") + dst, err := ioutil.TempFile("tmp", "db-") if err != nil { return "", err } From 677c7cd0dac5adea54535bfca5349c0f58c610b9 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Thu, 23 Jun 2022 15:05:50 +0200 Subject: [PATCH 2/3] Fix /tmp path (#975) Signed-off-by: perdasilva Upstream-repository: operator-registry Upstream-commit: d42dcfa2db71e1d64f3fce74faff713662c94eff --- staging/operator-registry/pkg/lib/tmp/copy.go | 2 +- .../operator-framework/operator-registry/pkg/lib/tmp/copy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/staging/operator-registry/pkg/lib/tmp/copy.go b/staging/operator-registry/pkg/lib/tmp/copy.go index bbad3cf4c0..debb3f0d6b 100644 --- a/staging/operator-registry/pkg/lib/tmp/copy.go +++ b/staging/operator-registry/pkg/lib/tmp/copy.go @@ -9,7 +9,7 @@ import ( // CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err func CopyTmpDB(original string) (path string, err error) { - dst, err := ioutil.TempFile("tmp", "db-") + dst, err := ioutil.TempFile("/tmp", "db-") if err != nil { return "", err } diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go b/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go index bbad3cf4c0..debb3f0d6b 100644 --- a/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go +++ b/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go @@ -9,7 +9,7 @@ import ( // CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err func CopyTmpDB(original string) (path string, err error) { - dst, err := ioutil.TempFile("tmp", "db-") + dst, err := ioutil.TempFile("/tmp", "db-") if err != nil { return "", err } From 5e53128aa00795146f390cacbed903159c49c040 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Thu, 23 Jun 2022 15:39:54 +0200 Subject: [PATCH 3/3] use "" instead of /tmp (#976) Signed-off-by: perdasilva Upstream-repository: operator-registry Upstream-commit: b080d080c494e20caecc035ebd14177a2e8e7a58 --- staging/operator-registry/pkg/lib/tmp/copy.go | 2 +- .../operator-framework/operator-registry/pkg/lib/tmp/copy.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/staging/operator-registry/pkg/lib/tmp/copy.go b/staging/operator-registry/pkg/lib/tmp/copy.go index debb3f0d6b..52a247f418 100644 --- a/staging/operator-registry/pkg/lib/tmp/copy.go +++ b/staging/operator-registry/pkg/lib/tmp/copy.go @@ -9,7 +9,7 @@ import ( // CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err func CopyTmpDB(original string) (path string, err error) { - dst, err := ioutil.TempFile("/tmp", "db-") + dst, err := ioutil.TempFile("", "db-") if err != nil { return "", err } diff --git a/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go b/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go index debb3f0d6b..52a247f418 100644 --- a/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go +++ b/vendor/github.com/operator-framework/operator-registry/pkg/lib/tmp/copy.go @@ -9,7 +9,7 @@ import ( // CopyTmpDB reads the file at the given path and copies it to a tmp directory, returning the copied file path or an err func CopyTmpDB(original string) (path string, err error) { - dst, err := ioutil.TempFile("/tmp", "db-") + dst, err := ioutil.TempFile("", "db-") if err != nil { return "", err }