22387 Commits

Author SHA1 Message Date
e412eff33f Clean machine pull cache
Cache cleanups only happen if there is a cache miss, and we need to pull a new image

For quay.io/podman/machine-os, we remove all old images from the cache dir. This means we will delete any file that exists in the cache dir; this should be safe to do since the machine pull code should be the only thing touching this cache dir. OCI machine images will always have a different manifest, and won’t be updated with the same manifest, so if the version moves on, there isn’t a reason to keep the old version in the cache, it really doesn’t change.

For Fedora (WSL), we use the cache, so we go through the cache dir and remove any old cached images, on a cache miss. We also switch to using ~/.local/share/containers/podman/machine/wsl/cache as the cache dir rather than ~/.local/share/containers/podman/machine/wsl. Both these behaviors existed in v4.9, but are now added back into 5.x.

For generic files pulled from a URL or a non-default OCI image, we shouldn’t actually cache, so we delete the pulled file immediately after creating a machine image. This restores the behavior from v4.9.

For generic files from a local path, the original file will never be cleaned up

Unsure how to test, so:
[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-04-26 12:31:42 -04:00
273020160c Merge pull request #22504 from mheon/bump_buildah_fix_ci
Bump buildah to fix CI
2024-04-25 18:06:20 +00:00
0ccee4e51f Merge pull request #22489 from edsantiago/exitwitherror-yetmorelowhangingfruit
ExitWithError() - yet more low-hanging fruit
2024-04-25 18:03:36 +00: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
e8a9c58125 Update Makefile to Go 1.22 for in-container
This unbreaks make vendor-in-container now that we have the
`toolchain` line in go.mod.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-04-25 12:12:48 -04:00
1526ebf095 Merge pull request #22461 from containers/renovate/github.com-docker-docker-26.x
fix(deps): update module github.com/docker/docker to v26.1.0+incompatible
2024-04-24 15:42:10 +00:00
e4c9910aec ExitWithError() - yet more low-hanging fruit
Followup to [1]#22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

Just trying to shrink down #22346 to a manageable, reviewable size.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-24 09:04:50 -06:00
1a23451067 Merge pull request #22486 from edsantiago/exitwitherror-morelowhangingfruit
ExitWithError() - more low-hanging fruit
2024-04-24 14:58:22 +00:00
a7c61c31a3 Merge pull request #22465 from Luap99/go1.21
Update to go 1.21
2024-04-24 14:30:59 +00:00
3b212957d5 Merge pull request #22485 from edsantiago/exitwitherror-lowhangingfruit
ExitWithError() - low-hanging fruit
2024-04-24 13:27:27 +00:00
80c3a22440 ExitWithError() - more low-hanging fruit
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

More low-hanging fruit: small reviewable chunks

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-24 07:11:40 -06:00
4da5c5d3aa ExitWithError() - low-hanging fruit
Followup to #22270: wherever possible/practical, extend command
error checks to include explicit exit status codes and error strings.

Because #22346 is stalled, these are some trivial easy-to-review
changes that get us closer to the goal.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-24 05:44:40 -06:00
f82c7cefef Merge pull request #22468 from grisu48/contributing
[CI:DOCS] Remove redundant Prerequisite before build section
2024-04-23 21:34:37 +00:00
5e1c3f58dc Merge pull request #22458 from ashley-cui/artifacts
[CI:DOCS] Fix artifact action
2024-04-23 20:45:08 +00:00
3f78c39c50 Remove redundant Prerequisite before build section
The contents of the "Prerequisite before buil"d section are given already
in a link in its "Prepare your environment" parent section and therefore
redundant. Let's remove it.

Signed-off-by: phoenix <felix.niederwanger@suse.com>
2024-04-23 14:48:46 +02:00
35c2c82df2 Merge pull request #22464 from grisu48/opensuse
[CI:DOCS] Add installation instructions for openSUSE
2024-04-23 12:35:36 +00:00
fa1fd1646e Remove PKG_CONFIG_PATH
Remove the export PKG_CONFIG_PATH which appears not necessary anymore.

Signed-off-by: phoenix <felix.niederwanger@suse.com>
2024-04-23 11:59:09 +02:00
3b28cdfb20 Add installation instructions for openSUSE
Adds the installation instructions for openSUSE, similar to the present
ones for Fedora and Debian/Ubuntu.

Tested on openSUSE Tumbleweed and Leap 15.6.

Signed-off-by: phoenix <felix.niederwanger@suse.com>
2024-04-23 11:57:57 +02:00
83dbbc3a51 Replace golang.org/x/exp/slices with slices from std
Use "slices" from the standard library, this package was added in go
1.21 so we can use it now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-23 11:16:40 +02:00
c04d03ef8c Update to go 1.21
So that we can continue updating our dependencies.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-23 11:07:28 +02:00
6bab09c51d Merge pull request #22457 from lsm5/remove-el8
[skip-ci] Packit/rpm: remove el8 jobs and spec conditionals
2024-04-23 10:17:27 +02:00
c31728ca57 fix(deps): update module github.com/docker/docker to v26.1.0+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 21:47:26 +00:00
c22eefb939 [CI:DOCS] Fix artifact action
Fix a bug where the check uploads section didn't actually mark the os/arch to be built.

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-04-22 15:23:52 -04:00
333682132a [skip-ci] Packit/rpm: remove el8 jobs and spec conditionals
EL8 will go EOL soon and nothing on main will be shipped to el8.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-04-22 11:54:19 -04:00
7986eeaf6a Merge pull request #22429 from lsm5/centos10
[skip-ci] Packit: enable CentOS 10 Stream build jobs
2024-04-22 11:27:02 -04:00
318437f7b5 Merge pull request #22455 from edsantiago/e2e-stop-littering
e2e tests: stop littering
2024-04-22 14:31:09 +00:00
6d347927a6 Merge pull request #22443 from Luap99/podman-healthcheck-events
add containers.conf healthcheck_events support
2024-04-22 13:49:52 +00:00
96331d40d9 Merge pull request #22442 from Luap99/store-error
libpod: wrap store setup error message
2024-04-22 13:47:08 +00:00
ac04cb4ac5 e2e tests: stop littering
"tmpdir + string" does not do what you think it does.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-04-22 06:43:19 -06:00
ac963a7036 Merge pull request #22453 from MHBauer/format-docs-example
[CI:DOCS] format podman-pull example as code
2024-04-22 10:16:48 +00:00
c2cadfb5c5 Merge pull request #22322 from mheon/update_the_config
Make `podman update` changes persistent
2024-04-22 07:50:48 +00:00
27174ff3fb [CI:DOCS] format podman-pull example as code
Signed-off-by: Morgan Bauer <bauer.morgan@gmail.com>
2024-04-21 19:46:39 -07:00
3c15aa3724 Merge pull request #22446 from ashley-cui/artifacts
[CI:DOCS] Build & upload release artifacts with GitHub Actions
2024-04-19 23:03:18 +00:00
e7f0c1947e [CI:DOCS] Build & upload release artifacts with GitHub Actions
Add a new GitHub Action that builds and uploads release artifacts. This action is triggered by publishing a release on GitHub. The action will only build if the specfic artifact is missing.

This action also triggers the Windows installer action, since the Windows installer action depends on an uploaded artifact.

Note that the action runs on ubuntu-22.04

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-04-19 14:16:23 -04:00
2681ab23d1 libpod: getHealthCheckLog() remove unessesary check
Checking if the file exists before opening it anyway is really pointless
and needs a extra syscall and in theory is racy as the file might have
been changed between the two calls. We can simply ignore the ENOENT
error on the ReadFile call.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-19 17:32:55 +02:00
2ae6d0d4dd add containers.conf healthcheck_events support
When the field is set to false we should never log healthcheck events.

Fixes https://issues.redhat.com/browse/RHEL-18987

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-19 17:29:48 +02:00
33def2eea7 vendor latest c/common
Includes the healthcheck_events field.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-19 17:29:48 +02:00
b026e1d635 libpod: make healthcheck events more efficient
We already know the status of the healthcheck in the caller so calling
healthCheckStatus() just make the event code sync the container state
and reread the healthcheck file for no reason.

It is much better to directly pass the status down to the event call.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-19 17:24:44 +02:00
ce9054ff45 libpod: wrap store setup error message
In cases where we fail to configure the error is returned as it and may
be missing useful context. Make sure we know the error happened as part
of the storage setup.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-04-19 16:29:50 +02:00
e83b2cce82 [skip-ci] Packit: enable CentOS 10 Stream build jobs
CentOS 10 Stream rpm builds are now active, so we should add jobs for
those on PRs.

These have to be centos-stream for now and not epel as epel will be
created only after RHEL-10 is released AFAIK, while the centos-stream-10
targets are available in copr now.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-04-19 08:32:30 -04:00
db93e2cf2b Merge pull request #22334 from giuseppe/use-faccessat
use containers/storage/pkg/fileutils/(Exists,Lexists)
2024-04-19 12:32:23 +00:00
6b41fa5c65 Merge pull request #22432 from lsm5/packit-switch-targets
[skip-ci] Packit: switch to EPEL instead of centos-stream+epel-next
2024-04-19 12:29:38 +00:00
b657fc23f0 Merge pull request #22436 from containers/renovate/go-github.com/docker/docker-vulnerability
fix(deps): update module github.com/docker/docker to v26.0.2+incompatible [security]
2024-04-19 10:47:52 +00:00
b7e8d90d8f Merge pull request #22428 from containers/renovate/github.com-onsi-gomega-1.x
fix(deps): update module github.com/onsi/gomega to v1.33.0
2024-04-19 10:45:05 +00:00
e58972cd1d pkg/systemd: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:15 +02:00
acc78af0c3 pkg/bindings: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:15 +02:00
94c699192f pkg/util: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:14 +02:00
0e8d1ad811 pkg/trust: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:14 +02:00
1991990d5a pkg/specgen: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:14 +02:00
aab06ac445 pkg/rootless: use fileutils.(Le|E)xists
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-04-19 09:52:14 +02:00