From 571767ad2039c9c29d3a5ca164f4ce09c670a8b8 Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Mon, 10 May 2021 17:15:47 +0100 Subject: podman: Update 3.0-rc2 -> 3.0.1 Update podman to 3.0.1. Signed-off-by: Diego Sueiro Signed-off-by: Bruce Ashfield --- recipes-containers/podman/podman_3.0.1.bb | 111 +++++++++++++++++++++++++++++ recipes-containers/podman/podman_git.bb | 113 ------------------------------ 2 files changed, 111 insertions(+), 113 deletions(-) create mode 100644 recipes-containers/podman/podman_3.0.1.bb delete mode 100644 recipes-containers/podman/podman_git.bb diff --git a/recipes-containers/podman/podman_3.0.1.bb b/recipes-containers/podman/podman_3.0.1.bb new file mode 100644 index 00000000..26e66375 --- /dev/null +++ b/recipes-containers/podman/podman_3.0.1.bb @@ -0,0 +1,111 @@ +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)} \ +" + +PNBLACKLIST[podman] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'security', '', 'Depends on libseccomp from meta-security which is not included', d)}" + +SRCREV = "c640670e85c4aaaff92741691d6a854a90229d8d" +SRC_URI = " \ + git://github.com/containers/libpod.git;branch=v3.0 \ +" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +GO_IMPORT = "import" + +S = "${WORKDIR}/git" + +PACKAGES =+ "${PN}-contrib" + +PODMAN_PKG = "github.com/containers/libpod" +BUILDTAGS ?= "seccomp varlink \ +${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ +exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" + +# 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}" + + # 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}" + + 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 + 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 + fi +} + +FILES_${PN} += " \ + ${systemd_unitdir}/system/* \ + ${systemd_unitdir}/user/* \ + ${nonarch_libdir}/tmpfiles.d/* \ + ${sysconfdir}/cni \ +" + +SYSTEMD_SERVICE_${PN} = "podman.service podman.socket" + +RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo" +RRECOMMENDS_${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment" +RCONFLICTS_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb deleted file mode 100644 index 6fb803e4..00000000 --- a/recipes-containers/podman/podman_git.bb +++ /dev/null @@ -1,113 +0,0 @@ -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)} \ -" - -PNBLACKLIST[podman] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'security', '', 'Depends on libseccomp from meta-security which is not included', d)}" - -SRCREV = "288fb688964cb7fc7086d0728daa1f5f6b726dd6" -SRC_URI = " \ - git://github.com/containers/libpod.git;branch=v3.0 \ -" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" - -GO_IMPORT = "import" - -S = "${WORKDIR}/git" - -PV = "3.0-rc2+git${SRCPV}" - -PACKAGES =+ "${PN}-contrib" - -PODMAN_PKG = "github.com/containers/libpod" -BUILDTAGS ?= "seccomp varlink \ -${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ -exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" - -# 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}" - - # 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}" - - 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 - 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 - fi -} - -FILES_${PN} += " \ - ${systemd_unitdir}/system/* \ - ${systemd_unitdir}/user/* \ - ${nonarch_libdir}/tmpfiles.d/* \ - ${sysconfdir}/cni \ -" - -SYSTEMD_SERVICE_${PN} = "podman.service podman.socket" - -RDEPENDS_${PN} += "conmon virtual/runc iptables cni skopeo" -RRECOMMENDS_${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment" -RCONFLICTS_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" -- cgit v1.2.3-54-g00ecf