mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00

Bumping libpod to version v5.3.1-21-g8dc23e107e, which comprises the following commits: d9a47a6d87 Revert "win-installer test: revert to v5.3.0" 957b4da983 Avoid rebooting twice when installing WSL 439136d76e Avoid rebooting on Windows when upgrading and WSL isn't installed 434b0b6e4f Add win installer patch d4a7688b06 Bump WiX toolset version to 5.0.2 1ca5ab6e9c Add man pages to Mac installer 139fd2a7cf Replace ExclusiveArch with ifarch cd1b2981b4 Fixes missing binary in systemd. d4976e0677 Packit: remove epel and re-enable c9s fee50f0f31 Packit/copr: switch to fedora-all 0d22d7b74e Quadlet - Use = sign when setting the pull arg for build 62c096bbce win-installer test: revert to v5.3.0 Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
184 lines
5.8 KiB
BlitzBasic
184 lines
5.8 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 = "8dc23e107e530ebd47338a407f6ab3d8d4485fe0"
|
|
SRC_URI = " \
|
|
git://github.com/containers/libpod.git;branch=v5.3;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.3.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_dns} ${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 \
|
|
"
|