Accepting request 772114 from devel:kubic
OBS-URL: https://build.opensuse.org/request/show/772114 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/podman?expand=0&rev=54
This commit is contained in:
parent
d90dd67229
commit
21a4ac9b84
@ -1,105 +0,0 @@
|
||||
From 864b5fd9638953d9ee61113c4ba8311cafe9bcd8 Mon Sep 17 00:00:00 2001
|
||||
From: baude <bbaude@redhat.com>
|
||||
Date: Sun, 12 Jan 2020 10:54:14 -0600
|
||||
Subject: [PATCH] clarify container prune --force
|
||||
|
||||
the --force parameter should only be used for the CLI and should only
|
||||
dictate whether to prompt the user for confirmation.
|
||||
|
||||
Fixes: #4844
|
||||
Signed-off-by: baude <bbaude@redhat.com>
|
||||
---
|
||||
cmd/podman/containers_prune.go | 4 ++--
|
||||
cmd/podman/system_prune.go | 2 +-
|
||||
docs/source/markdown/podman-container-prune.1.md | 3 +++
|
||||
pkg/adapter/containers.go | 4 ++--
|
||||
pkg/adapter/containers_remote.go | 2 +-
|
||||
5 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/cmd/podman/containers_prune.go b/cmd/podman/containers_prune.go
|
||||
index 78c50268..6b371d85 100644
|
||||
--- a/cmd/podman/containers_prune.go
|
||||
+++ b/cmd/podman/containers_prune.go
|
||||
@@ -40,7 +40,7 @@ func init() {
|
||||
pruneContainersCommand.SetHelpTemplate(HelpTemplate())
|
||||
pruneContainersCommand.SetUsageTemplate(UsageTemplate())
|
||||
flags := pruneContainersCommand.Flags()
|
||||
- flags.BoolVarP(&pruneContainersCommand.Force, "force", "f", false, "Force removal of a running container. The default is false")
|
||||
+ flags.BoolVarP(&pruneContainersCommand.Force, "force", "f", false, "Skip interactive prompt for container removal.")
|
||||
flags.StringArrayVar(&pruneContainersCommand.Filter, "filter", []string{}, "Provide filter values (e.g. 'until=<timestamp>')")
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ Are you sure you want to continue? [y/N] `)
|
||||
if c.GlobalIsSet("max-workers") {
|
||||
maxWorkers = c.GlobalFlags.MaxWorks
|
||||
}
|
||||
- ok, failures, err := runtime.Prune(getContext(), maxWorkers, c.Force, c.Filter)
|
||||
+ ok, failures, err := runtime.Prune(getContext(), maxWorkers, c.Filter)
|
||||
if err != nil {
|
||||
if errors.Cause(err) == define.ErrNoSuchCtr {
|
||||
if len(c.InputArgs) > 1 {
|
||||
diff --git a/cmd/podman/system_prune.go b/cmd/podman/system_prune.go
|
||||
index 74fdcde9..28f22d33 100644
|
||||
--- a/cmd/podman/system_prune.go
|
||||
+++ b/cmd/podman/system_prune.go
|
||||
@@ -92,7 +92,7 @@ Are you sure you want to continue? [y/N] `, volumeString)
|
||||
|
||||
rmWorkers := shared.Parallelize("rm")
|
||||
fmt.Println("Deleted Containers")
|
||||
- ok, failures, err = runtime.Prune(ctx, rmWorkers, false, []string{})
|
||||
+ ok, failures, err = runtime.Prune(ctx, rmWorkers, []string{})
|
||||
if err != nil {
|
||||
if lasterr != nil {
|
||||
logrus.Errorf("%q", err)
|
||||
diff --git a/docs/source/markdown/podman-container-prune.1.md b/docs/source/markdown/podman-container-prune.1.md
|
||||
index 856843a8..1b0561e8 100644
|
||||
--- a/docs/source/markdown/podman-container-prune.1.md
|
||||
+++ b/docs/source/markdown/podman-container-prune.1.md
|
||||
@@ -11,6 +11,9 @@ podman-container-prune - Remove all stopped containers from local storage
|
||||
|
||||
## OPTIONS
|
||||
|
||||
+**--force**, **-f**
|
||||
+Do not provide an interactive prompt for containers removal.
|
||||
+
|
||||
**-h**, **--help**
|
||||
|
||||
Print usage statement
|
||||
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
|
||||
index 3334e9fa..c2206caa 100644
|
||||
--- a/pkg/adapter/containers.go
|
||||
+++ b/pkg/adapter/containers.go
|
||||
@@ -1048,7 +1048,7 @@ func (r *LocalRuntime) ExecContainer(ctx context.Context, cli *cliconfig.ExecVal
|
||||
}
|
||||
|
||||
// Prune removes stopped containers
|
||||
-func (r *LocalRuntime) Prune(ctx context.Context, maxWorkers int, force bool, filters []string) ([]string, map[string]error, error) {
|
||||
+func (r *LocalRuntime) Prune(ctx context.Context, maxWorkers int, filters []string) ([]string, map[string]error, error) {
|
||||
var (
|
||||
ok = []string{}
|
||||
failures = map[string]error{}
|
||||
@@ -1100,7 +1100,7 @@ func (r *LocalRuntime) Prune(ctx context.Context, maxWorkers int, force bool, fi
|
||||
pool.Add(shared.Job{
|
||||
ID: ctr.ID(),
|
||||
Fn: func() error {
|
||||
- err := r.Runtime.RemoveContainer(ctx, ctr, force, false)
|
||||
+ err := r.Runtime.RemoveContainer(ctx, ctr, false, false)
|
||||
if err != nil {
|
||||
logrus.Debugf("Failed to prune container %s: %s", ctr.ID(), err.Error())
|
||||
}
|
||||
diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go
|
||||
index 36db4af6..60ee3cb2 100644
|
||||
--- a/pkg/adapter/containers_remote.go
|
||||
+++ b/pkg/adapter/containers_remote.go
|
||||
@@ -922,7 +922,7 @@ func (r *LocalRuntime) Top(cli *cliconfig.TopValues) ([]string, error) {
|
||||
}
|
||||
|
||||
// Prune removes stopped containers
|
||||
-func (r *LocalRuntime) Prune(ctx context.Context, maxWorkers int, force bool, filter []string) ([]string, map[string]error, error) {
|
||||
+func (r *LocalRuntime) Prune(ctx context.Context, maxWorkers int, filter []string) ([]string, map[string]error, error) {
|
||||
|
||||
var (
|
||||
ok = []string{}
|
||||
--
|
||||
2.24.1
|
||||
|
4
_service
4
_service
@ -4,8 +4,8 @@
|
||||
<param name="url">https://github.com/containers/libpod.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="filename">podman</param>
|
||||
<param name="versionformat">1.7.0</param>
|
||||
<param name="revision">v1.7.0</param>
|
||||
<param name="versionformat">1.8.0</param>
|
||||
<param name="revision">v1.8.0</param>
|
||||
</service>
|
||||
|
||||
<service name="set_version" mode="disabled">
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:645ef1935b0a5e94742e0e9af74cfe152a2beb05bd96e4e7079e735f6d47c36d
|
||||
size 4685152
|
3
podman-1.8.0.tar.xz
Normal file
3
podman-1.8.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:05d892bc94cb3f0c4c7df475639cbbc339bf75520984ad6bd5b1a2f6b0aa03d1
|
||||
size 4906332
|
@ -1,3 +1,96 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 7 14:18:16 UTC 2020 - Sascha Grunert <sgrunert@suse.com>
|
||||
|
||||
- Remove: 0001-clarify-container-prune-force.patch because it's now
|
||||
included in the release
|
||||
- Update podman to v1.8.0:
|
||||
* Features
|
||||
- The podman system service command has been added, providing a
|
||||
preview of Podman's new Docker-compatible API. This API is
|
||||
still very new, and not yet ready for production use, but is
|
||||
available for early testing
|
||||
- Rootless Podman now uses Rootlesskit for port forwarding,
|
||||
which should greatly improve performance and capabilities
|
||||
- The podman untag command has been added to remove tags from
|
||||
images without deleting them
|
||||
- The podman inspect command on images now displays previous
|
||||
names they used
|
||||
- The podman generate systemd command now supports a --new
|
||||
option to generate service files that create and run new
|
||||
containers instead of managing existing containers
|
||||
- Support for --log-opt tag= to set logging tags has been added
|
||||
to the journald log driver
|
||||
- Added support for using Seccomp profiles embedded in images
|
||||
for podman run and podman create via the new --seccomp-policy
|
||||
CLI flag
|
||||
- The podman play kube command now honors pull policy
|
||||
* Bugfixes
|
||||
- Fixed a bug where the podman cp command would not copy the
|
||||
contents of directories when paths ending in /. were given
|
||||
- Fixed a bug where the podman play kube command did not
|
||||
properly locate Seccomp profiles specified relative to
|
||||
localhost
|
||||
- Fixed a bug where the podman info command for remote Podman
|
||||
did not show registry information
|
||||
- Fixed a bug where the podman exec command did not support
|
||||
having input piped into it
|
||||
- Fixed a bug where the podman cp command with rootless Podman
|
||||
on CGroups v2 systems did not properly determine if the
|
||||
container could be paused while copying
|
||||
- Fixed a bug where the podman container prune --force command
|
||||
could possible remove running containers if they were started
|
||||
while the command was running
|
||||
- Fixed a bug where Podman, when run as root, would not
|
||||
properly configure slirp4netns networking when requested
|
||||
- Fixed a bug where podman run --userns=keep-id did not work
|
||||
when the user had a UID over 65535
|
||||
- Fixed a bug where rootless podman run and podman create with
|
||||
the --userns=keep-id option could change permissions on
|
||||
/run/user/$UID and break KDE
|
||||
- Fixed a bug where rootless Podman could not be run in a
|
||||
systemd service on systems using CGroups v2
|
||||
- Fixed a bug where podman inspect would show CPUShares as 0,
|
||||
instead of the default (1024), when it was not explicitly set
|
||||
- Fixed a bug where podman-remote push would segfault
|
||||
- Fixed a bug where image healthchecks were not shown in the
|
||||
output of podman inspect
|
||||
- Fixed a bug where named volumes created with containers from
|
||||
pre-1.6.3 releases of Podman would be autoremoved with their
|
||||
containers if the --rm flag was given, even if they were
|
||||
given names
|
||||
- Fixed a bug where podman history was not computing image
|
||||
sizes correctly
|
||||
- Fixed a bug where Podman would not error on invalid values to
|
||||
the --sort flag to podman images
|
||||
- Fixed a bug where providing a name for the image made by
|
||||
podman commit was mandatory, not optional as it should be
|
||||
- Fixed a bug where the remote Podman client would append an
|
||||
extra " to %PATH
|
||||
- Fixed a bug where the podman build command would sometimes
|
||||
ignore the -f option and build the wrong Containerfile
|
||||
- Fixed a bug where the podman ps --filter command would only
|
||||
filter running containers, instead of all containers, if
|
||||
--all was not passed
|
||||
- Fixed a bug where the podman load command on compressed
|
||||
images would leave an extra copy on disk
|
||||
- Fixed a bug where the podman restart command would not
|
||||
properly clean up the network, causing it to function
|
||||
differently from podman stop; podman start
|
||||
- Fixed a bug where setting the --memory-swap flag to podman
|
||||
create and podman run to -1 (to indicate unlimited) was not
|
||||
supported
|
||||
* Misc
|
||||
- Initial work on version 2 of the Podman remote API has been
|
||||
merged, but is still in an alpha state and not ready for use.
|
||||
Read more here
|
||||
- Many formatting corrections have been made to the manpages
|
||||
- The changes to address (#5009) may cause anonymous volumes
|
||||
created by Podman versions 1.6.3 to 1.7.0 to not be removed
|
||||
when their container is removed
|
||||
- Updated vendored Buildah to v1.13.1
|
||||
- Updated vendored containers/storage to v1.15.8
|
||||
- Updated vendored containers/image to v5.2.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 14:04:36 UTC 2020 - Sascha Grunert <sgrunert@suse.com>
|
||||
|
||||
@ -189,7 +282,7 @@ Thu Dec 12 14:30:34 UTC 2019 - Richard Brown <rbrown@suse.com>
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 31 13:05:29 UTC 2019 - Richard Brown <rbrown@suse.com>
|
||||
|
||||
- Add container-start-fix.patch to correct output of container-start to show container_name, not _id.
|
||||
- Add container-start-fix.patch to correct output of container-start to show container_name, not _id.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 21 07:21:29 UTC 2019 - Sascha Grunert <sgrunert@suse.com>
|
||||
|
@ -22,7 +22,7 @@
|
||||
%define with_libostree 1
|
||||
%endif
|
||||
Name: podman
|
||||
Version: 1.7.0
|
||||
Version: 1.8.0
|
||||
Release: 0
|
||||
Summary: Daemon-less container engine for managing containers, pods and images
|
||||
License: Apache-2.0
|
||||
@ -31,8 +31,6 @@ Url: https://github.com/containers/libpod
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source2: libpod.conf
|
||||
Source3: %{name}-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM 0001-clarify-container-prune-force.patch https://github.com/containers/libpod/issues/4844
|
||||
Patch0: 0001-clarify-container-prune-force.patch
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: cni
|
||||
BuildRequires: device-mapper-devel
|
||||
@ -84,7 +82,6 @@ skopeo, as they all share the same datastore backend.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%package cni-config
|
||||
Summary: Basic CNI configuration for podman
|
||||
|
Loading…
Reference in New Issue
Block a user