From 3b98ca2fcfa9bd3a38c72595c1119726647f48f9 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 21 Oct 2020 01:24:25 +0100 Subject: [PATCH] podman: add new package Signed-off-by: Daniel Golle --- utils/podman/Makefile | 69 ++++++++++++++++++++++++++++++ utils/podman/files/containers.conf | 10 +++++ 2 files changed, 79 insertions(+) create mode 100644 utils/podman/Makefile create mode 100644 utils/podman/files/containers.conf diff --git a/utils/podman/Makefile b/utils/podman/Makefile new file mode 100644 index 000000000..48ef44410 --- /dev/null +++ b/utils/podman/Makefile @@ -0,0 +1,69 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=podman +PKG_VERSION:=2.1.1 +PKG_RELEASE:=1 +PKG_LICENSE:=Apache-2.0 +PKG_LICENSE_FILES:=LICENSE + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION) +PKG_HASH:=5ebaa6e0dbd7fd1863f70d2bc71dc8a94e195c3339c17e3cac4560c9ec5747f8 + +PKG_MAINTAINER:=Daniel Golle + +PKG_BUILD_DEPENDS:=golang/host protobuf/host +PKG_BUILD_PARALLEL:=1 + +GO_PKG:=github.com/containers/podman/ +GO_PKG_BUILD_PKG:=github.com/containers/podman/v2/cmd/podman/ + +GO_PKG_TAGS=seccomp,exclude_graphdriver_devicemapper + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Download/default-registries + URL:=https://raw.githubusercontent.com/projectatomic/registries/da9a9c87781823f45401ca49da04e269c9e3100e + URL_FILE:=registries.fedora + FILE:=registries.fedora-da9a9c8778 + HASH:=bc2b58c209aa8ca35b6814ec9a3c64716d4970b884ade460b65000e56024dfee +endef + +define Download/default-policy + URL:=https://raw.githubusercontent.com/containers/skopeo/362f70b056a1f5d2bd4184527a0ae0d20c4d35d3 + URL_FILE:=default-policy.json + FILE:=default-policy.json-362f70b056 + HASH:=cddfaa8e6a7e5497b67cc0dd8e8517058d0c97de91bf46fff867528415f2d946 +endef + +define Package/podman + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Podman + URL:=https://podman.io + DEPENDS:=$(GO_ARCH_DEPENDS) +conmon +cni +cni-plugins +btrfs-progs +glib2 +gnupg2 +iptables +libgpg-error +libseccomp +libgpgme +nsenter +zoneinfo-simple +endef + +define Package/podman/description + Podman: A tool for managing OCI containers and pods +endef + +define Build/Prepare + $(call Build/Prepare/Default) + $(eval $(call Download,default-registries)) + $(eval $(call Download,default-policy)) +endef + +define Package/podman/install + $(call GoPackage/Package/Install/Bin,$(1)) + $(INSTALL_DIR) $(1)/etc/containers + $(INSTALL_CONF) $(DL_DIR)/default-policy.json-362f70b056 $(1)/etc/containers/policy.json + $(INSTALL_CONF) $(DL_DIR)/registries.fedora-da9a9c8778 $(1)/etc/containers/registries.conf + $(INSTALL_CONF) ./files/containers.conf $(1)/etc/containers/containers.conf + $(INSTALL_DIR) $(1)/etc/cni/net.d + $(INSTALL_CONF) $(PKG_BUILD_DIR)/cni/87-podman-bridge.conflist $(1)/etc/cni/net.d/ +endef + +$(eval $(call GoBinPackage,podman)) +$(eval $(call BuildPackage,podman)) diff --git a/utils/podman/files/containers.conf b/utils/podman/files/containers.conf new file mode 100644 index 000000000..705d150cc --- /dev/null +++ b/utils/podman/files/containers.conf @@ -0,0 +1,10 @@ +[containers] +netns="private" + +[network] +cni_plugin_dir="/usr/lib/cni" +network_config_dir="/etc/cni/net.d/" +default_network="podman" + +[engine] +runtime="/sbin/uxc"