Commit Graph

124 Commits

Author SHA1 Message Date
Nalin Dahyabhai 75ef41ea3a Tag v1.37.6
Tag a new release to incorporate the recent security advisory, and make
a minor update to the CI configuration.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-01-20 13:12:00 -05:00
Nalin Dahyabhai b41133dad7 define.TempDirForURL(): always use an intermediate subdirectory
Ensure that the temporary directory that we create is never itself the
top-level directory of the content that we're downloading, in case it's
an archive which includes a "." with weird permissions.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-01-17 14:33:43 -05:00
tomsweeneyredhat 5fd40b9898 [release-1.37] Bump Buildah to v1.37.5
Bump to v1.37.5 to incoroprate the fixes needed for CVE-2024-3675

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-10-17 19:50:11 -04:00
Nalin Dahyabhai 9dfacbb47e Tag v1.37.4
Bump version identifiers to v1.37.4.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-10-04 10:14:15 -04:00
tomsweeneyredhat 956095ee1c [release-1.37] Bump to Buildah v1.37.3
Bump to v1.37.3 in preparation of Podman v5.3

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-09-20 11:14:11 -04:00
tomsweeneyredhat eadda3bc0e [release-1.37] Bump Buildah to v1.37.2
As the title says.  Bumping to v1.37.2 in preparation for
Podman v5.2.2

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-20 15:34:38 -04:00
tomsweeneyredhat 67cc51e90e [release-1.37] Bump to Buildah v1.37.1
Bump to Buildahd v1.37.1 in preparation for Podman v5.2.1

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-08-12 15:40:58 -04:00
tomsweeneyredhat f9de1bbd1f Buildah v1.37.0
Bump Buildah to v1.37.0 in preparation for Podman v5.2

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-26 09:47:33 -04:00
Nalin Dahyabhai b1dff416b9 Replace libimage.LookupReferenceFunc with the manifests version
Change fields of the
github.com/containers/common/libimage.LookupReferenceFunc type to be of
the github.com/containers/common/libimage/manifests.LookupReferenceFunc
type. The two types are aliases for each other, but the libimage package
refuses to build when podman is using us as a dependency of its remote
client.

Note that the CachePullSourceLookupReferenceFunc,
CachePullDestinationLookupReferenceFunc,
CachePushSourceLookupReferenceFunc, and
CachePushDestinationLookupReferenceFunc callbacks in define.BuildOptions
aren't currently proxied for podman remote clients.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-07-15 16:30:22 -04:00
Nalin Dahyabhai a7098c776a imagebuildah: make traditional volume handling not the default
Make the traditional handling of volumes (where they're "frozen" and can
only be modified by ADD or COPY, which requires that we cache their
contents and save/restore them before/after RUN instructions) an option
that is not enabled by default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-07-15 09:38:28 -04:00
Nalin Dahyabhai 21fb5ea4f2 Rework parsing of --pull flags
Rework parsing of --pull flags to add "newer" as an alias for "ifnewer",
and to reject unrecognized values instead of treating them as synonymous
with "ifmissing".

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-06-24 11:02:12 -04:00
Nalin Dahyabhai 66957cc05e commit: set "parent" for docker format only when requested
Make setting the Parent field in the config blob of a docker format
image optional (yes, we're bringing it back!), since it no longer
appears to be set by newer versions of docker build.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-06-18 09:55:38 -04:00
Maya Rashish e47ffc831c Add netbsd to lists-of-OSes
Signed-off-by: Maya Rashish <maya@NetBSD.org>
2024-06-01 22:25:08 -04:00
Aaron Lehmann 9521672fdb Document when BlobDirectory is overridden
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-05-27 10:50:27 -07:00
Aaron Lehmann 7ff83d5055 Change to take a types.ImageReference arg
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-05-24 14:27:09 -07:00
Aaron Lehmann e6c7949aa7 imagebuildah: Support custom image reference lookup for cache push/pull
This allows callers to provide custom SourceLookupReferenceFunc and
DestinationLookupReferenceFunc for cache pull/push. These can be used to
implement custom blob caches, and to wrap the reference being
pushed/pulled to influence the copy behavior.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-05-24 14:27:01 -07:00
tomsweeneyredhat f39d5fba25 Bump to v1.37.0-dev
As the title says.  Setting to v1.37.0-dev after
creatings Buildah v1.36.0 for release with Podman v5.1

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-05-23 16:31:33 -04:00
tomsweeneyredhat 6ceba8838d Bump to v1.36.0
[NO TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-05-23 16:31:28 -04:00
Nalin Dahyabhai 5198af7d7c Add support for passing CDI specs to --device
Add support for using CDI to resolve `--device` devices for RUN
instructions during `buildah build`, `buildah from`, and `buildah run`,
as `podman run` does.

This generally requires that we stop resolving device specifications
(arguments passed to --device) earlier and deferring that until it's
time to run a process, because CDI wants to pick over those values,
modify a runtime spec to set up the ones that it knows about, and then
hand back the list of values that it doesn't know about.

We don't want to do a dry run of this during CLI processing because that
would create a window where the underlying hardware state could change,
and that could produce some hard-to-diagnose errors.

Being able to test this is going to require that we add the `--device`
flag to `buildah run` (`--security-opt` affects how we build the
container's layer, so it has to be done at `buildah from`).

The default configured devices list is pulled in by CLI flag processing
during `buildah from` and `buildah build`, so it doesn't also need to be
explicitly passed to `buildah run` or the internal Run() method.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-29 16:57:10 -04:00
Nalin Dahyabhai 14bf3db27a Update comments on some API objects
Avoid generically referring to "the container" where it can be ambiguous
that we're actually talking about the environment we set up for running
a command for a RUN instruction or Run() call.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-28 17:24:38 -04:00
tomsweeneyredhat da81d2e2b4 Bump to v1.36.0-dev
As the title says.  Bumping back to the next dev
version.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-06 23:47:45 -05:00
tomsweeneyredhat fedbd79676 Bump v1.35.0
Bump to Buildah v1.35.0 in preparation of Podman v5.0.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-06 23:47:45 -05:00
tomsweeneyredhat d73e211205 Bump main to v1.35.0-dev
There have been a number of breaking changes added
since v1.34 to the main branch.  We'll create a new
release branch for v1.34 and will set the version in
main to 1.35.0-dev.

The intended target for Buildah v1.35 is Fedora 40.

[NO NEW TESTS NEEDED]
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-02-08 10:42:20 -05:00
Daniel J Walsh 79fb3c2135
Make buildah match podman for handling of ulimits
Podman currently sets the ulimits of nofile and nproc
to max in rootless mode, if the user does not override.

Buildah on the other hand just passes in the current defaults.

Podman build should match podman run, and this will fix that problem.

Fixes: https://github.com/containers/buildah/issues/5273

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-31 15:28:51 -05:00
Nalin Dahyabhai cf69e8a187 build,commit: add --sbom to scan and produce SBOMs when committing
Add a --sbom flag to `buildah build` and `buildah commit` which will
scan the rootfs and specified context directories to build SPDX or
CycloneDX SBOMs and lists of package URLs.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-01-19 13:55:57 -05:00
Nalin Dahyabhai 81435aadcb mkcw: populate the rootfs using an overlay
When using the working container's rootfs to populate a plaintext disk
image with mkfs, instead of writing .krun_config.json to the rootfs and
then removing it afterward (since we don't want it to show up if the
same working container is later committed to non confidential-workload
image), mount an overlay filesystem using a temporary directory as the
upper and the rootfs as the lower, create the .krun_config.json file in
the overlay filesystem, and use the overlay filesystem as the source
directory for mkfs.

Add the necessary stubs to allow pkg/overlay to at least compile on
non-Linux systems.  Change the naming scheme for a test so that the path
names it uses for temporary directories don't include "," or "=", which
can confuse the kernel.

Creating confidential workload images will now only be possible on Linux
systems, but we exec'd out to sevctl to read platform certificates, and
that requires kernel support with vendor firmware, so I don't know that
anyone will actually be impacted by the change.

Teach pkg/overlay.MountWithOptions() to accept `nil` as a pointer to a
struct parameter that is otherwise optional.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-12-13 14:06:59 -05:00
TomSweeneyRedHat 4276a735b3 Bump to v1.34.1-dev
As the title says

[NO NEW TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-12-11 17:35:11 -05:00
TomSweeneyRedHat 21ec7aceb2 Bump to v1.34.0
[NO TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-12-11 17:35:04 -05:00
TomSweeneyRedHat bd0ae2affa Bump to v1.33.2-dev
Bump to v1.33.2-dev

[NO NEW TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-18 23:42:50 -05:00
TomSweeneyRedHat 38d6d5f114 Bump to v1.33.1
Bump to 1.33.1 to fix misbump to 1.31.1 (Ugh!)

[NO NEW TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-18 23:41:18 -05:00
TomSweeneyRedHat 6d66008b67 Bump to v1.31.2-dev
As the title says.

[NO NEW TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-18 19:35:59 -05:00
TomSweeneyRedHat f18868d066 Bump to v1.31.1
As the title says.  Quick fix for Podman test issue
and BuildKit CVE.

[NO TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-18 19:32:43 -05:00
TomSweeneyRedHat 8fb8261771 Bump to v1.33.1-dev
As the title says

[NO NEW TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-17 15:22:50 -05:00
TomSweeneyRedHat 98da6c8d6a Bump to v1.33.0
As the title says

[NO TESTS NEEDED]

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-11-17 15:21:08 -05:00
Daniel J Walsh 8df9b760b3
Stop using DefaultNetworkSysctl and use containers.conf only
Also mark uses of DefaultCapabilities as Deprecated.

Fixes: https://github.com/containers/buildah/issues/5155

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-11-13 11:46:04 -05:00
Daniel J Walsh 48a9c43718
Add --no-hostname option to buildah containers
Fixes: https://github.com/containers/buildah/issues/5093

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-10-24 19:43:56 -04:00
Aditya R 8b63fa37bf
build,config: add support for --unsetlabel
Just like `--unsetenv` following flag allows to unset image label.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-09-27 10:27:54 +05:30
Nalin Dahyabhai abc57f8df2 Bump to v1.33.0-dev
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-09-14 13:19:10 -04:00
Nalin Dahyabhai 2326d4929f Tag v1.32.0
[NO NEW TESTS NEEDED]

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-09-14 13:18:55 -04:00
Nalin Dahyabhai e89fac6c9b Add `buildah mkcw`, add `--cw` to `buildah commit` and `buildah build`
Add a --cw option to `buildah build` and `buildah commit`, which takes a
comma-separated list of arguments and produces an image laid out for use
as a confidential workload:
  type: sev or snp
  attestation_url: location of a key broker server
  cpus: expected number of virtual CPUs to run with
  memory: expected megabytes of memory to run with
  workload_id: a distinguishing identifier for the key broker server
  ignore_attestation_errors: ignore errors registering the workload
  passphrase: for encrypting the disk image
  slop: extra space to allocate for the disk image

At least one of attestation_url and passphrase must be specified in
order for the encrypted disk image to be decryptable at run-time.  Other
arguments can be omitted.  ignore_attestation_errors is intentionally
undocumented, as it's mainly used to permit some amount of testing on
systems which don't have the required hardware.

Add an `mkcw` top-level command, for converting directly from an image
to a confidential workload.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-09-07 14:05:10 -04:00
Aditya R f888b3d84b
buildah: add --layer-label for setting labels on layers
`--layer-label` allows users to set labels on intermediate labels agnostic
of the labels set on actual image. Since there are use-cases where users
want to perform operation on intermediate images only on the basis of
certain labels.

Closes: https://github.com/containers/buildah/issues/4933

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-03 12:09:12 +05:30
Tom Sweeney e00845797c Bump to v1.32.0-dev
As the title says. In preparation for RHEL 8.9./9.3

[NO NEW TESTS NEEDED]

Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2023-06-30 10:46:06 -04:00
Tom Sweeney d0de60bbf3 Bump 1.31.0
As the title says.  In preparation of RHEL 8.9/9.3

[NO NEW TESTS NEEDED]

Signed-off-by: Tom Sweeney <tsweeney@redhat.com>
2023-06-30 10:39:59 -04:00
tomsweeneyredhat e9884fc41c
Bump to v1.31.0-dev
As the title says

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-04-08 07:03:28 -04:00
tomsweeneyredhat 04965f1198
Bump to v1.30.0
[NO TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-04-08 07:03:27 -04:00
Lokesh Mandvekar 78416393ff
[CI:BUILD] Packit: Enable Copr builds on PR and commit to main
This commit adds Packit configuration files which will trigger rpm
builds on copr:`rhcontainerbot/packit-builds` on every PR as well as on
copr:`rhcontainerbot/podman-next` on every commit to main branch.

This commit will ensure main branch is always buildable on all supported
Fedora and CentOS Stream versions for aarch64 and x86_64.
TODO: enable build checks for s390x and ppc64le while ensuring they
don't take too long to build.

The packit builds reuse `buildah.spec.rpkg` present upstream and are
thus independent of Fedora / CentOS dist-git.

This change will remove the need for the current webhook based triggering
of rpm builds on rhcontainerbot/podman-next after commit to main.
That will be instead handled by the `trigger: commit` action added in this
PR. New builds will continue to get posted to the same link so users
don't need to change any existing copr repo configuration.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-03-23 16:03:58 +05:30
tomsweeneyredhat 2008a5302d Bump to v1.30.0-dev
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-25 18:24:47 -05:00
tomsweeneyredhat 94b723cb5b Bump to v1.29.0
As the title says.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-25 18:22:54 -05:00
Daniel J Walsh 60be7f2509
Add support for --group-add to buildah from
Allow containers running under buildah to use
--group-add keep-groups, so that they can inherit
access to the users groups.

Also allow users to add supplimental groups to the container.

Fixes: https://github.com/containers/buildah/issues/4476

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-12-22 11:53:00 -05:00
Daniel J Walsh c65d837641
Merge pull request #4443 from flouthoc/extend-cache-from-api
remote-cache: support multiple sources and destination for `--cache-to` and `--cache-from`
2022-12-12 14:41:48 -05:00