Commit Graph

6644 Commits

Author SHA1 Message Date
renovate[bot] fe4c1b7342
Update module github.com/moby/buildkit to v0.23.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-20 11:58:54 +00:00
renovate[bot] 128153867b
Update module github.com/opencontainers/cgroups to v0.0.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 03:32:15 +00:00
Nalin Dahyabhai 5b1d3e666f Add CommitOptions.OmitLayerHistoryEntry, for skipping the new bits
Add an OmitLayerHistoryEntry field to CommitOptions, which more or less
causes us to reproduce our base image, except with PrependedEmptyLayers,
AppendedEmptyLayers, PrependedLinkedLayers, AppendedLinkedLayers, and
config changes still added in.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-18 10:48:54 -04:00
openshift-merge-bot[bot] 0b3a01c386
Merge pull request #6235 from containers/renovate/github.com-fsouza-go-dockerclient-1.x
Update module github.com/fsouza/go-dockerclient to v1.12.1
2025-06-18 12:49:33 +00:00
openshift-merge-bot[bot] 18deda6ee2
Merge pull request #6229 from containers/renovate/github.com-moby-buildkit-0.x
fix(deps): update module github.com/moby/buildkit to v0.23.0
2025-06-18 12:35:27 +00:00
renovate[bot] 5995db7af7
Update module github.com/fsouza/go-dockerclient to v1.12.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 04:08:59 +00:00
openshift-merge-bot[bot] d944211073
Merge pull request #6231 from nalind/bats-tmpdir
commit-with-extra-files test: use $TEST_SCRATCH_DIR
2025-06-18 04:07:49 +00:00
openshift-merge-bot[bot] 3ffed0fd6b
Merge pull request #6228 from nalind/ci-rootless-supplemental-groups
CI: ensure rootless groups aren't duplicates
2025-06-18 01:15:20 +00:00
openshift-merge-bot[bot] 8b31e72fa1
Merge pull request #6232 from nalind/mirror-frontend
conformance: use mirrored frontend and base images
2025-06-17 21:35:03 +00:00
openshift-merge-bot[bot] b0541b60a2
Merge pull request #6230 from nalind/mounted-once-test
"root fs only mounted once" test: accept root with only the rw option
2025-06-17 21:13:03 +00:00
Nalin Dahyabhai c12808594b conformance: use mirrored frontend and base images
In conformance tests, use more mirrored frontend and base images.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-17 15:30:56 -04:00
Nalin Dahyabhai ee5fd19c8f commit-with-extra-files test: use $TEST_SCRATCH_DIR
Use $TEST_SCRATCH_DIR instead of $BATS_TMPDIR for temporary files that
we create during this test.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-17 15:02:16 -04:00
renovate[bot] c578786e55
fix(deps): update module github.com/moby/buildkit to v0.23.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-17 17:41:27 +00:00
Nalin Dahyabhai 3e11fea02e "root fs only mounted once" test: accept root with only the rw option
When checking /proc/self/mountinfo for a root filesystem, also match "/"
mounted with "rw" as its only mount option, as an alternative to being
mounted with "rw" and other options at the same time.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-17 12:55:55 -04:00
Nalin Dahyabhai f8f398bb3c Run with --device /dev/fuse and not just -v /dev/fuse:/dev/fuse
When passing /dev/fuse to a container, use --device instead of a plain
volume mount.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-17 09:22:47 -04:00
Nalin Dahyabhai a9a9a43962 CI: pass $BUILDAH_RUNTIME through to in-container test runs
Pass BUILDAH_RUNTIME through to tests that we run inside of containers,
and discard the CI_DESIRED_RUNTIME variable, which sort of did the same
thing.  We still set OCI to the name of the runtime because tests
consult it directly.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-17 09:22:14 -04:00
Nalin Dahyabhai b97fd7d686 CI: ensure rootless groups aren't duplicates
When adding an unprivileged user to run tests as, ensure that the
primary and supplemental groups are not repeated, and that at least one
supplemental group is outside of the user's subgid range.  When skipping
a test because the invoking user doesn't have any supplemental groups,
log the user's IDs.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-17 09:18:47 -04:00
openshift-merge-bot[bot] 6a367e69a3
Merge pull request #6226 from ricardobranco777/runc
bud,run: runc does not support keep-groups
2025-06-17 12:08:30 +00:00
openshift-merge-bot[bot] 228f0cd1c5
Merge pull request #6227 from nalind/ci-rootless-supplemental-group
CI: give the rootless test user some supplemental groups
2025-06-16 15:44:06 +00:00
openshift-merge-bot[bot] 37706208b4
Merge pull request #6198 from flouthoc/inherit-annotation
build: add support for `--inherit-annotations`
2025-06-16 15:35:41 +00:00
flouthoc 47da2f29b2
build: add support for --inherit-annotations
Allows users to specify if they want to inherit annotations from base image
or not.

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

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-06-13 12:28:12 -07:00
Nalin Dahyabhai 9ecc98e584 CI: give the rootless test user some supplemental groups
Exercise preservation of supplemental groups in the tests that use
`buildah build` and `buildah from` with `--group-add keep-groups`.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-06-13 10:32:33 -04:00
openshift-merge-bot[bot] 1b39f59dd3
Merge pull request #5452 from aaronlehmann/support-zstd-commit
Support zstd compression in image commit
2025-06-12 20:43:05 +00:00
Ricardo Branco ab8fc6deeb
bud,run: runc does not support keep-groups
Signed-off-by: Ricardo Branco <rbranco@suse.de>
2025-06-12 15:19:57 +02:00
Aaron Lehmann 2eb666c22d Fix lint issue in TestCommitCompression
Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2025-06-11 22:53:13 +00:00
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