podman: update to 3.1.1 15480/head
authorOskari Rauta <oskari.rauta@gmail.com>
Tue, 20 Apr 2021 21:18:27 +0000 (00:18 +0300)
committerOskari Rauta <oskari.rauta@gmail.com>
Wed, 21 Apr 2021 01:38:35 +0000 (04:38 +0300)
 - Add support for AppArmor
 - Gracefully stop containers and pods on shutdown

I found out that If you change location of containers to persistent storage instead of tmpfs, starting them will fail unless they have been stopped. If this is the case that reboot has occurred before pods and containers have been stopped, they cannot be started, they have to be removed and re-created. Change in initscript tries to avoid that. Even if containers are running at tmpfs, this won't hurt. Still, if something happens and system hangs/reboots/etc, script won't save you from that. It's just a attempt to make things better.
I also enabled AppArmor support for future possibilities.

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
utils/podman/Makefile
utils/podman/files/podman.init

index 5c9744a44497111debd275c64bf572491ae31c46..c97ba3e2293384bac13da8b501cd00e0978452ad 100644 (file)
@@ -1,9 +1,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=podman
-PKG_VERSION:=3.0.1
+PKG_VERSION:=3.1.1
 PKG_RELEASE:=$(AUTORELEASE)
-PKG_HASH:=259e682d6e90595573fe8880e0252cc8b08c813e19408b911c43383a6edd6852
+PKG_HASH:=4e6fb106c6363566b6edc4ac6caee0bdf6b788e01255c3b3bfcb64f4b6842229
 
 PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -17,7 +17,7 @@ PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
 
 GO_PKG:=github.com/containers/podman/
-GO_PKG_BUILD_PKG:=github.com/containers/podman/v2/cmd/podman/
+GO_PKG_BUILD_PKG:=github.com/containers/podman/v3/cmd/podman/
 
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/golang/golang-package.mk
@@ -79,9 +79,9 @@ endef
 Package/podman-selinux/conffiles = $(Package/podman/conffiles)
 
 ifeq ($(BUILD_VARIANT),selinux)
-  GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,selinux
+  GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,selinux,apparmor
 else
-  GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper
+  GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper,apparmor
 endif
 
 define Build/Prepare
index 1df70407f9a6976567aa222f1e3f56606516014b..fe85646e77a185e9e0112fb7f568e39611845797 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh /etc/rc.common
 
 START=99
+STOP=10
 USE_PROCD=1
 NAME=podman
 PROG=/usr/bin/podman
@@ -12,3 +13,8 @@ start_service() {
        procd_append_param command $command
        procd_close_instance
 }
+
+shutdown() {
+       ${PROG} pod stop -a
+       ${PROG} container stop -a
+}