83 Commits

Author SHA1 Message Date
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
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
465578d7ec test/buildah-bud: skip new build-with-two-outputs on remote
The --output option is not supported with remote.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 14:42:12 +02:00
4286f03b34 test/buildah-bud: update buildah-tests.diff
The buildah test code chnages so I had to manually resolve the conflict.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 13:39:22 +02:00
c1653bdc29 Build the dumpspec test helper for the buildah bud tests
Newer versions expect to use a new test helper.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-05 12:19:59 +02:00
5494ac882a [CI DOCS] Touchup buildah-bud README.md
The README.md in test/buildah-bud had the old directory name for the
apply-podman-deltas file.  This change removes the `/` and adds a `-`
in that file name.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2025-04-21 17:05:07 -04:00
684126e426 Suppress failing bud tests in remote
Signed-off-by: David Negstad <David.Negstad@microsoft.com>
2025-04-01 14:54:34 -07:00
7ca96702ee buildah-bud: skip bud-with-mount-cache-like-buildkit
Following test needs unique cache in TMPDIR so cache of this test does
not conflicts with other tests however for this specific test there is
no convenient way to pass custom TMPDIR.

Skipping this test similar to this already exists in tests/bud.bats but
covers `--mount=type=cache,sharing=locked`

Read more discussion here: https://github.com/containers/podman/issues/25414
Closes: https://github.com/containers/podman/issues/25414

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-03-24 19:28:06 -07:00
22da944e4a Parallelize buildah bud tests
Buildah bats tests have been made (mostly) parallel-safe
in the past few months. One test is flaking, but it's
not a test that needs to be run under podman: that
functionality is almost entirely buildah-manifest-push
so it uses the buildah binary, and doesn't exercise
anything under podman.

Therefore:

  1) run bud tests with -j$(nproc) on fastvm (was: standardvm)

  2) desperate scramble to parallelize podman system service.

May not be quite 100% perfect, but I think this is in good
enough shape for someone to adopt and push through.

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-17 14:01:21 +01:00
3de18b537e test/buildah-bud: run bats in parallel
Since commit 708fe0af in buildah the tests can run in parallel, let's
enable it here to get the same speed up.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-17 13:19:29 +01:00
97323a691a test/buildah-bud: skip two new problematic tests on remote
They are new and failing on remote, needs to be looked at (#25138)
For now skip them so we can have a proper buildah vendored for rc2.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-01-27 20:04:52 +01:00
33398ebc1e Buildah treadmill tweaks
* treadmill script: handle an obscure corner case
  wherein the script would bail because it thought
  there were no buildah-vendor changes.

* two new test skips

* update the diffs; line-number changes due to buildah
  PRs touching helpers.bash

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-11-11 07:04:39 -07:00
22152a2f9c test/buildah-bud: build new inet helper
Added in https://github.com/containers/buildah/pull/5783

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-11-07 10:39:15 +01:00
ee9c681f31 Buildah treadmill: improve wording in test-fail instructions
Clarify, expand, fix a typo. These are the instructions
shown when the **patching** step fails, typically when
buildah's helpers.bash is changed in a way that conflicts
with our make-it-work-in-podman patches.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-23 12:34:33 -06:00
043b82ef59 Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

  * Fix conflict caused by Ed's local-registry PR in buildah
  * Wire in "new" --retry and --retry-delay, these existed for longer
    but where non functional.

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-02 18:38:38 +02:00
84f57e4ba0 WIP: Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> The git commit message from that PR is below. Please review it,
> edit as necessary, then remove this comment block.
\^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Changes since 2024-05-21:

  * document --compat-volumes
  * Fix conflict caused by Ed's local-registry PR in buildah

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-07-30 18:26:21 -04:00
1ae05473c1 Debian: switch to crun
As agreed in Planning meeting of 2024-03-20, Podman 5.x will
drop support for cgroups v1 and for runc. Make it so.

CI images built in https://github.com/containers/automation_images/pull/338

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-05-28 16:34:39 -06:00
5f57571d65 Bump Buildah to latest main
Includes fixes from Ed's treadmill script.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 12:17:43 -04:00
598fc516a6 vendor: update containers/{buildah,common,image,storage}
The change in healthcheck_run_test.go, depends on the
containers/image change:

commit b6afa8ca7b324aca8fd5a7b5b206fc05c0c04874
Author: Mikhail Sokolov <msokolov@evolution.com>
Date:   Fri Mar 15 13:37:44 2024 +0200

    Add support for Docker HealthConfig.StartInterval (v25.0.0+)

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:13 +02:00
7ef0290a1d Emergency fix (well, skip) for failing bud tests
nixery registry has been down all day. Disable test.

Someone will need to fix this on the buildah end.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-16 17:21:04 -06:00
3abc488c84 Vendor in containers/(buildah, common)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 20:06:28 -05:00
a3d5814e0e Update tests for a c/common error message change
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-11-17 16:44:06 +01:00
e966c86d98 container.conf: support attributed string slices
All `[]string`s in containers.conf have now been migrated to attributed
string slices which require some adjustments in Buildah and Podman.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-27 12:44:33 +02:00
dcb421bc5b buildah-bud: test relative TMPDIR
(buildah PR 5084). Should actually have been added as a bud.bats
test in that PR, but I didn't catch it in time.

Also, remove an obsolete bud-tests skip

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-10-16 14:11:35 -06:00
f5cc0487e8 Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

Changes since 2023-05-01:
  - skip a new test, it fails in remote
  - skip encrypted-FROM test, broken by buildah PR 4746

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-27 18:04:42 +02:00
332b47fefb Check on client side for Containerfile, if none specified
Fixes: https://github.com/containers/podman/issues/16354

Currently we check on the server side, which ends up generating a bad
error message.

$ podman --remote build foo/
ERRO[0000] While reading directory /home/dwalsh/go/src/github.com/containers/podman/foo: EOF
Error: stat /var/tmp/libpod_builder1249622306/build/Dockerfile: no such file or directory

With this change you will get

./bin/podman --remote build foo/
Error: Containerfile not specified and no Containerfile or Dockerfile found in context directory, /home/dwalsh/podman/foo

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-05-08 13:58:37 -04:00
9ec630f305 Buildah treadmill: several fixes
- treadmill script: run root & rootless in parallel, not
  sequentially. It's only four jobs, and it seems dumb
  to fix root tests, repush, then discover a rootless failure.

- apply-podman-deltas: implement skip_if_rootless(), and
  use it to skip a nasty longstanding flake

- bud-tests-in-podman diffs: ugly code to fix a rootless hang.
   background: rootless remote tests hang
   cause: stray podman server process
   root cause: no idea. No clue at all. I just gave up
   workaround: seek out and kill stray server processes

  Rootless buildah-bud tests are not run in regular CI,
  only in the buildah treadmill.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-08 05:28:11 -06:00
f877d7dcd0 Replace egrep/fgrep with grep -E/-F
There are days when I really, really, really hate GNU. Remember
when someone decided that 'head -1' would no longer work, and
that it was OK to break an infinite number of legacy production
scripts? Someone now decided that egrep/fgrep are deprecated,
and our CI logs (especially pr-should-include-tests) are now
filled with hundreds of warning lines, making it difficult
to find actual errors.

I expect that those warnings will be removed quickly after
furious community backlash, just like the 'head -1' fiasco
was quietly reverted, but ITM the warnings are annoying
so I capitulate.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-05-03 07:32:42 -06:00
260bc3ec4c vendor: bump containers/(storage, common, buildah, image)
Bump containers/(storage, common, buildah and image)

Changes since 2023-01-01:
 - skip mount-cache-selinux-long-name test under remote, with
   a FIXME requesting that someone see if it can be made to work.

 - skip six tests that fail under rootless-remote

 - add new --build-arg-file option:
 - update man page

Squash of:
* cf56eb1865
* 561f082772

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Aditya R <arajan@redhat.com>
2023-04-10 17:30:14 +05:30
c8eeab21cf Merge pull request #16315 from flouthoc/remote-ignore-symlink
remote,build: ignore if `.containerignore` or `.dockerignore` is a symlink outside of buildContext
2023-03-28 23:23:07 +02:00
159936a114 bud tests: rootless remote: use correct socket path
Another followup to #17608. Nightly tests were hanging,
because /run/podman/podman.sock was hardcoded (bad idea
for rootless). Poor testing on my part.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-03-13 10:59:38 -06:00
6babef5983 Cirrus: Fix git config permission denied
The buildah bud tests run rootless, so attempting to bypass the
ident-check with a `git config --system` fails with a permission denied
error (as it should).  Update the command to use `--global` instead,
which writes to `~/.gitconfig` and so works for regular users.

Also setup a fake identity for the CI-user and enable shell-debugging
for the commands to inform humans of what is happening in the script.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-28 10:52:20 -05:00
0f92e19e8e Cirrus: Fix bud tests failing to apply patches
For some weeks or longer, the buildah bud tests have been failing under
cirrus-cron with the message:

```
+ git am --reject
Committer identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for
<some30462dude@cirrus-task-5479994827210752.c.libpod-218412.internal>)
not allowed
```

Fix this by marking the clone directory "safe" when the script is
running under CI.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-27 12:08:41 -05:00
d838c08b30 buildah-bud tests: don't sudo when rootless is desired
Followup to #17608, rootless buildah-bud in cron. I forgot
one crucial step, skipping the sudo.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-02-24 05:49:45 -07:00
642e9ddb8d Skip buildah-bud test
Test is completely broken, see buildah issue 4396.

Thanks to @edsantiago for the patch.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-22 10:44:03 -05:00
9db657f40c Clean up more language for inclusiveness
We had a number of references, mostly in docs, to the word master that
can now be changed to main.  This PR does that and makes the project a
bit more inclusive.

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2023-01-27 09:40:27 -05:00
70e8f6243a remote,build: error if containerignore is symlink
Drop support for remote use-cases when `.containerignore` or
`.dockerignore` is a symlink pointing to arbitrary location on host.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-01-26 16:11:51 +05:30
07d297ca3d Cirrus: preserve podman-server logs
Output from podman system service, on system tests, is
being saved... it just hasn't been collected as an artifact.
Start collecting it. And, remove obsolete-unused-misleading
code that made me think it _was_ being collected.

Also: log system-service output for bud tests, and set
log-level to info per suggestion from @Luap99

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-19 06:27:43 -07:00
9f6cf50d52 podman-remote build add --volume support
Just like podman-remote run users should still be able to set volumes,
of course the source must be on the server machine but this is already
the case for podman machine for example.

Fixes #16694

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-12-08 17:10:46 +01:00
56fae7dd0e buildah bud tests: better handling of remote
When I first enabled buildah-bud tests under podman-remote (#9887),
I got one aspect all wrong: I added a podman-remote() helper function
to match the podman() one. Turns out it's never actually called,
even when $PODMAN_BINARY=podman-remote, because functions/aliases
don't work that way.

The way it works is, those few cases in which bud.bats runs
podman are not magically remapped to podman-remote, they use
the podman() function. That's where we need to check if
we're using podman-remote, and that's where we need to
remove the registry-and-rootdir options.

With this fix, we can reenable two previously-skipped bud tests.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-02 05:59:40 -06:00
9003cdbf62 Do not report that /usr/share/containers/storage.conf has been edited.
Only want to report if user created local customized storage in
/etc/containers/storage.conf or in
$HOME/.config/containers/storage.conf, when resetting storage.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-29 11:24:56 -04:00
6fe64591d6 Update vendor containers/(common,storage,buildah,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-10-28 06:16:22 -04:00
237d41f3fb FIXME: Temporary workaround for ubi8 CI breakage
Emergency import of https://github.com/containers/buildah/pull/4377
required because the ubi8 image changed behind our backs.

On podman main, this commit will be reverted by Ed's
treadmill as soon as a new buildah is vendored into podman.

On side branches, the human doing the vendoring will need to
perform manual surgery. I hope the instructions are good enough.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-10-26 10:54:56 -06:00
f5e83f6849 Fixup Buildah merge
Changes since 2022-09-09:
 - man page: add --skip-unused-stages (buildah 4249)
 - man page: bring in new Note for --cache-ttl (4248)
 - system tests: de-stutter (4205)

 - (internal): in skip() applier: escape asterisk, otherwise
   the "bud with --dns* flags" sed expression never applies.

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-23 14:13:12 -04:00
cfbc4aaeb5 Cleanup: fix problems reported by shell lint
Followup to #15616, which is not usable as it is (way, way, way
too much noise) but actually found a few real nits that should
be fixed.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-15 20:10:34 -06:00
8e1aa7af3a Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

Changes since 2022-08-16:

 - buildah 4139: minor line-number changes to the diff
   file because helpers.bash got edited

 - buildah 4190: skip the new test if remote

 - buildah 4195: add --retry / --retry-delay

 - changes to deal with vendoring gomega, units

 - changes to the podman login error message in system test

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-09-09 11:59:27 +02:00
3738221c52 test: update apply-podman-deltas for new tests
Skip some newly added test for remote and modify error output of a test
case which is reporter early in case of podman.

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-08-09 09:13:14 +05:30
94e0a364a8 Semiperiodoc cleanup of obsolete FIXMEs
Some refer to issues that are closed. Remove them.

Some are runc bugs that will never be fixed. Say so, and remove
the FIXME.

One (bps/iops) should probably be fixed. File an issue for it, and
update comment to include the issue# so my find-obsolete-skips script
can track it.

And one (rootless mount with a "kernel bug?" comment) is still
not fixed. Leave the skip, but add a comment documenting the symptom.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-25 13:08:35 -06:00
1aafb01a99 buildah vendor treadmill
As you run --sync, please update this commit message with your
actual changes.

Changes since 2022-06-14:
 - apply-podman-deltas: (minor) buildah 4057 changed the name
   of a test; make corresponding change here

 - apply-podman-deltas: buildah 4071 adds a new OCI-hook
   test that's failing in remote. Skip it.

 - apply-podman-deltas: buildah 4096 changed an error message

 - apply-podman-deltas: buildah 4097 added a test that doesn't
   work with podman-remote

 - run-buildah-bud-tests: only run 'sudo --validate' if we
   need to sudo later (for running tests). Otherwise, same
   thing: I run the treadmill script, step away, and come
   back to an unnecessary sudo prompt.

 - system tests: the new containers-storage changes some
   error messages; fix tests to reflect that. (And, unrelated,
   fix a red cleanup warning)

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:49:33 -04:00
5f848d89ed Run codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-18 10:42:04 -04:00