mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
Bump to Buildah v1.41.0
Bump Buildah to v1.41.0 in preparation for Podman v5.6 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
2
vendor/github.com/containers/buildah/internal/mkcw/workload.go
generated
vendored
2
vendor/github.com/containers/buildah/internal/mkcw/workload.go
generated
vendored
@@ -92,7 +92,7 @@ func ReadWorkloadConfigFromImage(path string) (WorkloadConfig, error) {
|
||||
}
|
||||
err = json.Unmarshal(configBytes, &wc)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("unmarshaling configuration %q: %w", string(configBytes), err)
|
||||
err = fmt.Errorf("unmarshalling configuration %q: %w", string(configBytes), err)
|
||||
}
|
||||
return wc, err
|
||||
}
|
||||
|
||||
6
vendor/github.com/containers/buildah/internal/types.go
generated
vendored
6
vendor/github.com/containers/buildah/internal/types.go
generated
vendored
@@ -6,8 +6,10 @@ const (
|
||||
// external items which are downloaded for a build, typically a tarball
|
||||
// being used as an additional build context.
|
||||
BuildahExternalArtifactsDir = "buildah-external-artifacts"
|
||||
// SourceDateEpochName is the name of the SOURCE_DATE_EPOCH environment
|
||||
// variable when it's read from the environment by our main().
|
||||
// SourceDateEpochName is both the name of the SOURCE_DATE_EPOCH
|
||||
// environment variable and the built-in ARG that carries its value,
|
||||
// whether it's read from the environment by our main(), or passed in
|
||||
// via CLI or API flags.
|
||||
SourceDateEpochName = "SOURCE_DATE_EPOCH"
|
||||
)
|
||||
|
||||
|
||||
15
vendor/github.com/containers/buildah/internal/util/util.go
generated
vendored
15
vendor/github.com/containers/buildah/internal/util/util.go
generated
vendored
@@ -54,8 +54,7 @@ func NormalizePlatform(platform v1.Platform) v1.Platform {
|
||||
func ExportFromReader(input io.Reader, opts define.BuildOutputOption) error {
|
||||
var err error
|
||||
if !filepath.IsAbs(opts.Path) {
|
||||
opts.Path, err = filepath.Abs(opts.Path)
|
||||
if err != nil {
|
||||
if opts.Path, err = filepath.Abs(opts.Path); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -72,26 +71,22 @@ func ExportFromReader(input io.Reader, opts define.BuildOutputOption) error {
|
||||
noLChown = true
|
||||
}
|
||||
|
||||
err = os.MkdirAll(opts.Path, 0o700)
|
||||
if err != nil {
|
||||
if err = os.MkdirAll(opts.Path, 0o700); err != nil {
|
||||
return fmt.Errorf("failed while creating the destination path %q: %w", opts.Path, err)
|
||||
}
|
||||
|
||||
err = chrootarchive.Untar(input, opts.Path, &archive.TarOptions{NoLchown: noLChown})
|
||||
if err != nil {
|
||||
if err = chrootarchive.Untar(input, opts.Path, &archive.TarOptions{NoLchown: noLChown}); err != nil {
|
||||
return fmt.Errorf("failed while performing untar at %q: %w", opts.Path, err)
|
||||
}
|
||||
} else {
|
||||
outFile := os.Stdout
|
||||
if !opts.IsStdout {
|
||||
outFile, err = os.Create(opts.Path)
|
||||
if err != nil {
|
||||
if outFile, err = os.Create(opts.Path); err != nil {
|
||||
return fmt.Errorf("failed while creating destination tar at %q: %w", opts.Path, err)
|
||||
}
|
||||
defer outFile.Close()
|
||||
}
|
||||
_, err = io.Copy(outFile, input)
|
||||
if err != nil {
|
||||
if _, err = io.Copy(outFile, input); err != nil {
|
||||
return fmt.Errorf("failed while performing copy to %q: %w", opts.Path, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user