aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-containers/podman/podman_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/podman/podman_git.bb')
-rw-r--r--recipes-containers/podman/podman_git.bb90
1 files changed, 74 insertions, 16 deletions
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb
index 4f6d58a2..f69dec16 100644
--- a/recipes-containers/podman/podman_git.bb
+++ b/recipes-containers/podman/podman_git.bb
@@ -11,15 +11,17 @@ REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6"
DEPENDS = " \
go-metalinter-native \
- go-md2man-native \
gpgme \
libseccomp \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
+ gettext-native \
"
-SRCREV = "72031783c5152cc715a8f1b6dc39bb5de8bfc3ca"
+SRCREV = "bb81e85a430fa95d23a15b77c717fd68bf06ebf2"
SRC_URI = " \
- git://github.com/containers/libpod.git;branch=v3.4;protocol=https \
+ git://github.com/containers/libpod.git;branch=v5.0;protocol=https \
+ ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \
+ file://run-ptest \
"
LICENSE = "Apache-2.0"
@@ -29,27 +31,38 @@ GO_IMPORT = "import"
S = "${WORKDIR}/git"
-PV = "3.4.2+git${SRCPV}"
+PV = "5.0.1+git"
+
+CVE_STATUS[CVE-2022-2989] = "fixed-version: fixed since v4.3.0"
+CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0"
PACKAGES =+ "${PN}-contrib"
PODMAN_PKG = "github.com/containers/libpod"
+
+BUILDTAGS_EXTRA ?= "${@bb.utils.contains('VIRTUAL-RUNTIME_container_networking','cni','cni','',d)}"
BUILDTAGS ?= "seccomp varlink \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-exclude_graphdriver_btrfs exclude_graphdriver_devicemapper"
+exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}"
# overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1
export LDFLAGS=""
+# https://github.com/llvm/llvm-project/issues/53999
+TOOLCHAIN = "gcc"
+
+# podmans Makefile expects BUILDFLAGS to be set but go.bbclass defines them in GOBUILDFLAGS
+export BUILDFLAGS="${GOBUILDFLAGS}"
+
inherit go goarch
-inherit systemd pkgconfig
+inherit systemd pkgconfig ptest
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 \
+ SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_user_unitdir} \
"
# remove 'docker' from the packageconfig if you don't want podman to
@@ -78,7 +91,11 @@ do_compile() {
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
- oe_runmake BUILDTAGS="${BUILDTAGS}"
+ # podman now builds go-md2man and requires the host/build details
+ export NATIVE_GOOS=${BUILD_GOOS}
+ export NATIVE_GOARCH=${BUILD_GOARCH}
+
+ oe_runmake NATIVE_GOOS=${BUILD_GOOS} NATIVE_GOARCH=${BUILD_GOARCH} BUILDTAGS="${BUILDTAGS}"
}
do_install() {
@@ -92,18 +109,34 @@ do_install() {
if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then
oe_runmake install.docker DESTDIR="${D}"
fi
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 644 ${S}/src/import/contrib/systemd/system/podman.service ${D}/${systemd_unitdir}/system
- install -m 644 ${S}/src/import/contrib/systemd/system/podman.socket ${D}/${systemd_unitdir}/system
- rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm
+
+ # Silence docker emulation warnings.
+ mkdir -p ${D}/etc/containers
+ touch ${D}/etc/containers/nodocker
+
+ if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then
+ install -d "${D}${sysconfdir}/sysctl.d"
+ install -m 0644 "${WORKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d"
fi
}
+do_install_ptest () {
+ cp ${S}/src/import/Makefile ${D}${PTEST_PATH}
+ install -d ${D}${PTEST_PATH}/test
+ cp -r ${S}/src/import/test/system ${D}${PTEST_PATH}/test
+
+ # Some compatibility links for the Makefile assumptions.
+ install -d ${D}${PTEST_PATH}/bin
+ ln -s ${bindir}/podman ${D}${PTEST_PATH}/bin/podman
+ ln -s ${bindir}/podman-remote ${D}${PTEST_PATH}/bin/podman-remote
+}
+
FILES:${PN} += " \
${systemd_unitdir}/system/* \
- ${systemd_unitdir}/user/* \
+ ${nonarch_libdir}/systemd/* \
+ ${systemd_user_unitdir/* \
${nonarch_libdir}/tmpfiles.d/* \
+ ${datadir}/user-tmpfiles.d/* \
${sysconfdir}/cni \
"
@@ -113,6 +146,31 @@ SYSTEMD_SERVICE:${PN} = "podman.service podman.socket"
# that busybox is configured with nsenter
VIRTUAL-RUNTIME_base-utils-nsenter ?= "util-linux-nsenter"
-RDEPENDS:${PN} += "conmon virtual-runc iptables cni skopeo ${VIRTUAL-RUNTIME_base-utils-nsenter}"
-RRECOMMENDS:${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment"
+COMPATIBLE_HOST = "^(?!mips).*"
+
+RDEPENDS:${PN} += "\
+ conmon ${VIRTUAL-RUNTIME_container_runtime} iptables ${VIRTUAL-RUNTIME_container_networking} skopeo ${VIRTUAL-RUNTIME_base-utils-nsenter} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'fuse-overlayfs slirp4netns', '', d)} \
+"
+RRECOMMENDS:${PN} += "slirp4netns \
+ kernel-module-xt-masquerade \
+ kernel-module-xt-comment \
+ kernel-module-xt-mark \
+ kernel-module-xt-addrtype \
+ kernel-module-xt-conntrack \
+ kernel-module-xt-tcpudp \
+ "
RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}"
+
+RDEPENDS:${PN}-ptest += " \
+ bash \
+ bats \
+ buildah \
+ catatonit \
+ coreutils \
+ file \
+ gnupg \
+ jq \
+ make \
+ tar \
+"