Commit graph

15851 commits

Author SHA1 Message Date
Giuseppe Scrivano
fa1085ed01 cmd: refuse --userns if a mapping is specified
if an explicit mapping is specified, do not accept `--userns` since it
overriden to "private".

Closes: https://github.com/containers/podman/issues/15233

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-10 16:46:05 -04:00
Toshiki Sonoda
91a1f3022b e2e: Add rootless mount cleanup test
`podman run -d mount cleanup test` adapt to rootless environment.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-10 16:46:05 -04:00
Lokesh Mandvekar
297c722383 [CI:COPR] podman.spec.rpkg: add python3 dependency for el8
EL8 builds are failing because hack/markdown-preprocess needs python3
which AFAICT isn't included by default in EL8 build environments.

This commit also includes an additional `[CI:COPR]` mode which is
currently runs the same tests as `[CI:DOCS]` but could differ in future.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-10 16:46:05 -04:00
Karthik Elango
a6ea3325a0 start filter flag changes
Tying filtering logic for podman stop and start to same place in getContainersAndInputByContext() to reduce code redundancy

Signed-off-by: Karthik Elango <kelango@redhat.com>
2022-08-10 16:46:05 -04:00
Chris Evich
a19c5a2521 Cirrus: Run Cross builds in [CI:DOCS] mode
Fixes: #15189

A while ago I updated the only_if/skip options and forgot that several
"cross build" tasks also build documentation in addition to binaries.  Re-enable
them to execute all the time, except when Cirrus-cron is making our
multi-arch images.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-08-10 16:46:05 -04:00
Valentin Rothberg
e776425e56 podman info: hide --debug
It's a NOP since Podman v2.0 (#5738).

[NO NEW TESTS NEEDED] - does not change behavior.

Fixes: #15185
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-10 16:46:05 -04:00
Valentin Rothberg
53a631ca28 ISSUE TEMPLATE: remove --debug from podman info
`--debug` is a NOP and will be hidden in a later commit.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-10 16:46:05 -04:00
Lokesh Mandvekar
a7d932422d Cirrus: use dnf instead of rpm to install packages
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-10 16:46:05 -04:00
Toshiki Sonoda
8c36b8c521 Cirrus: Fix e2e tests for "mount_rootless_test"
e2e `mount_rootless_test` did not load `podman binary path` successfully.
This PR fix this problem.

[It] podman unshare podman mount:
```
[+1596s] Running: ... unshare  mount <cid>
[+1596s] Error: exec: no command
[+1596s] output:
```

[It] podman unshare image podman mount:
```
[+1599s] Running: ... unshare  image mount quay.io/libpod/alpine:latest
[+1599s] Error: exec: no command
[+1599s] output:
```

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-10 16:46:05 -04:00
Paul Holzinger
bd3e36040a podman generate systemd --new: allow -h hostname
podman run/create can accept `-h <hostname>` as argument. When parsing
flags -h throws an help requested error from pflag. To prevent this
error we have to define the help flag.

Fixes #15124

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-08-10 16:46:05 -04:00
Aditya R
5c17d1b14b test: verify manifest inspect must contain OCI annotations
Signed-off-by: Aditya R <arajan@redhat.com>
2022-08-10 16:46:05 -04:00
Felix Stupp
6b2bbd2d19 podman-volume-import: Reword "precendence"
Signed-off-by: Felix Stupp <me+github@banananet.work>
2022-08-10 16:46:05 -04:00
Felix Stupp
54ee42331a man podman-volume-import: Clarify that merge happens
Current directories and files stay the same with the current implementation as long as the tarball does not contain a directories or files with the same name.

Signed-off-by: Felix Stupp <me+github@banananet.work>
2022-08-10 16:46:05 -04:00
Paul Holzinger
c5c0efc95a podman generate systemd: handle --sdnotify correctly
When a container was created with `--sdnotify value` we would remove
this arg instead of using it like with `--sdnotfiy=value`.

Also when the arg is set to ignore we should force conmon in order to
make the resulting Type=notify units work.

Fixes #15052

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-08-10 16:46:05 -04:00
dependabot[bot]
7e79511454 Bump google.golang.org/protobuf from 1.28.0 to 1.28.1
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.28.0...v1.28.1)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-10 16:46:05 -04:00
Jason T. Greene
8b9e5fb085 Use 8k buffer to help clients w/ broken parsing
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-08-10 16:46:05 -04:00
Daniel J Walsh
7efd81cb8d With --rm option remove container if podman run fails
Fixes https://github.com/containers/podman/issues/15049

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-08-10 16:46:05 -04:00
dependabot[bot]
346b22f070 Bump golang.org/x/tools from 0.1.11 to 0.1.12 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.11 to 0.1.12.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.11...v0.1.12)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-10 16:46:05 -04:00
Valentin Rothberg
5b5e53d704 syncContainer: transition from stopping to exited
Allow the cleanup process (and others) to transition the container from
`stopping` to `exited`.  This fixes a race condition detected in #14859
where the cleanup process kicks in _before_ the stopping process can
read the exit file.  Prior to this fix, the cleanup process left the
container in the `stopping` state and removed the conmon files, such
that the stopping process also left the container in this state as it
could not read the exit files.  Hence, `podman wait` timed out (see the
23 seconds execution time of the test [1]) due to the unexpected/invalid
state and the test failed.

Further turn the warning during stop to a debug message since it's a
natural race due to the daemonless/concurrent architecture and nothing
to worry about.

[NO NEW TESTS NEEDED] since we can only monitor if #14859 continues
flaking or not.

[1] https://storage.googleapis.com/cirrus-ci-6707778565701632-fcae48/artifacts/containers/podman/6210434704343040/html/sys-remote-fedora-36-rootless-host.log.html#t--00205

Fixes: #14859
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-10 16:46:05 -04:00
Toshiki Sonoda
b7feafcb06 Fix: manifest push --rm removes a correct manifest list
This bug is reproduced when we execute the following command:

1. podman manifest add <manifest list> <images exist on local storage>
2. podman manifest push --rm <manifest list> dir:<directory>

If pushing succeeds, it is expected to remove only a manifest list.
However, manifest list remains on local storage and images are removed.

This commit fixes `podman manifest push --rm` to remove only a manifest list.

And, supports `manifest push --rm option` in remote environment,
like host environment.

Fixes: https://github.com/containers/podman/issues/15033

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-10 16:46:05 -04:00
Toshiki Sonoda
24f219efb7 Fix: Restore a container which name is equal to a image name
If there is a match for both container and image, we restore the container.

Fixes: https://github.com/containers/podman/issues/15055

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-10 16:46:05 -04:00
Daniel J Walsh
32848b95f6 When removing objects specifying --force,podman should exit with 0
This Patch will cause podman COMMAND rm --force bogus not fail

This is how Docker works, so Podman should follow this to allow existing
scripts to convert from Docker to Podman.

Fixes: #14612
Oprignal version of this patch came from wufan 1991849113@qq.com

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-08-10 16:46:05 -04:00
Aditya R
312bef288b 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-10 16:46:04 -04:00
Aditya R
9b0a1fa752 build: implement --cache-to,--cache-from and --cache-ttl
[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-08-10 16:46:04 -04:00
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
OpenShift Merge Robot
9ee855a375
Merge pull request #15214 from ashley-cui/backport4.2
[4.2] Backport WSL Machine fixes
2022-08-09 12:14:34 +00:00
OpenShift Merge Robot
cd645e8ae9
Merge pull request #15240 from openshift-cherrypick-robot/cherry-pick-15235-to-v4.2
[CI:DOCS] [v4.2] pkginstaller: use correct GOARCH value in case of arm build
2022-08-09 07:43:58 +00:00
Gerard Braad
6beb3f208f Fixes #15154 Change order when config and connections are written
When the break out or the WSL environment fails to start, the config
and connections should not be written. Placing them at the end of the
provisioning step will mitigate the issue.

[NO NEW TESTS NEEDED]

Signed-off-by: Gerard Braad <me@gbraad.nl>
2022-08-08 16:15:28 -04:00
Jason T. Greene
eab03100f7 Add support, and default to rootless w/WSL prompt
Also force installation to use WSL2 to prevent accidental usage of WSL1

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-08-08 16:15:28 -04:00
Jason T. Greene
f826ed5846 Disable F36 service that is incompat with WSL kern
(requires psi)

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-08-08 16:15:28 -04:00
OpenShift Merge Robot
b3d5ba657b
Merge pull request #15216 from cevich/v4.2_image_search
[v4.2] Cirrus: Improve CI VM image updates for EC2
2022-08-08 15:20:10 +00:00
Anjan Nath
d16b42f265 pkginstaller: use correct GOARCH value in case of arm build
to compile arm bits the GOARCH should be set to amd64 script
was wrongly using aarch64 instead

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-08 13:37:28 +00:00
openshift-ci[bot]
518b7cdd39
Merge pull request #15202 from lsm5/v420RC3-release
Bump to v4.2.0-rc3
2022-08-05 17:26:14 +00:00
Chris Evich
0593ceb01f
Cirrus: Update DEST_BRANCH to v4.2
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-08-05 11:53:38 -04:00
Chris Evich
fb85843324
Cirrus: Improve CI VM image updates for EC2
AWS EC2 keys VM images by an utterly unreadable, horrible to use,
generated "AMI ID" value.  This is very error prone for humans in
practice, since it's impossible to tell one image from the next by
eye.  Worse, EC2 permits duplicate name-tag values, complicating
image specification further.

However fortunately, Cirrus-CI recently implemented a feature by
which AMI's may be referenced by a name-tag search - choosing
the most recent AMI found.  Since the `containers/automation_images`
build workflow always assigns a unique name + `$IMAGE_SUFFIX` value,
we can simply re-use it for both AWS and GCP image specification.

In other words as of this commit, specifying new CI VM images can
be done by simply updating the `$IMAGE_SUFFIX` value as we've always
done.  No need to call out a specific AMI ID just for EC2 tasks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-08-05 11:27:41 -04:00
Lokesh Mandvekar
d5793db280
Bump back to v4.2.0-dev
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-05 09:21:34 -04:00
Lokesh Mandvekar
7e1f3106ff Bump to v4.2.0-rc3
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-05 09:21:21 -04:00
openshift-ci[bot]
4b0343efeb
Merge pull request #15201 from lsm5/v420RC3
[CI:DOCS] v4.2.0-rc3 release notes
2022-08-05 13:21:00 +00:00
Lokesh Mandvekar
1b7e16654b
v4.2.0-rc3 release notes
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-05 08:41:10 -04:00
openshift-ci[bot]
500a00c9ce
Merge pull request #15194 from ashley-cui/backports
[CI:DOCS] [4.2] Backport MacOS pkginstaller
2022-08-04 21:15:23 +00:00
Anjan Nath
bf2a53a2e0 pkginstaller: use correct GOARCH while building podman binaries
we were not using the correct GOARCH to build the podman remote
and podman-mac-helper binaries, this uses the ARCH value passed
to the make invocation to set the GORACH

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 09:46:35 -04:00
Anjan Nath
d4481a3170 pkginstaller: makefile improvements to avoid redownloading
this updates downloading of gvproxy and qemu using a standard
makefile rule which will avoid downloading them again if  its
already downloaded

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 09:46:09 -04:00
Anjan Nath
1b3844f655 pkginstaller: add makefile target to notarize the built pkg
[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 09:46:03 -04:00
Anjan Nath
64db955e06 pkginstaller: sign qemu-system-* binary for the pkg
add file hvf.entitlements which has the com.apple.security.hypervisor
entitlement needed for qemu

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 09:45:57 -04:00
Anjan Nath
9a820b480a Add support for building macOS pkg installer
it installs podman and supporting binaries along with
qemu to have a functioning podman install using a pkg

podman and podman-mac-helper  is compiled from source

gvproxy binary is downloaded from its github releases
and qemu from github release of containers/podman-machine-qemu

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 09:44:36 -04:00
openshift-ci[bot]
49ae6cfed6
Merge pull request #15142 from mtrmac/sigstore-sign-4.2
[v4.2] Sigstore sign
2022-08-02 20:09:10 +00: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č
0aebdb6875 Hide podman manifest push --sign-by on remote
... because it is documented to be ignored.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-02 16:52:56 +02:00
Miloslav Trmač
b2b3edaca0 Use signByFlagName instead of copy&pasting the string
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-02 16:52:56 +02:00
Miloslav Trmač
49d40293b4 Remove libpod/common
AFAICS it is not used anywhere.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-02 16:52:56 +02:00