Commit graph

918 commits

Author SHA1 Message Date
Chris Evich
83163f87d6
Fix protobuf registration conflict by removing go-criu/v5 dependency
Commit "Fix compilation errors for v4.4.1-rhel compatibility"
introduced both go-criu/v5 and go-criu/v6 dependencies, causing a
protobuf registration conflict error:

    panic: proto: file "stats/stats.proto" is already registered
            previously from: "github.com/checkpoint-restore/go-criu/v5/stats"
            currently from:  "github.com/checkpoint-restore/go-criu/v6/stats"

Fix this by:
- Removing go-criu/v5 from go.mod
- Updating all imports from v5 to v6 in:
  * pkg/criu/criu_linux.go
  * pkg/checkpoint/crutils/checkpoint_restore_utils.go
  * test/e2e/checkpoint_test.go
- Regenerating vendor directory with 'make vendor'

Generated with the Assistance of AI: Cursor <auto>

Signed-off-by: Chris Evich <cevich@redhat.com>
2026-03-30 15:13:31 -04:00
Chris Evich
be7b956790
Fix compilation errors for v4.4.1-rhel compatibility
Align codebase with v4.4.1-rhel PodmanConfig structure
and API signatures to resolve compilation errors.

- Update all cfg.Engine.* references to
  cfg.ContainersConf.Engine.* or
  cfg.ContainersConfDefaultsRO.Engine.*
- Update all cfg.Network.* references to
  cfg.ContainersConf.Network.*
- Update all cfg.Containers.* references to
  cfg.ContainersConf.Containers.* or
  cfg.ContainersConfDefaultsRO.Containers.*
- Update cfg.Machine.* references to
  cfg.ContainersConfDefaultsRO.Machine.*
- Fix PodmanConfig initialization in config.go to use
  ContainersConf and ContainersConfDefaultsRO fields

- Add createOptions parameter to NetworkCreate method
  across all implementations (abi, tunnel, handlers)
- Update ContainerEngine interface to match new
  NetworkCreate signature
- Fix manager.Store call in secrets.go to use
  StoreOptions struct
- Update DiskUsage to handle 3 return values
- Fix NewConnectionWithIdentity call signature

- Remove duplicate setupRemoteConnection function
- Remove duplicate readRemoteCliFlags function
- Remove duplicate function declarations in
  container_path_resolution.go, oci_conmon_linux.go
- Comment out duplicate SpecGenToOCI and helper
  functions in oci.go/oci_linux.go
- Remove unused imports across multiple files
- Fix SSHMode flag handling (field doesn't exist in
  current PodmanConfig)

- Fix ns.NetNS type handling in container_internal_linux.go
- Add missing Terminal() method to Container struct
- Add missing SdNotifySocket field to ContainerConfig
- Fix DefaultCapabilities to use .Get() method
- Fix cgroups.AvailableControllers reference
- Fix ConmonPath type conversion (attributedstring.Slice)
- Add missing ErrNetworkConnected error definition
- Fix NetworkCreateOptions handling in secrets.go

- Update networking code to use getNetNSPathCommon helper
- Fix teardownNetwork method signature
- Fix makeInspectPorts to makeInspectPortBindings
- Remove hardcoded IsPasta() checks
- Fix runtime_libpod.go field access patterns

All changes align with the v4.4.1-rhel worktree structure
to ensure compatibility with upcoming cherry-picks.

Substantially Assisted-by AI: Cursor <auto>
Signed-off-by: Chris Evich <cevich@redhat.com>
2026-03-30 14:52:52 -04:00
tomsweeneyredhat
55775faaf9
Adjust for common bump
(cherry picked from commit e035eb4ffa)

The vendoring of Buildah dragged in a bump of common from v0.51.4 to
v0.57.7 which contained many changes to variable and function names.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2026-01-28 10:48:05 -05:00
tomsweeneyredhat
2ba0070cc4
Bump runc to 1.2.9, Buildah 1.29.6
Cherry picked from commit 2e8bce201e with
additional updates required for the v4.2.0-rhel branch.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>

Assisted by AI: Cursor <Auto>
Signed-off-by: Chris Evich <cevich@redhat.com>
2026-01-28 10:45:58 -05:00
David Shea
62cf7b5032 Update filepath-securejoin
Use a fork of v0.4.1 in order to add support for go 1.17.

Signed-off-by: David Shea <dshea@redhat.com>
2025-09-17 08:40:41 -04:00
Paul Holzinger
f34c2726fc
vendor: bump to golang.org/x/crypto@v0.36.0
Fixes: CVE-2025-22869
Fixes: https://issues.redhat.com/browse/RHEL-81320
Fixes: https://issues.redhat.com/browse/RHEL-81301
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-03-11 19:18:53 +01:00
David Shea
50295e5e5d [v4.2.0-rhel] Update buildah for CVE-2024-11218
Addresses:
https://issues.redhat.com/browse/RHEL-67598

[NO NEW TESTS NEEDED]

Signed-off-by: David Shea <dshea@redhat.com>
2025-01-30 15:30:22 -05:00
David Shea
c1d643e387 [v4.2.0-rhel] Update buildah for CVE-2024-9675
Addresses:
https://issues.redhat.com/browse/RHEL-62376
https://issues.redhat.com/browse/RHEL-62385

[NO NEW TESTS NEEDED]

Signed-off-by: David Shea <dshea@redhat.com>
2024-10-25 11:18:07 -04:00
Matt Heon
e331f5cd8d Update gorilla/schema to v1.4.1 to fix CVE-2024-37298
Ref: RHEL-45919

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-07-03 14:41:51 -04:00
tomsweeneyredhat
e1b0a045d4 [v4.2.0-rhel] Bump Buildah to v1.27.4
As the title says.  Bumping to address:
CVE-2024-1753

https://issues.redhat.com/browse/RHEL-26761

[NO NEW TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-04-02 16:52:20 -04:00
Kir Kolyshkin
1135947b28 Use a branched runc instead of manual vendor changes
Commit 3e7ca842a manually patched runc/libcontainer in vendor, which is
OK but creates a maintenance problem down the line.

Instead, let's
 - create a branch[1] based on runc commit used here;
 - backport the CVE-2024-21626 fixes;
 - vendor the above branch here.

As a side note, all this mess could have been avoided if
https://github.com/opencontainers/runc/pull/3508 was backported
to a stable runc branch. Alas, this was never requested.

[1] https://github.com/projectatomic/runc/tree/podman-v4.2.0-rhel

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-03-06 19:33:45 -08:00
Matt Heon
3e7ca842a6 Manually patch vendor/ to address CVE-2024-21626
We can't bump runc in this branch, it brings in too many other
things that won't build on this old Golang (this branch is still
on v1.16).

So, instead, backport the runc patches to this older runc.

The good news: We vendor very little of runc, so this was not all
that difficult.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-02 10:22:59 -05:00
Giuseppe Scrivano
a4e0784651
vendor: bump containers/storage
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-12-23 20:22:26 +01:00
Giuseppe Scrivano
097aba1a53
vendor: bump to c/common v0.49.3
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-12-16 15:09:24 +01:00
tomsweeneyredhat
0f8ba63f04 [v4.2-rhel] Bump Buildah to v1.27.3
Bump Buildah to v1.27.3 which itself bumps opencontainers/selinux to
1.10.2, has fixes for the sticky bit, allows containers to be
restarted in a pod when they should be, a fix for a RHEL subscription issue,
 and s390x segv issues across RHEL 8.7 and 9.1 Zstreams

Addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=2150416
https://bugzilla.redhat.com/show_bug.cgi?id=2150428
https://bugzilla.redhat.com/show_bug.cgi?id=2137294
https://bugzilla.redhat.com/show_bug.cgi?id=2149775
https://bugzilla.redhat.com/show_bug.cgi?id=2152027
https://bugzilla.redhat.com/show_bug.cgi?id=2152017
https://bugzilla.redhat.com/show_bug.cgi?id=2150433
https://bugzilla.redhat.com/show_bug.cgi?id=2150432
https://bugzilla.redhat.com/show_bug.cgi?id=2136928
https://bugzilla.redhat.com/show_bug.cgi?id=2149776
https://bugzilla.redhat.com/show_bug.cgi?id=2152026
https://bugzilla.redhat.com/show_bug.cgi?id=2152022
https://bugzilla.redhat.com/show_bug.cgi?id=2152042
https://bugzilla.redhat.com/show_bug.cgi?id=2152043

[NO NEW TESTS NEEDED]
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-12-09 19:58:50 -05:00
Daniel J Walsh
3fbf30e6a6
Merge pull request #16416 from mheon/bump_cs
[v4.2.0-rhel] Bump c/storage to include #1423
2022-11-04 15:41:52 -04:00
Matthew Heon
45fb29067b Bump c/storage to include #1423
There was a bug on s390x related to clone syscall argument order.
C/storage PR #1423 fixes it; this vendors into Podman to close
the loop and complete the fix.

Fixes RHBZ 2140084

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-11-04 13:46:14 -04:00
Miloslav Trmač
b3feda84bc Update to c/image 5.22.1
> go get github.com/containers/image/v5@v5.22.1
> make vendor

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-10-19 18:58:18 +02:00
Matthew Heon
dce3d6ee9d Add support for containers.conf volume timeouts
Also, do a general cleanup of all the timeout code. Changes
include:
- Convert from int to *uint where possible. Timeouts cannot be
  negative, hence the uint change; and a timeout of 0 is valid,
  so we need a new way to detect that the user set a timeout
  (hence, pointer).
- Change name in the database to avoid conflicts between new data
  type and old one. This will cause timeouts set with 4.2.0 to be
  lost, but considering nobody is using the feature at present
  (and the lack of validation means we could have invalid,
  negative timeouts in the DB) this feels safe.
- Ensure volume plugin timeouts can only be used with volumes
  created using a plugin. Timeouts on the local driver are
  nonsensical.
- Remove the existing test, as it did not use a volume plugin.
  Write a new test that does.

The actual plumbing of the containers.conf timeout in is one line
in volume_api.go; the remainder are the above-described cleanups.

Backported to v4.2.0-rhel per RHBZ 2125241

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-10-06 15:07:10 -04:00
Aditya R
49125dccb5
vendor: bump buildah to v1.27.1
Podman build: Add container GID to additional groups

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-09-09 16:47:10 +05:30
Aditya R
a382bd329e vendor: bump buildah to v1.27.0
Bump buildah to v1.27.0

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-08-10 16:46:04 -04:00
Miloslav Trmač
5c95c0920f Add support for creating sigstore signatures, and providing passphrases
- Allow creating sigstore signatures via --sign-by-sigstore-private-key .
  Like existing --sign-by, it does not work remote (in this case
  because we would have to copy the private key to the server).
- Allow passing a passphrase (which is mandatory for sigstore private keys)
  via --sign-passphrase-file; if it is not provided, prompt interactively.
- Also, use that passphrase for --sign-by as well, allowing non-interactive
  GPG use. (But --sign-passphrase-file can only be used with _one of_
  --sign-by and --sign-by-sigstore-private-key.)

Note that unlike the existing code, (podman build) does not yet
implement sigstore (I'm not sure why it needs to, it seems not to
push images?) because Buildah does not expose the feature yet.

Also, (podman image sign) was not extended to support sigstore.

The test for this follows existing (podman image sign) tests
and doesn't work rootless; that could be improved by exposing
a registries.d override option.

The test for push is getting large; I didn't want to
start yet another registry container, but that would be an
alternative.  In the future, Ginkgo's Ordered/BeforeAll
would allow starting a registry once and using it for two
tests.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-02 16:52:56 +02:00
Miloslav Trmač
eacee60c83 Update c/common to an unreleased version
... to get https://github.com/containers/common/pull/1106 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-02 16:52:56 +02:00
Valentin Rothberg
dc1dc46006 podman-remote pull: fix duplicate progress outputs
By vendoring the fixes from containers/image.  Also add a test (thanks
@edsantiago) to make sure we won't regress in the future again.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-26 13:51:56 -04:00
Daniel J Walsh
76fa804472 Vendor in latests containers/storage and opencontainers/runtime-tools
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-26 13:35:01 -04:00
Daniel J Walsh
9c1de040b3 Vendor in containers/(storage,image, common, buildah)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-26 13:34:38 -04:00
Sascha Grunert
a78be890ee Switch to github.com/blang/semver/v4
Switch to the latest version of the now go module compatible release.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-07-26 13:22:46 -04:00
Paul Holzinger
cc6faddfaa
use c/common code for resize and CopyDetachable
Since conmon-rs also uses this code we moved it to c/common. Now podman
should has this also to prevent duplication.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-06 16:57:07 +02:00
Charlie Doern
b92149e2a8 podman pod create --memory
using the new resource backend, implement podman pod create --memory which enables
users to modify memory.max inside of the parent cgroup (the pod), implicitly impacting all
children unless overriden

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-01 13:44:32 -04:00
dependabot[bot]
6904b1a610
build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-29 12:09:48 +00:00
Valentin Rothberg
2ee9fe4cbd vendor containers/common
Pull in fixes for platform checks to silence annoying warnings when
pulling images by platforms using uname values.

Fixes: #14669
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-28 17:12:56 +02:00
Giuseppe Scrivano
28e2a604b4
vendor: update containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-27 20:22:20 +02:00
openshift-ci[bot]
088665d2cf
Merge pull request #14654 from cdoern/cgroup
podman cgroup enhancement
2022-06-27 15:14:20 +00:00
cdoern
2792e598c7 podman cgroup enhancement
currently, setting any sort of resource limit in a pod does nothing. With the newly refactored creation process in c/common, podman ca now set resources at a pod level
meaning that resource related flags can now be exposed to podman pod create.

cgroupfs and systemd are both supported with varying completion. cgroupfs is a much simpler process and one that is virtually complete for all resource types, the flags now just need to be added. systemd on the other hand
has to be handeled via the dbus api meaning that the limits need to be passed as recognized properties to systemd. The properties added so far are the ones that podman pod create supports as well as `cpuset-mems` as this will
be the next flag I work on.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-06-24 15:39:15 -04:00
dependabot[bot]
041947b11a
Bump github.com/stretchr/testify from 1.7.4 to 1.7.5
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-24 12:09:16 +00:00
Paul Holzinger
050693b2e7
bump github.com/spf13/cobra from 1.4.0 to 1.5.0
Update cobra to latest version. Remove workaround for podman -h.
Also regenerate the completion scripts.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-21 17:17:06 +02:00
dependabot[bot]
cfba09f682
Bump github.com/stretchr/testify from 1.7.2 to 1.7.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 12:10:35 +00:00
Daniel J Walsh
8090445762
vendor in latests containers/image
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-17 06:10:24 -04:00
Daniel J Walsh
3af047b63d
Vendor in latest containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-16 14:05:43 -04:00
Daniel J Walsh
5e9d20448c
Update vendor of containers/buildah
Changes since 2022-05-31:
  - add --omit-history option (buildah PR 4028)

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-13 17:54:17 -04:00
Valentin Rothberg
46c8da7d9a vendor buildah@main
Note that the bud-logfile-with-split-logfile-by-platform test is skipped
on the remote client (see #14544).

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-10 09:42:19 +02:00
dependabot[bot]
7e97675025
Bump github.com/opencontainers/runc from 1.1.2 to 1.1.3
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.3/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.3)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 12:15:39 +00:00
OpenShift Merge Robot
b4c981893d
Merge pull request #14220 from Luap99/resolvconf
use resolvconf package from c/common/libnetwork
2022-06-07 18:00:34 -04:00
Paul Holzinger
90d80cf81e
use resolvconf package from c/common/libnetwork
Podman and Buildah should use the same code the generate the resolv.conf
file. This mostly moved the podman code into c/common and created a
better API for it so buildah can use it as well.

[NO NEW TESTS NEEDED] All existing tests should continue to pass.

Fixes #13599 (There is no way to test this in CI without breaking the
hosts resolv.conf)

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-07 15:17:04 +02:00
Paul Holzinger
ddf1d2cb38
update c/common to latest
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-07 15:13:55 +02:00
dependabot[bot]
0f424e90d5
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.16+incompatible to 20.10.17+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.16...v20.10.17)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 12:11:29 +00:00
dependabot[bot]
5c508cb4ef
Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 12:09:32 +00:00
dependabot[bot]
6dffa453a4
Bump github.com/containernetworking/cni from 1.1.0 to 1.1.1
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/cni
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 12:09:57 +00:00
Aditya R
66a56ce05a
vendor: bump buildah to v1.26.1-0.20220524184833-5500333c2e06
Bump buildah to v1.26.1-0.20220524184833-5500333c2e06

Signed-off-by: Aditya R <arajan@redhat.com>
2022-05-26 21:01:31 +05:30
Daniel J Walsh
819e5bcb94
Merge pull request #14342 from containers/dependabot/go_modules/github.com/vbauerster/mpb/v7-7.4.2
build(deps): bump github.com/vbauerster/mpb/v7 from 7.4.1 to 7.4.2
2022-05-25 13:06:21 -04:00