Commit Graph

6369 Commits

Author SHA1 Message Date
Nalin Dahyabhai 873e5458c6 Add a unit test for compression types in OCI images
Add a unit test that commits OCI layouts with various types of
compression specified, and verifies that the layers end up written with
the desired compression and media type descriptors.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-11 22:42:59 +00:00
Aaron Lehmann aa84d9c347 Support zstd compression in image commit
Without this change, specifying `Compression: imagebuildah.Zstd` in
`imagebuildah`'s `BuildOptions fails, so it is not possible to push
cache to a registry with zstd compression.

Note this is only applicable to OCI manifests.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2025-06-11 22:42:59 +00:00
openshift-merge-bot[bot] 22201dbaa0
Merge pull request #6219 from containers/renovate/go.etcd.io-bbolt-1.x
fix(deps): update module go.etcd.io/bbolt to v1.4.1
2025-06-11 17:38:29 +00:00
openshift-merge-bot[bot] bf6d1ccbb8
Merge pull request #6214 from nalind/source-date-epoch-no-identity-label
commit,build: --source-date-epoch/--timestamp omit identity label
2025-06-11 17:24:36 +00:00
renovate[bot] 1aa6c1e35a
fix(deps): update module go.etcd.io/bbolt to v1.4.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 14:42:22 +00:00
openshift-merge-bot[bot] 2d8c3078ad
Merge pull request #6216 from Luap99/sqlite-dynamic-link
dynamically link sqlite
2025-06-11 13:28:45 +00:00
Paul Holzinger 03b980a3ef
rpm: build rpm with libsqlite3 tag
So we dynamically link to sqlite in fedora instead of vendoring a static
copy.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-11 10:31:54 +02:00
Paul Holzinger e5b876571b
Makefile: use libsqlite3 build when possible
Dynamically link sqlite3 when installed, the main motivation is that we
reduce the podman binary size with that. I see about 3.2 MB savings.

But also dynamically linking it means if there a vulnerabilities only
the sqlite3 distro package needs updating and we don't have to make a
new podman release with the vendored update.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-11 10:31:53 +02:00
Nalin Dahyabhai 962ab4bb1e commit,build: --source-date-epoch/--timestamp omit identity label
When using either --source-date-epoch or --timestamp, default to not
adding a label with our version number in it, since it can change
between builds.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-10 16:18:50 -04:00
openshift-merge-bot[bot] 5777aa3694
Merge pull request #6215 from nalind/countme
docs: add --setopt "*.countme=false" to dnf examples
2025-06-10 19:58:02 +00:00
Nalin Dahyabhai b167073d54 docs: add --setopt "*.countme=false" to dnf examples
* Consistently use --releasever instead of --release in dnf examples
* Remove trailing whitespace
* Use --use-host-config --setopt "*.countme=false" when running dnf with
  an empty --installroot
* Use Fedora 42 instead of Fedora 30 in examples
* Block quote console examples in tutorials

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-10 14:16:36 -04:00
openshift-merge-bot[bot] f46d15d721
Merge pull request #6217 from nalind/sbom-user
Builder.sbomScan(): don't break non-root scanners
2025-06-10 18:15:44 +00:00
Nalin Dahyabhai 9f35e8a2ac Builder.sbomScan(): don't break non-root scanners
Set up permissions on the scanner output directory so that scanners
whose images specify that they be run as non-root users can still write
to it.  The most recent syft image exposed our bug.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-10 13:22:20 -04:00
openshift-merge-bot[bot] d14b4f8dc7
Merge pull request #6211 from nalind/source-date-epoch-static-hostname
build: --source-date-epoch/--timestamp use static hostname/cid
2025-06-10 13:55:54 +00:00
openshift-merge-bot[bot] 714f5ba2e5
Merge pull request #6195 from flouthoc/unsetanno
build,config: add support for `--unsetannotation`
2025-06-09 14:19:35 +00:00
Nalin Dahyabhai 2d0152e99d build: --source-date-epoch/--timestamp use static hostname/cid
When using either --source-date-epoch or --timestamp, make sure that
handling of RUN instructions uses a defined hostname if possible, and
commits using a reference to a static container name.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-06 15:33:01 -04:00
openshift-merge-bot[bot] 12e41eca79
Merge pull request #6210 from containers/renovate/golang.org-x-crypto-0.x
fix(deps): update module golang.org/x/crypto to v0.39.0
2025-06-06 19:22:48 +00:00
renovate[bot] 87d9db82c6
fix(deps): update module golang.org/x/crypto to v0.39.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 21:55:11 +00:00
openshift-merge-bot[bot] f05fe6e568
Merge pull request #6208 from nalind/build-source-date-epoch
build: add --source-date-epoch and --rewrite-timestamp flags
2025-06-05 21:54:10 +00:00
openshift-merge-bot[bot] da45fc8b82
Merge pull request #6209 from containers/renovate/golang.org-x-sync-0.x
fix(deps): update module golang.org/x/sync to v0.15.0
2025-06-05 17:35:29 +00:00
renovate[bot] 5842593d28
fix(deps): update module golang.org/x/sync to v0.15.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 16:11:23 +00:00
Nalin Dahyabhai 865daceebb build: add --source-date-epoch and --rewrite-timestamp flags
Use $SOURCE_DATE_EPOCH as the default for the --source-date-epoch flag
to the "build" CLI.

When a source-date-epoch is set, we'll use it when writing new history
entries, force timestamps in data written for --output to the specified
timestamp, and populate a "SOURCE_DATE_EPOCH" ARG that we treat as
always being set, and which we don't complain about being left unused.
By default, this will not affect timestamps in newly-added layers.

Add a --rewrite-timestamp flag, which "clamps" timestamps in newly-added
layers to not be later than the --source-date-epoch value if the
--source-date-epoch flag is set, but has no effect otherwise.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-05 10:22:56 -04:00
flouthoc 83acf720d9
build,config: add support for --unsetannotation
Just like `--unsetlabel` add support for `--unsetannotation`.

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

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-06-04 12:58:43 -07:00
openshift-merge-bot[bot] b8d8cc375f
Merge pull request #6189 from nalind/commit-source-date-epoch
commit: add --source-date-epoch and --rewrite-timestamp flags
2025-06-04 19:30:37 +00:00
Nalin Dahyabhai 6c82e7eac0 commit: add --source-date-epoch and --rewrite-timestamp flags
Add a --source-date-epoch flag, defaulting to $SOURCE_DATE_EPOCH if set,
which sets the created-on date and the timestamp for the new history
entries, but does not default to modifying the timestamps on contents in
new layers.

Add a --rewrite-timestamp flag, which "clamps" timestamps in the new
layers to not be later than the --source-date-epoch value if both
the --rewrite-timestamp and --source-date-epoch flags were set.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-04 13:02:26 -04:00
openshift-merge-bot[bot] 2d32c9af2f
Merge pull request #6169 from Honny1/sort-glob-output
Ensure extendedGlob returns paths in lexical order
2025-06-04 17:02:03 +00:00
openshift-merge-bot[bot] bd021becfb
Merge pull request #6203 from containers/renovate/github.com-openshift-imagebuilder-1.x
fix(deps): update module github.com/openshift/imagebuilder to v1.2.16
2025-06-03 20:08:20 +00:00
renovate[bot] a4a30cf5e8
fix(deps): update module github.com/openshift/imagebuilder to v1.2.16
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 18:33:08 +00:00
openshift-merge-bot[bot] 9ece6d4ce8
Merge pull request #6200 from Luap99/vendor
vendor latest c/{common,image,storage}
2025-06-03 10:23:05 +00:00
Paul Holzinger 5b26b79221
vendor latest c/{common,image,storage}
Just to make sure tests are still passing, I mostly care about
https://github.com/containers/common/pull/2445.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-03 11:28:06 +02:00
openshift-merge-bot[bot] 7be35e17d3
Merge pull request #6190 from nalind/platforms
Tweak our handling of variant values, again
2025-06-02 15:46:18 +00:00
openshift-merge-bot[bot] 5da34800de
Merge pull request #6192 from mtrmac/ostree
Don't BuildRequires: ostree-devel
2025-06-02 14:23:27 +00:00
Nalin Dahyabhai 9c2b43cccb Tweak our handling of variant values, again
Ensure that when not invoked with --platform, we use the default
platform, and that when invoked with --platform, we use the platform
information from the base image that we ended up using for the build,
with no accidental mixing of the two.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-02 09:33:25 -04:00
openshift-merge-bot[bot] a5f229f155
Merge pull request #6188 from flouthoc/host-gateway
parse, validateExtraHost: honor `host-gateway` in format
2025-06-01 10:47:38 +00:00
Miloslav Trmač db336cef4d Don't BuildRequires: ostree-devel
We are not opting into the ostree backend, and it doesn't
build: https://github.com/containers/image/pull/2821 .
So, stop referencing the dependency.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2025-05-31 01:38:27 +02:00
openshift-merge-bot[bot] 7a56587b5d
Merge pull request #6191 from Luap99/nix-rm
remove static nix build
2025-05-30 17:51:37 +00:00
flouthoc 56f3171ab0
parse, validateExtraHost: honor Hostgateway in format
Flag `--add-host` should support `host-gateway` when argument is in the
form of `buildah build --add-host=proxyhost:host-gateway .`

This is consistent with podman.

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

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-05-30 09:56:35 -07:00
Paul Holzinger 56cfd2fdfc
remove static nix build
It is no longer working and no maintainer is using it.

Fixes: #6086

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-05-30 18:53:28 +02:00
openshift-merge-bot[bot] 5cc3e7d776
Merge pull request #6187 from JayKayy/fix-maintainers-link
fix link to Maintainers file
2025-05-30 14:25:49 +00:00
Jan Rodák 2717599f93
Ensure extendedGlob returns paths in lexical order
The `filepath.Glob` function does not provide deterministic output. In order to achieve a reproducible build, files must be copied in a deterministic manner, and `filepath.Glob` did not guarantee this. Other functions such as `filepath.Walk` and `os.ReadDir` return deterministic output. So copying files to the image is done in the same order each time.

Fixes: https://issues.redhat.com/browse/RUN-2661

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2025-05-30 10:32:11 +02:00
John Kwiatkoski 2158a0c331
Merge branch 'main' into fix-maintainers-link 2025-05-29 21:32:27 -04:00
openshift-merge-bot[bot] 5a02e74b5d
Merge pull request #6132 from nalind/relabel-binds
run: handle relabeling bind mounts ourselves
2025-05-29 23:50:22 +00:00
Nalin Dahyabhai 910933b33f CI: run integration tests on Fedora with both crun and runc
Run integration tests (both as root and rootless) with both crun and
runc on Fedora, to help ensure that we can use either.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-05-29 14:17:43 -04:00
Nalin Dahyabhai b122c325fa buildah-build(1): clarify that --cgroup-parent affects RUN instructions
Tweak the wording that describes the effects of --cgroup-parent to be
clear that it only affects handling of RUN instructions.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-05-29 14:17:43 -04:00
Nalin Dahyabhai 8178c3a5d3 runUsingRuntime: use named constants for runtime states
Use the named constants for the status values that runtimes can report
to us when we run them with the "state" command.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-05-29 14:17:43 -04:00
Nalin Dahyabhai 4ea64c3871 Add a dummy "runtime" that just dumps its config file
Add a dummy "runtime" that just dumps its runtime config, either the
entirety of it, or a section of it corresponding to each command line
argument.  Tests can use it to ensure that we set the right thing in the
configuration without also depending on the runtime to do as its asked,
which isn't always something we have control over.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-05-29 14:17:37 -04:00
Nalin Dahyabhai d53d837e0e run: handle relabeling bind mounts ourselves
Handle requested relabeling of bind mounts (i.e., the "z" and "Z" flags)
directly, instead of letting the runtime handle the relabeling.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-05-29 09:27:09 -04:00
openshift-merge-bot[bot] 328e613826
Merge pull request #6186 from containers/renovate/github.com-docker-docker-28.x
fix(deps): update module github.com/docker/docker to v28.2.0+incompatible
2025-05-29 13:22:03 +00:00
John Kwiatkoski 913e4d2d35 fix link to Maintainers file
Signed-off-by: John Kwiatkoski <jkwiatkoski@protonmail.com>
2025-05-28 22:34:33 -04:00
Nalin Dahyabhai c0c4148fc5 Update to avoid deprecated types
Replace our use of the
github.com/docker/docker/api/types.BuildCachePruneOptions with the
github.com/docker/docker/api/types/build.CachePruneOptions type, which
the former is now an alias for.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-05-28 17:55:13 -04:00