mirror of
https://github.com/containers/podman.git
synced 2026-02-05 06:45:31 +01:00
Merge pull request #27993 from danishprakash/podman-buildah-vendor
vendor: update c/buildah to latest main
This commit is contained in:
@@ -54,7 +54,7 @@ type BuildFlagsWrapper struct {
|
||||
// supported or don't make sense in the farm build use case
|
||||
var FarmBuildHiddenFlags = []string{
|
||||
"arch", "all-platforms", "compress", "cw", "disable-content-trust",
|
||||
"logsplit", "manifest", "os", "output", "platform", "sign-by", "signature-policy", "stdin",
|
||||
"logsplit", "manifest", "metadata-file", "os", "output", "platform", "sign-by", "signature-policy", "stdin",
|
||||
"variant",
|
||||
}
|
||||
|
||||
@@ -149,6 +149,9 @@ func ParseBuildOpts(cmd *cobra.Command, args []string, buildOpts *BuildFlagsWrap
|
||||
if cmd.Flag("output").Changed && registry.IsRemote() {
|
||||
return nil, errors.New("'--output' option is not supported in remote mode")
|
||||
}
|
||||
if cmd.Flag("metadata-file").Changed && registry.IsRemote() {
|
||||
return nil, errors.New("'--metadata-file' option is not supported in remote mode")
|
||||
}
|
||||
|
||||
if buildOpts.Network == "none" {
|
||||
if cmd.Flag("dns").Changed {
|
||||
@@ -612,6 +615,7 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *Buil
|
||||
UnsetEnvs: flags.UnsetEnvs,
|
||||
UnsetLabels: flags.UnsetLabels,
|
||||
UnsetAnnotations: flags.UnsetAnnotations,
|
||||
MetadataFile: flags.MetadataFile,
|
||||
}
|
||||
|
||||
if c.Flag("created-annotation").Changed {
|
||||
|
||||
@@ -109,6 +109,11 @@ func build(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
opts.IIDFile = iidFile
|
||||
iidFileRaw, err := cmd.Flags().GetString("iidfile-raw")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
opts.IIDFileRaw = iidFileRaw
|
||||
// only set tls-verify if it has been changed by the user
|
||||
// if it hasn't we will read the registries.conf on the farm
|
||||
// nodes for further configuration
|
||||
|
||||
@@ -118,11 +118,12 @@ func build(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if cmd.Flag("iidfile").Changed {
|
||||
f, err := os.Create(buildOpts.Iidfile)
|
||||
if err != nil {
|
||||
if err := os.WriteFile(buildOpts.Iidfile, []byte("sha256:"+report.ID), 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := f.WriteString("sha256:" + report.ID); err != nil {
|
||||
}
|
||||
if cmd.Flag("iidfile-raw").Changed {
|
||||
if err := os.WriteFile(buildOpts.IidfileRaw, []byte(report.ID), 0o644); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user