vendor: bump to buildah ca578b290144 and use new cache API

Bump to buildah ca578b290144 and use new `cacheTo` and `cacheFrom` API.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
Aditya R
2022-12-20 17:12:55 +05:30
parent fb967aabc3
commit 987c8e3a78
34 changed files with 225 additions and 210 deletions

View File

@@ -7,7 +7,6 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -70,7 +69,7 @@ func setChildProcess() error {
// Run runs the specified command in the container's root filesystem.
func (b *Builder) Run(command []string, options RunOptions) error {
p, err := ioutil.TempDir("", define.Package)
p, err := os.MkdirTemp("", define.Package)
if err != nil {
return err
}
@@ -480,7 +479,7 @@ func setupRootlessNetwork(pid int) (teardown func(), err error) {
defer rootlessSlirpSyncR.Close()
// Be sure there are no fds inherited to slirp4netns except the sync pipe
files, err := ioutil.ReadDir("/proc/self/fd")
files, err := os.ReadDir("/proc/self/fd")
if err != nil {
return nil, fmt.Errorf("cannot list open fds: %w", err)
}
@@ -1199,8 +1198,8 @@ func checkIdsGreaterThan5(ids []spec.LinuxIDMapping) bool {
return false
}
// If this function succeeds and returns a non-nil lockfile.Locker, the caller must unlock it (when??).
func (b *Builder) getCacheMount(tokens []string, stageMountPoints map[string]internal.StageMountDetails, idMaps IDMaps) (*spec.Mount, lockfile.Locker, error) {
// If this function succeeds and returns a non-nil *lockfile.LockFile, the caller must unlock it (when??).
func (b *Builder) getCacheMount(tokens []string, stageMountPoints map[string]internal.StageMountDetails, idMaps IDMaps) (*spec.Mount, *lockfile.LockFile, error) {
var optionMounts []specs.Mount
mount, targetLock, err := internalParse.GetCacheMount(tokens, b.store, b.MountLabel, stageMountPoints)
if err != nil {