Commit Graph

3179 Commits

Author SHA1 Message Date
Valentin Rothberg e71bf4ce52 apparmor: fix parsing beta/alpha version
Copied from github.com/moby/moby who already has a fix for it.
Tested manually on a Ubuntu 23.10 (beta) VM.

Fixes: #containers/podman/issues/20278
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-06 11:41:58 +02:00
openshift-ci[bot] e6cf463d8d Merge pull request #1686 from containers/renovate/golang.org-x-crypto-0.x
Update module golang.org/x/crypto to v0.14.0
2023-10-06 07:33:54 +00:00
openshift-ci[bot] 01d87f70c1 Merge pull request #1688 from containers/renovate/golang.org-x-term-0.x
Update module golang.org/x/term to v0.13.0
2023-10-06 07:27:33 +00:00
renovate[bot] 3ad04a9f65 Update module golang.org/x/term to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 22:01:17 +00:00
renovate[bot] 211d9f0730 Update module golang.org/x/crypto to v0.14.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-05 16:59:41 +00:00
openshift-ci[bot] 9860cad0f8 Merge pull request #1683 from vrothberg/privileged
containers.conf: add `privileged` field to containers table
2023-10-05 12:48:09 +00:00
openshift-ci[bot] f57d5be635 Merge pull request #1675 from vrothberg/attributed-string-slice
POC: appendable string arrays in containers.conf
2023-10-05 12:08:59 +00:00
Valentin Rothberg 395ba05c44 POC: appendable string arrays in containers.conf
As discussed in https://github.com/containers/podman/issues/20000, we
need an opt-in mechanism to _append_ string arrays during loading
sequence of containers.conf files.

At the moment, existing fields/data will be overriden with each loaded
config that sets the specified field/option.  The TOML (toml.io) config
format does not allow for attributing fields and structs are implicitly
represented as "tables".  I wanted to extend a string array with a
simple boolean field, for instance:
```TOML
env=["FOO=bar"]
env.append=true
```

TOML doesn't suppor tthe upper idea as it's not a properly formatted
table.  So I looked for alternatives and found that TOML supports
so-called "mixed-type arrays".  As the same suggests, such arrays allow
for including more than one type and that seemed like a reasonable
candidate as it allows for _extending_ the existing syntax without
introducing new fields or even yet-another way of loading conf files.

The new format can be seen in the tests.  Please note that this is just
a _tested_ POC.  Integrating the POC in containers.conf may turn into a
bigger journey as Podman is directly (ab)using many of the fields.
Since they have to be changed to the new type (see POC), Podman will not
compile without changes.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-05 13:32:26 +02:00
openshift-ci[bot] abe07fd625 Merge pull request #1684 from Luap99/go-test
Makefile: simplify unit tests
2023-10-05 11:31:09 +00:00
Valentin Rothberg ac851d5930 containers.conf: add `privileged` field to containers table
As requested in containers/podman/issues/20000, add a `privileged` field
to the containers table in containers.conf.  I was hesitant to add such
a field at first (for security reasons) but I understand that such a
field can come in handy when using modules - certain workloads require a
privileged container.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-05 13:22:35 +02:00
Paul Holzinger c6424dbe78 Makefile: simplify unit tests
Just test all sub dirs instead of having to list them one by one.
Also the remote tag is only used by pkg/config so no need to test all
the others as well. Also keep the seccomp tag, we cannot add it to
the default as this breaks the cross builds form some reason.

Fixes #1681

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-05 13:07:20 +02:00
openshift-ci[bot] 3276349d24 Merge pull request #1680 from containers/renovate/github.com-docker-distribution-2.x
Update module github.com/docker/distribution to v2.8.3+incompatible
2023-10-03 10:36:24 +00:00
renovate[bot] 710c8aadc5 Update module github.com/docker/distribution to v2.8.3+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-03 09:59:40 +00:00
openshift-ci[bot] bcd8028c98 Merge pull request #1682 from vrothberg/codespell
URGENT: heal CI: fix codespell
2023-10-03 09:58:44 +00:00
Valentin Rothberg 6923f768c2 URGENT: heal CI: fix codespell
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-10-03 11:15:37 +02:00
OpenShift Merge Robot dc1d5cc2d5 Merge pull request #1679 from containers/renovate/github.com-opencontainers-runtime-tools-digest
Update github.com/opencontainers/runtime-tools digest to 408c51e
2023-10-02 05:19:08 -04:00
renovate[bot] 8106072f0d Update github.com/opencontainers/runtime-tools digest to 408c51e
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-01 08:44:47 +00:00
OpenShift Merge Robot 12f1c98dc5 Merge pull request #1676 from umohnani8/filters
Fix ID and Digest filters
2023-09-29 08:06:46 -04:00
OpenShift Merge Robot 6fbedd56ab Merge pull request #1667 from Luap99/fips
pkg/subscriptions: add /etc/crypto-policies/config in fips mode
2023-09-29 06:38:28 -04:00
Paul Holzinger 2c6150dc59 pkg/subscriptions: add /etc/crypto-policies/config in fips mode
Make sure /etc/crypto-policies/config is bind mounted from the host so
it does contain the proper FIPS value and a reinstall of
crypto-policies-scripts does not overwrite the existing files with the
default config.

We create a tmpfile and write FIPS to it so we can bind mount it and the
contianer can change the config if needed.

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

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-29 10:52:04 +02:00
OpenShift Merge Robot e084ed12a4 Merge pull request #1677 from jakecorrenti/network-negated-label-match
Use MatchNegatedLabelFilter function for networks
2023-09-29 01:58:24 -04:00
Jake Correnti 4b80aae136 Use MatchNegatedLabelFilter function for networks
Changes `createPruneFilterFuncs` to use
`filters.MatchNegatedLabelFilters` instead of
`!filters.MatchLabelFilters` when matching on negated labels (label!).

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-09-28 18:20:30 -04:00
OpenShift Merge Robot abeadc4063 Merge pull request #1670 from TomSweeneyRedHat/dev/tsweeney/cccontact
Add list members emails to the CoC
2023-09-28 14:40:37 -04:00
TomSweeneyRedHat f78437ad72 Add list members emails to the CoC
Add a list of the members in the mailing list
on podman.io.  I will also add a note in the desription
of that list to modify this page when changes are made
there.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2023-09-28 14:25:17 -04:00
OpenShift Merge Robot 0f97b7cb75 Merge pull request #1666 from flouthoc/manifest-retry
libimage: implement `retry` logic for  `manifest push`
2023-09-28 13:59:25 -04:00
Aditya R 72c6636175 libimage: add retry options for manifest push
manifest push API must implement and leverage `retry` logic similar to
`image push` with similar defaults.

Closes: https://github.com/containers/common/issues/1664

Signed-off-by: Aditya R <arajan@redhat.com>
2023-09-28 22:26:38 +05:30
Urvashi Mohnani 25bcd08753 Fix ID and Digest filters
The id and digest filters for podman images was broken
as it would only match on the full ID or Digest, so when
users would give a substring of either not results would be
given even though there were matches.
Fix to check on prefix now instead.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2023-09-28 12:18:08 -04:00
OpenShift Merge Robot 1bfd78908a Merge pull request #1674 from containers/renovate/github.com-onsi-gomega-1.x
Update module github.com/onsi/gomega to v1.28.0
2023-09-28 09:44:42 -04:00
renovate[bot] 7bb8d8eb12 Update module github.com/onsi/gomega to v1.28.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-28 13:26:20 +00:00
OpenShift Merge Robot e54032bc3a Merge pull request #1673 from MrSuicideParrot/vrf-netavark
Add support for vrf option on netavark
2023-09-28 05:38:53 -04:00
André Cirne 5f5ea095f6 Add support for vrf option on netavark
Signed-off-by: André Cirne <dumahk21@gmail.com>
2023-09-28 09:13:44 +01:00
OpenShift Merge Robot 7601c3fc00 Merge pull request #1671 from flouthoc/run_manifest_test
Makefile, libimage: `test-unit` must cover `libimage/manifests_test.go`
2023-09-28 03:32:15 -04:00
Aditya R d48687f258 Makefile: run libimage tests recursively
Manifests tests were not running at all in upstream CI, following PR
fixes that.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-09-28 12:04:30 +05:30
Aditya R 8282fed5ba manifests_test: fix tests for compression formats
Signed-off-by: Aditya R <arajan@redhat.com>
2023-09-28 12:03:48 +05:30
OpenShift Merge Robot 4c0771759b Merge pull request #1668 from Luap99/cni-race
libnetwork/cni: ignore ENOENT while reading networks
2023-09-27 13:43:06 -04:00
OpenShift Merge Robot 07664b1b3d Merge pull request #1669 from Luap99/coc-mail
CoC: fix email link
2023-09-27 12:00:35 -04:00
Paul Holzinger 738724aa3b CoC: fix email link
This is not a web address so we should not link it as such. Putting it
in greater equal or smaller equal signs will correctly make it a mailto
link so the local mail client will open correctly.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-27 17:01:40 +02:00
Paul Holzinger 80f1e50c0c libnetwork/cni: ignore ENOENT while reading networks
At this point we already read the config file but here we have to get
timestamp here so we can hit another ENOENT if it was removed in the
meantime. Just ignore this and do not log an error as this is normal
behavior when another process is deleting a network in parallel.

Fixes containers/podman#20173

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-27 15:51:46 +02:00
OpenShift Merge Robot a280bbde45 Merge pull request #1665 from testwill/pkg-import
chore: import packages only once
2023-09-27 04:00:07 -04:00
guoguangwu 97991b9967 chore: import packages only once
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-27 15:02:02 +08:00
OpenShift Merge Robot 1b40528313 Merge pull request #1661 from jakecorrenti/match-negated-label
Implement negated label match function
2023-09-25 12:41:39 -04:00
OpenShift Merge Robot 9fd112d7ef Merge pull request #1660 from vrothberg/fix-podman-19938
pkg/config: do NOT set StaticDir and VolumeDir
2023-09-22 06:41:22 -04:00
OpenShift Merge Robot fa6d387fd4 Merge pull request #1659 from ashley-cui/cpus
Default machine CPUs to Cores/2
2023-09-21 11:42:19 -02:30
Jake Correnti 348e7230b4 Implement negated label match function
Adds a proper way to match on negated label filters (label!).
(label!) filters. The current logic used is to do !MatchLabelFilter()
but this results in chained negated labels being ORed together instead of ANDed.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-09-21 09:59:45 -04:00
Valentin Rothberg 7cad0ac3a8 pkg/config: do NOT set StaticDir and VolumeDir
Let callers (i.e., Podman) decide which defaults to chose.  This way,
callers know when to override defaults (i.e., when the values are
empty).

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-21 11:27:13 +02:00
Valentin Rothberg ab4a3cc433 pkg/config: remove *DirSet fields
They are not correctly and inconcistently being used by Podman making it
super hard to know what's going on.  Just remove them for now and deal
with the remaining chaos in subsequent changes in common and Podman.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-21 11:27:13 +02:00
Ashley Cui 14bd78db61 Default machine CPUs to Cores/2
1 CPU core typically is not enough for most use cases, so we default to available cores/2 for new machines.

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-09-20 15:10:16 -04:00
OpenShift Merge Robot 3f8ef60574 Merge pull request #1640 from cgiradkar/Issue-15588
Remove ActiveDestination method to move into podman
2023-09-20 16:46:21 +02:00
Chetan Giradkar 819434a2ea Remove ActiveDestination method to move into podman
The method ActiveDestination was being used only by Podman and there seemed to code complications as the code is split in multiple parts. Hence, moved the code to Podman to make it more readable and efficient.

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-09-20 13:29:52 +01:00
OpenShift Merge Robot 0b6838f4d2 Merge pull request #1657 from rhatdan/run
Split up util package into pkg/password, pkg/copy, pkg/version
2023-09-20 13:07:29 +02:00