mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
podman: add the Pod Manager tool
Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. Containers can either be run as root or in rootless mode. This patch adds the initial recipe for podman. Currently the build tags systemd (if in DISTRO_FEATURES), seccomp, varlink and remoteclient are enabled which allows to run podman with overlayfs as root and vfs in rootless mode. The storage drivers btrfs and device-mapper have not been tested and are disabled at the moment. It seems that seccomp is mandatory, which makes meta-security which provides libseccomp a mandatory dependency for this recipe. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
8a43b4f1b7
commit
e5de94ab78
93
recipes-containers/podman/podman_git.bb
Normal file
93
recipes-containers/podman/podman_git.bb
Normal file
|
@ -0,0 +1,93 @@
|
|||
HOMEPAGE = "https://podman.io/"
|
||||
SUMMARY = "A daemonless container engine"
|
||||
DESCRIPTION = "Podman is a daemonless container engine for developing, \
|
||||
managing, and running OCI Containers on your Linux System. Containers can \
|
||||
either be run as root or in rootless mode. Simply put: \
|
||||
`alias docker=podman`. \
|
||||
"
|
||||
|
||||
DEPENDS = " \
|
||||
go-metalinter-native \
|
||||
go-md2man-native \
|
||||
gpgme \
|
||||
libseccomp \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
|
||||
"
|
||||
|
||||
SRCREV = "00057929f5acfd98341964d85722383363376d52"
|
||||
SRC_URI = " \
|
||||
git://github.com/containers/libpod.git;branch=master \
|
||||
"
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
|
||||
GO_IMPORT = "import"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
PV = "1.5.1+git${SRCREV}"
|
||||
|
||||
PACKAGES =+ "${PN}-contrib"
|
||||
|
||||
PODMAN_PKG = "github.com/containers/libpod"
|
||||
BUILDTAGS ?= "seccomp varlink remoteclient \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
|
||||
exclude_graphdriver_btrfs exclude_graphdriver_devicemapper \
|
||||
containers_image_ostree_stub"
|
||||
|
||||
# overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1
|
||||
export LDFLAGS=""
|
||||
|
||||
inherit go goarch
|
||||
inherit systemd pkgconfig
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
EXTRA_OEMAKE = " \
|
||||
PREFIX=${prefix} BINDIR=${bindir} LIBEXECDIR=${libexecdir} \
|
||||
ETCDIR=${sysconfdir} TMPFILESDIR=${nonarch_libdir}/tmpfiles.d \
|
||||
SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \
|
||||
"
|
||||
|
||||
do_compile() {
|
||||
cd ${S}/src
|
||||
rm -rf .gopath
|
||||
mkdir -p .gopath/src/"$(dirname "${PODMAN_PKG}")"
|
||||
ln -sf ../../../../import/ .gopath/src/"${PODMAN_PKG}"
|
||||
|
||||
ln -sf "../../../import/vendor/github.com/varlink/" ".gopath/src/github.com/varlink"
|
||||
|
||||
export GOARCH="${BUILD_GOARCH}"
|
||||
export GOPATH="${S}/src/.gopath"
|
||||
export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
|
||||
|
||||
cd ${S}/src/.gopath/src/"${PODMAN_PKG}"
|
||||
|
||||
oe_runmake cmd/podman/varlink/iopodman.go GO=go
|
||||
|
||||
# Pass the needed cflags/ldflags so that cgo
|
||||
# can find the needed headers files and libraries
|
||||
export GOARCH=${TARGET_GOARCH}
|
||||
export CGO_ENABLED="1"
|
||||
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
oe_runmake BUILDTAGS="${BUILDTAGS}"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
cd ${S}/src/.gopath/src/"${PODMAN_PKG}"
|
||||
|
||||
oe_runmake install install.docker DESTDIR="${D}"
|
||||
}
|
||||
|
||||
FILES_${PN} += " \
|
||||
${systemd_unitdir}/system/* \
|
||||
${systemd_unitdir}/user/* \
|
||||
${nonarch_libdir}/tmpfiles.d/* \
|
||||
${sysconfdir}/cni \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN} += "conmon runc-opencontainers iptables cni skopeo"
|
||||
RRECOMMENDS_${PN} += "slirp4netns"
|
Loading…
Reference in New Issue
Block a user