meta-virtualization/recipes-containers/podman/podman_git.bb
Stefan Agner 3ab5647d7c podman: bump to latest release 1.6.4
Bump to latest podman release 1.6.4. The changelog lists some new
features but mostly bugfixes between 1.6.1 and 1.6.4.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2020-02-03 17:12:40 -05:00

114 lines
3.6 KiB
BlitzBasic

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)} \
"
python __anonymous() {
msg = ""
# ERROR: Nothing PROVIDES 'libseccomp' (but meta-virtualization/recipes-containers/podman/ DEPENDS on or otherwise requires it).
# ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.
# Missing or unbuildable dependency chain was: ['meta-world-pkgdata', 'podman', 'libseccomp']
if 'security' not in d.getVar('BBFILE_COLLECTIONS').split():
msg += "Make sure meta-security should be present as it provides 'libseccomp'"
raise bb.parse.SkipRecipe(msg)
}
SRCREV = "5cc92849f7fc9dd734ca2fd8f3ae8830b9a7eb26"
SRC_URI = " \
git://github.com/containers/libpod.git;branch=v1.6 \
file://0001-Makefile-Fix-docker-documentation-install-and-genera.patch \
"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
GO_IMPORT = "import"
S = "${WORKDIR}/git"
PV = "1.6.4+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 \
"
# remove 'docker' from the packageconfig if you don't want podman to
# build and install the docker wrapper. If docker is enabled in the
# packageconfig, the podman package will rconfict with docker.
PACKAGECONFIG ?= "docker"
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 DESTDIR="${D}"
if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then
oe_runmake install.docker DESTDIR="${D}"
fi
}
FILES_${PN} += " \
${systemd_unitdir}/system/* \
${systemd_unitdir}/user/* \
${nonarch_libdir}/tmpfiles.d/* \
${sysconfdir}/cni \
"
RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo"
RRECOMMENDS_${PN} += "slirp4netns"
RCONFLICTS_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}"