meta-virtualization/recipes-containers/podman/podman_git.bb
Bruce Ashfield 82fe694454 podman: update to v5.2.1
Bumping libpod to version v5.2.1-5-g679276e136, which comprises the following commits:

    dbdff97042 Create volume path before state initialization
    628446c88c Update Cirrus DEST_BRANCH
    30f104cf36 Bump to v5.2.2-dev
    d0582c9e1e Bump to v5.2.1
    1cec5dc24e Update release notes for v5.2.1
    8227722c3c [v5.2] Add zstd:chunked test fix
    854e0c2eb4 [v5.2] Bump Buildah to v1.37.1, c/common v0.60.1, c/image v5.32.1
    8f198092d7 libpod: reset state error on init
    669767c3a9 libpod: do not save expected stop errors in ctr state
    851ec1f81c libpod: fix broken saveContainerError()
    6b45888959 Bump to v5.2.1-dev
    b22d5c61ee Bump to v5.2.0
    3f13c38048 Never skip checkout step in release workflow
    c83c891fb2 Bump to v5.2.0-dev
    028bee289e Bump to v5.2.0-rc3
    23c6e0fb9f Update release notes for v5.2.0-rc3
    784856b6ae Tweak versions in register_images.go
    d6ae7427f7 fix network cleanup flake in play kube
    c0f3ce462c WIP: Fixes for vendoring Buildah
    a8f4c12003 Add --compat-volumes option to build and farm build
    8bc493324a Bump Buildah, c/storage, c/image, c/common
    4fbcece05f libpod: bind ports before network setup
    3f14fcf7c3 pkg/api: do not leak config pointers into specgen
    02a932372b build: Update gvisor-tap-vsock to 0.7.4
    929c64ecf3 test/system: fix borken pasta interface name checks
    c231ba8b23 test/system: fix bridge host.containers.internal test
    b1ad869560 CI: system tests: instrument to allow failure analysis
    5da126dc49 Use uploaded .zip for Windows action
    5f4acdf227 RPM: podman-iptables.conf only on Fedora
    11f56fa42c Bump to v5.2.0-dev
    716874f44e Bump to v5.2.0-rc2
    d72fefc418 Update release notes for v5.2.0-rc2
    5209495865 test/e2e: fix ncat tests
    b6b61a6a49 libpod: add hidden env to set sqlite timeout
    0ecd6fa59f Add support for StopSignal in quadlet .container files
    55b6e4c3e8 podman pod stats: fix race when ctr process exits
    742d29e9d8 Update module github.com/vbauerster/mpb/v8 to v8.7.4
    5e8884ab0d libpod: correctly capture healthcheck output
    5a7199015a Bump bundled krunkit to 0.1.2
    55749af0c7 podman stats: fix race when ctr process exists
    7995e3de53 nc -p considered harmful
    182224defb podman pod stats: fix pod rm race
    e1caf80e81 podman ps: fix racy pod name query
    85f4f89810 system connection remove: use Args function to validate
    f630eebcfa pkg/machine/compression: skip decompress bar for empty file
    7100ead475 nc -p considered harmful
    46f4044893 podman system df: fix fix ErrNoSuchCtr/Volume race
    1413a28409 podman auto-update: fix ErrNoSuchCtr race
    02c094425f Fix name for builder in farm connection
    2f7fd64e98 700-play.bats: use unique pod/container/image/volume names
    380ed3a40d safename: consistent within same test, and, dashes
    6d01ce417d 700-kube.bats: refactor $PODMAN_TMPDIR/test.yaml
    987d15a378 700-play.bats: eliminate $testYaml
    48aea083c0 700-play.bats: refactor clumsy yamlfile creation
    517c6e6f10 700-play.bats: move _write_test_yaml up near top
    ed71000e6d chore(deps): update dependency setuptools to v71
    3c52ef43f5 Expand drop-in search paths * top-level (pod.d) * truncated (unit-.container.d)
    5666100c2e Remove references and checks for --gpus
    1ec3edd3f6 Do not crash on invalid filters
    692d2a5b08 fix(deps): update module github.com/rootless-containers/rootlesskit/v2 to v2.2.0
    59696341b5 Bump to v5.2.0-dev
    973e865422 Bump to v5.2.0-rc1
    f3e945c86e Keep the volume-driver flag deprecated
    b28027148b System tests: safe container/image/volume/etc names
    d26f0ca90f Implement disable default mounts via command line
    fa75599569 Remove the unused machine volume-driver

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
2024-08-20 13:24:32 +00:00

183 lines
5.7 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`. \
"
inherit features_check
REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6"
DEPENDS = " \
go-metalinter-native \
gpgme \
libseccomp \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
gettext-native \
"
SRCREV = "679276e13686182bfd3dc6d8bffd355f8b34f126"
SRC_URI = " \
git://github.com/containers/libpod.git;branch=v5.2;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \
${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \
file://run-ptest \
"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3d9b931fa23ab1cacd0087f9e2ee12c0"
GO_IMPORT = "import"
S = "${WORKDIR}/git"
PV = "v5.2.1"
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 ${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 container-host
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_user_unitdir} \
"
# 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}"
# 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}"
# 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() {
cd ${S}/src/.gopath/src/"${PODMAN_PKG}"
export GOARCH="${BUILD_GOARCH}"
export GOPATH="${S}/src/.gopath"
export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
oe_runmake install DESTDIR="${D}"
if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then
oe_runmake install.docker DESTDIR="${D}"
fi
# 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 "${UNPACKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d"
install -d "${D}${sysconfdir}/containers"
cat <<-EOF >> "${D}${sysconfdir}/containers/containers.conf"
[NETWORK]
default_rootless_network_cmd="slirp4netns"
EOF
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/* \
${nonarch_libdir}/systemd/* \
${systemd_user_unitdir}/* \
${nonarch_libdir}/tmpfiles.d/* \
${datadir}/user-tmpfiles.d/* \
${sysconfdir}/cni \
"
SYSTEMD_SERVICE:${PN} = "podman.service podman.socket"
# The other option for this is "busybox", since meta-virt ensures
# that busybox is configured with nsenter
VIRTUAL-RUNTIME_base-utils-nsenter ?= "util-linux-nsenter"
COMPATIBLE_HOST = "^(?!mips).*"
RDEPENDS:${PN} += "\
catatonit conmon ${VIRTUAL-RUNTIME_container_runtime} iptables libdevmapper ${VIRTUAL-RUNTIME_container_networking} ${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 \
coreutils \
file \
gnupg \
jq \
make \
skopeo \
tar \
"