summaryrefslogtreecommitdiff
path: root/vendor/github.com/openshift/imagebuilder
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-03-29 07:31:23 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-04-08 09:02:52 -0400
commitdc17195bd9d1027b19c3e7f0975f17f4ebda408a (patch)
tree223a7caf22ee81fbd6a01d166c0821db4d413616 /vendor/github.com/openshift/imagebuilder
parentf838333b7e6fae09f3ee9116b84c6e6482367298 (diff)
downloadpodman-dc17195bd9d1027b19c3e7f0975f17f4ebda408a.tar.gz
podman-dc17195bd9d1027b19c3e7f0975f17f4ebda408a.tar.bz2
podman-dc17195bd9d1027b19c3e7f0975f17f4ebda408a.zip
Vendor in new opencontainers/selinux
Also update vendor of containers/common,buildah,storage,image Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2069586 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/openshift/imagebuilder')
-rw-r--r--vendor/github.com/openshift/imagebuilder/builder.go16
-rw-r--r--vendor/github.com/openshift/imagebuilder/imagebuilder.spec2
2 files changed, 16 insertions, 2 deletions
diff --git a/vendor/github.com/openshift/imagebuilder/builder.go b/vendor/github.com/openshift/imagebuilder/builder.go
index b0e9d4f51..71dc41ea5 100644
--- a/vendor/github.com/openshift/imagebuilder/builder.go
+++ b/vendor/github.com/openshift/imagebuilder/builder.go
@@ -44,6 +44,7 @@ type Run struct {
type Executor interface {
Preserve(path string) error
EnsureContainerPath(path string) error
+ EnsureContainerPathAs(path, user string, mode *os.FileMode) error
Copy(excludes []string, copies ...Copy) error
Run(run Run, config docker.Config) error
UnrecognizedInstruction(step *Step) error
@@ -61,6 +62,15 @@ func (logExecutor) EnsureContainerPath(path string) error {
return nil
}
+func (logExecutor) EnsureContainerPathAs(path, user string, mode *os.FileMode) error {
+ if mode != nil {
+ log.Printf("ENSURE %s AS %q with MODE=%q", path, user, *mode)
+ } else {
+ log.Printf("ENSURE %s AS %q", path, user)
+ }
+ return nil
+}
+
func (logExecutor) Copy(excludes []string, copies ...Copy) error {
for _, c := range copies {
log.Printf("COPY %v -> %s (from:%s download:%t), chown: %s, chmod %s", c.Src, c.Dest, c.From, c.Download, c.Chown, c.Chmod)
@@ -88,6 +98,10 @@ func (noopExecutor) EnsureContainerPath(path string) error {
return nil
}
+func (noopExecutor) EnsureContainerPathAs(path, user string, mode *os.FileMode) error {
+ return nil
+}
+
func (noopExecutor) Copy(excludes []string, copies ...Copy) error {
return nil
}
@@ -378,7 +392,7 @@ func (b *Builder) Run(step *Step, exec Executor, noRunsRemaining bool) error {
}
if len(b.RunConfig.WorkingDir) > 0 {
- if err := exec.EnsureContainerPath(b.RunConfig.WorkingDir); err != nil {
+ if err := exec.EnsureContainerPathAs(b.RunConfig.WorkingDir, b.RunConfig.User, nil); err != nil {
return err
}
}
diff --git a/vendor/github.com/openshift/imagebuilder/imagebuilder.spec b/vendor/github.com/openshift/imagebuilder/imagebuilder.spec
index 79d16ec39..6a88a4fc4 100644
--- a/vendor/github.com/openshift/imagebuilder/imagebuilder.spec
+++ b/vendor/github.com/openshift/imagebuilder/imagebuilder.spec
@@ -12,7 +12,7 @@
#
%global golang_version 1.8.1
-%{!?version: %global version 1.2.2-dev}
+%{!?version: %global version 1.2.3}
%{!?release: %global release 1}
%global package_name imagebuilder
%global product_name Container Image Builder