vendor: update common and buildah

vendor the following dependencies:

- https://github.com/containers/common/pull/2375
- https://github.com/containers/buildah/pull/6074

Closes: https://github.com/containers/podman/issues/25634

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2025-03-20 11:57:58 +01:00
parent 94e77af09d
commit 260035d069
49 changed files with 566 additions and 639 deletions

View File

@@ -3,6 +3,7 @@ package imagebuilder
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"log"
"os"
@@ -716,14 +717,14 @@ var builtinAllowedBuildArgs = map[string]bool{
"no_proxy": true,
}
// ParseIgnore returns a list of the excludes in the specified path
// path should be a file with the .dockerignore format
// ParseIgnoreReader returns a list of the excludes in the provided file
// which uses the .dockerignore format
// extracted from fsouza/go-dockerclient and modified to drop comments and
// empty lines.
func ParseIgnore(path string) ([]string, error) {
func ParseIgnoreReader(r io.Reader) ([]string, error) {
var excludes []string
ignores, err := ioutil.ReadFile(path)
ignores, err := io.ReadAll(r)
if err != nil {
return excludes, err
}
@@ -739,6 +740,18 @@ func ParseIgnore(path string) ([]string, error) {
return excludes, nil
}
// ParseIgnore returns a list returned by having ParseIgnoreReader() read the
// specified path
func ParseIgnore(path string) ([]string, error) {
var excludes []string
ignores, err := ioutil.ReadFile(path)
if err != nil {
return excludes, err
}
return ParseIgnoreReader(bytes.NewReader(ignores))
}
// ParseDockerIgnore returns a list of the excludes in the .containerignore or .dockerignore file.
func ParseDockerignore(root string) ([]string, error) {
excludes, err := ParseIgnore(filepath.Join(root, ".containerignore"))

View File

@@ -41,18 +41,11 @@ var builtinArgDefaults = map[string]string{
"TARGETPLATFORM": localspec.OS + "/" + localspec.Architecture,
"TARGETOS": localspec.OS,
"TARGETARCH": localspec.Architecture,
"TARGETVARIANT": localspec.Variant,
"TARGETVARIANT": "",
"BUILDPLATFORM": localspec.OS + "/" + localspec.Architecture,
"BUILDOS": localspec.OS,
"BUILDARCH": localspec.Architecture,
"BUILDVARIANT": localspec.Variant,
}
func init() {
if localspec.Variant != "" {
builtinArgDefaults["TARGETPLATFORM"] = builtinArgDefaults["TARGETPLATFORM"] + "/" + localspec.Variant
builtinArgDefaults["BUILDPLATFORM"] = builtinArgDefaults["BUILDPLATFORM"] + "/" + localspec.Variant
}
"BUILDVARIANT": "",
}
// ENV foo bar

View File

@@ -12,7 +12,7 @@
#
%global golang_version 1.19
%{!?version: %global version 1.2.15}
%{!?version: %global version 1.2.16-dev}
%{!?release: %global release 1}
%global package_name imagebuilder
%global product_name Container Image Builder