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"))