25626 Commits

Author SHA1 Message Date
b5d18e873f Fix ancestor filter to support Docker-compatible substring matching
- Remove redundant exact match checks in ancestor filter implementations
- Add comprehensive test coverage for both prefix and non-prefix substring matching
- Fix missing output verification in ID filter test
- Improve test reliability with proper length checks and consistent flags
- Remove unnecessary length check to ensure tests fail properly if image ID is too short
- Add -q and --no-trunc flags for consistent test output format
- Focus test on substring ID matching specifically (not image names)
- Restore image name matching functionality for existing tests
- Keep substring ID matching for Docker compatibility
- Ensure both regex matching and substring ID matching work together

The ancestor filter now supports both:
1. Image name matching (existing functionality)
2. Substring ID matching (new Docker compatibility feature)

Fixes: #26623
Signed-off-by: shiavm006 <shivammittal42006@gmail.com>
2025-07-30 23:02:40 +05:30
eabb64ddaf Merge pull request #26666 from TomSweeneyRedHat/dev/tsweeney/buildah_v1.41.0
Bump Buildah to v1.41.0
2025-07-24 12:24:28 +00:00
12b7a334ae Merge pull request #26628 from 2004joshua/build_context
Feat: send additional build contexts as tar files for remote builds
2025-07-24 11:04:32 +00:00
f3e3aace95 Temp fix for #26680
Comment out the problematic "podman diff container and image with same name" test
in test/e2e/diff_test.go.  This became a problem with Buildah v1.41 and
if possible, should be addressed by Podman v5.6 final.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 20:51:55 -04:00
6aa70f07c2 Update "podman diff container and image with same name" e2e test
Update the "podman diff container and image with same name" e2e test to
not expect a built image to include /etc, since newer buildah won't
include an item in a layer if it was only created in a rootfs in order
to have something mounted onto it while processing a RUN instruction.
A few exceptions are still made for the sake of conformance tests.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:57:48 -04:00
e6f812c21e API server: drop inherit-labels/annotations for compat builds
Drop the inheritlabels and inheritannotations flags in the description
for the compat build endpoint, because the docker engine's build
endpoint doesn't recognize them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:57:06 -04:00
7bc9691045 buildah-bud tests: handle "-t oci:" and such, skip a new --output
Teach our patched version of run_buildah() to notice when a build tries
to write the output image to an oci:/oci-archive:/docker-archive:/dir:
location, and for those cases, adjust the command to commit the image to
local storage and then copy it to the desired location.

It's a hack on top of a hack.  I don't love it, but here we are.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:56:08 -04:00
ac99084d03 API handler: don't force the SkipUnusedStages flag
Don't force the SkipUnusedStages option one way or another when the
client doesn't specifically request one or the other, so that the server
can choose to use its default behavior.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:55:47 -04:00
55f4d2aa25 API handler: don't force the CompatVolumes flag
Don't force the CompatVolumes option one way or another when the client
doesn't specifically request one or the other, so that the server can
choose to use its default behavior.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:55:16 -04:00
db2baee9fa API handler: don't force the IdentityLabel flag
Don't force the IdentityLabel option one way or another when the client
doesn't specifically request one or the other, so that the server can
choose to use its default behavior.

Fixes #26669

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:54:47 -04:00
3e673591ad Update compat-volumes setting for remotes
The "compat-volumes" setting shouldn't be provided by the compat build
endpoint, the docker daemon's isn't expected to recognize it.

It is also a conditional boolean flag, so if it isn't specified by the
caller, don't send a value from a client to the server, so that the
server will be able to apply its own default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:54:28 -04:00
bf79a9b71e Update inherit-labels setting for remotes
The inherit-labels setting is a conditional boolean flag, so if it isn't
specified either way by the caller, don't send a value from a client to
the server, so that the server will be able to apply its own default.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:54:08 -04:00
bfe6cbe319 pkg/emulation.parseBinfmtMisc(): accept empty "flags" fields
When parsing an entry in /proc/sys/fs/binfmt_misc, don't return an error
if we find an empty "flags" field in the file.  Wine packaged for Fedora
provides a binfmt.d file that results in such a file, so... it's normal.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:53:39 -04:00
a615dde1a5 build endpoint: document the "timestamp" flag
The "timestamp" flag has been around for ages, but we never documented
it in the API.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:53:07 -04:00
7517e3267a remote build: relay more new flags introduced in buildah 1.41
Wire up the source-date-epoch, rewrite-timestamp, and created-annotation
flags so that a client can correctly ask a server to honor them.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-07-23 15:52:43 -04:00
73f3e98947 Feat: send additional build contexts for remote builds
Fixed the --build-context flag to properly send files for remote builds. Previously
only the main context was sent over as a tar while additional contexts were passed as
local paths and this would cause builds to fail since the files wouldn't exist.

New changes modifies the Build API to use multipart HTTP requests allowing multiple
build contexts to be used. Each additional context is packaged and
transferred based on its type:
- Local Directories: Sent as tar archives
- Git Repositories: link sent to the server where its then cloned
- Container Images: Image reference sent to the server, it then pulls the image there
- URLs/archives: URL sent to the server, which handles the download

Fixes: #23433

Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
2025-07-23 11:34:38 -04:00
97103ffef5 Add Buildah build's passwd test helper
Add the passwd test helper used by Buildah's build
test system.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 10:36:22 -04:00
2f71314b4a Add CLI updates for inherit and unset annotations
Add CLI updates for --inheritannotations and --unsetannotations

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 10:36:22 -04:00
97f27f35a5 Add missing manpages options for Buildah v1.41.0
Add the missing man page options for `podman build`,
`podman farm build`, and `podman image build`.  These
are new to `buildah build` with Buildah v1.41.0.

They are:
  * created-annotation
  * inherit-annotations
  * rewrite-timestamp
  * source-date-epoch
  * unsetannotation

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 10:36:22 -04:00
048729a560 Bump to Buildah v1.41.0
Bump Buildah to v1.41.0 in preparation for
Podman v5.6

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-07-23 10:36:22 -04:00
4833d31dfa Merge pull request #26675 from containers/renovate/github.com-onsi-gomega-1.x
fix(deps): update module github.com/onsi/gomega to v1.38.0
2025-07-23 14:15:37 +00:00
ca5deaace1 fix(deps): update module github.com/onsi/gomega to v1.38.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-23 00:15:40 +00:00
62dd921ad9 Merge pull request #26557 from eulores/patch-2
Quadlet - fix dropin overwrites if different parent dirs
2025-07-22 18:29:21 +00:00
cfdf27b350 test/system: add quadlet drop-in regression test for subdirs
Test to ensure subdir overwrites work correctly, see #26555.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-22 16:34:37 +02:00
022bac25ea Quadlet - fix dropin overwrites if different parent dirs
fixes #26555

Signed-off-by: Andreas <43118918+eulores@users.noreply.github.com>
2025-07-22 14:42:53 +02:00
04a589fea3 Merge pull request #26668 from containers/renovate/golangci-golangci-lint-2.x
chore(deps): update dependency golangci/golangci-lint to v2.3.0
2025-07-22 09:48:37 +00:00
ea5b83c0cb chore(deps): update dependency golangci/golangci-lint to v2.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 18:18:40 +00:00
051676bc97 Merge pull request #26330 from flouthoc/quadlet-work
Add support for `podman quadlet`
2025-07-21 12:36:48 +00:00
d13ded62db Merge pull request #26662 from Xyz00777/patch-1
added updated state in podman-auto-update.1.md.in
2025-07-21 10:49:14 +00:00
0fda2d8aa2 added updated state in podman-auto-update.1.md.in
added missing state "pending" for updated is avialable. im not sure if others missing, i just found this missing while creating a script

Signed-off-by: Xyz00777 <52142054+Xyz00777@users.noreply.github.com>
2025-07-20 18:01:21 +02:00
f293c1a179 Initial implementation of podman quadlet commands
This adds `podman quadlet list`, `podman quadlet install`,
`podman quadlet rm` and `podman quadlet print`.

Signed-off-by: Matt Heon <mheon@redhat.com>
Co-authored-by: flouthoc <flouthoc.git@gmail.com>
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-07-18 13:57:11 -07:00
b2ccef27fa Merge pull request #26655 from containers/renovate/common-image-and-storage-deps
fix(deps): update module github.com/containers/common to v0.64.0
2025-07-17 17:00:16 +00:00
3c33b33424 fix(deps): update module github.com/containers/common to v0.64.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-17 04:10:47 +00:00
0ae8a689c0 Merge pull request #26394 from Luap99/code-doc
docs: add description about our code structure
2025-07-16 19:18:05 +00:00
82ad043197 docs: add description about our code structure
Document most important directories when trying to understand our
project.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-16 15:59:48 +02:00
27487fd94d Merge pull request #26643 from Luap99/rm-dead-conmon
podman rm: handle case where conmon was killed
2025-07-16 12:39:11 +00:00
39868323a2 Merge pull request #26648 from containers/renovate/common-image-and-storage-deps
fix(deps): update common, image, and storage deps
2025-07-16 10:58:34 +00:00
da3df0c45b fix(deps): update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 04:46:14 +00:00
c1cf4b0d89 podman rm: handle case where conmon was killed
When conmon was killed podman rm -f currently fails but running it again
then works which doesn't really makes sense. We should properly remove
the contianer even if conmon is dead.

In fact the code already handles ErrConmonDead as stop error when we
remove the container but this error was never thrown anywhere. To fix
this throw ErrConmonDead instead of ErrInternal because that is not an
intenral error if something else killed conmon.

With this we can correctly cleanup and remove the container. The fact
that this works on the first try is important for quadlet units as they
only run the ExecStopPost= command once to remove it.

Fixes: #26640

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-15 17:15:19 +02:00
8b1f06bf8f podman inspect: fix error difference between local and remote
There is no reason for local and rmeote to use a different error that
just differs in quoting. Make them consitent to simplify the tests.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-07-15 17:15:19 +02:00
4364db989a Merge pull request #26638 from containers/renovate/common-image-and-storage-deps
Update module github.com/containers/storage to v1.59.0
2025-07-15 09:51:46 +00:00
f3761f97d1 Merge pull request #26619 from Craig-Spencer-12/exec-pid-leak-test
Fix test that checks for podman exec leaks
2025-07-15 09:38:01 +00:00
c2e4f33b91 Merge pull request #26637 from containers/renovate/github.com-opencontainers-cgroups-0.x
Update module github.com/opencontainers/cgroups to v0.0.4
2025-07-15 09:26:47 +00:00
21356fa06b Update module github.com/containers/storage to v1.59.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 02:16:24 +00:00
df7d787b4c Update module github.com/opencontainers/cgroups to v0.0.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 23:46:15 +00:00
6b9a3066b6 Merge pull request #26631 from Luap99/autoupdate-error
podman auto-update: include container in invalid policy message
2025-07-14 17:34:37 +00:00
9ed9da3446 Merge pull request #26602 from containers/renovate/common-image-and-storage-deps
Update common, image, and storage deps
2025-07-14 16:47:20 +00:00
55296e1c44 Fix test that checks for podman exec leaks
Updated helper function "find_exec_pid_files" and called it the "podman exec - leak check" test.

Fixes: #26616

Signed-off-by: Craig Spencer <craig.spencer812@gmail.com>
2025-07-14 12:18:17 -04:00
b05b9d043d Merge pull request #26533 from ArthurWuTW/26506
volume export: refuse to write to terminal (TTY)
2025-07-14 15:58:56 +00:00
e899f49926 Update common, image, and storage deps
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 15:42:59 +00:00