summaryrefslogtreecommitdiffstats
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.bb61
1 files changed, 22 insertions, 39 deletions
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb
index 32de3f0c..8d8e0f05 100644
--- a/recipes-containers/podman/podman_git.bb
+++ b/recipes-containers/podman/podman_git.bb
@@ -10,18 +10,16 @@ inherit features_check
10REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6" 10REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6"
11 11
12DEPENDS = " \ 12DEPENDS = " \
13 go-metalinter-native \
14 gpgme \ 13 gpgme \
15 libseccomp \ 14 libseccomp \
16 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ 15 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
17 gettext-native \ 16 gettext-native \
18" 17"
19 18
20SRCREV = "bb81e85a430fa95d23a15b77c717fd68bf06ebf2" 19SRCREV = "227df90eb7c021097c9ba5f8000c83648a598028"
21SRC_URI = " \ 20SRC_URI = " \
22 git://github.com/containers/libpod.git;branch=v5.0;protocol=https \ 21 git://github.com/containers/libpod.git;branch=v5.4;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX} \
23 ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ 22 ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \
24 file://run-ptest \
25" 23"
26 24
27LICENSE = "Apache-2.0" 25LICENSE = "Apache-2.0"
@@ -31,7 +29,7 @@ GO_IMPORT = "import"
31 29
32S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"
33 31
34PV = "5.0.1+git" 32PV = "v5.4.1"
35 33
36CVE_STATUS[CVE-2022-2989] = "fixed-version: fixed since v4.3.0" 34CVE_STATUS[CVE-2022-2989] = "fixed-version: fixed since v4.3.0"
37CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0" 35CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0"
@@ -46,16 +44,17 @@ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
46exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}" 44exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}"
47 45
48# overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1 46# overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1
49export LDFLAGS="" 47export LDFLAGS = ""
50 48
51# https://github.com/llvm/llvm-project/issues/53999 49# https://github.com/llvm/llvm-project/issues/53999
52TOOLCHAIN = "gcc" 50TOOLCHAIN = "gcc"
53 51
54# podmans Makefile expects BUILDFLAGS to be set but go.bbclass defines them in GOBUILDFLAGS 52# podmans Makefile expects BUILDFLAGS to be set but go.bbclass defines them in GOBUILDFLAGS
55export BUILDFLAGS="${GOBUILDFLAGS}" 53export BUILDFLAGS = "${GOBUILDFLAGS}"
56 54
57inherit go goarch 55inherit go goarch
58inherit systemd pkgconfig ptest 56inherit container-host
57inherit systemd pkgconfig
59 58
60do_configure[noexec] = "1" 59do_configure[noexec] = "1"
61 60
@@ -65,10 +64,13 @@ EXTRA_OEMAKE = " \
65 SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_user_unitdir} \ 64 SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_user_unitdir} \
66" 65"
67 66
68# remove 'docker' from the packageconfig if you don't want podman to 67# remove 'docker' from the features if you don't want podman to
69# build and install the docker wrapper. If docker is enabled in the 68# build and install the docker wrapper. If docker is enabled in the
70# packageconfig, the podman package will rconfict with docker. 69# variable, the podman package will rconfict with docker.
71PACKAGECONFIG ?= "docker" 70PODMAN_FEATURES ?= "docker"
71
72PACKAGECONFIG ?= ""
73PACKAGECONFIG[rootless] = ",,,fuse-overlayfs slirp4netns,,"
72 74
73do_compile() { 75do_compile() {
74 cd ${S}/src 76 cd ${S}/src
@@ -106,7 +108,7 @@ do_install() {
106 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" 108 export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
107 109
108 oe_runmake install DESTDIR="${D}" 110 oe_runmake install DESTDIR="${D}"
109 if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then 111 if ${@bb.utils.contains('PODMAN_FEATURES', 'docker', 'true', 'false', d)}; then
110 oe_runmake install.docker DESTDIR="${D}" 112 oe_runmake install.docker DESTDIR="${D}"
111 fi 113 fi
112 114
@@ -116,21 +118,15 @@ do_install() {
116 118
117 if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then 119 if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then
118 install -d "${D}${sysconfdir}/sysctl.d" 120 install -d "${D}${sysconfdir}/sysctl.d"
119 install -m 0644 "${WORKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d" 121 install -m 0644 "${UNPACKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d"
122 install -d "${D}${sysconfdir}/containers"
123 cat <<-EOF >> "${D}${sysconfdir}/containers/containers.conf"
124 [NETWORK]
125 default_rootless_network_cmd="slirp4netns"
126 EOF
120 fi 127 fi
121} 128}
122 129
123do_install_ptest () {
124 cp ${S}/src/import/Makefile ${D}${PTEST_PATH}
125 install -d ${D}${PTEST_PATH}/test
126 cp -r ${S}/src/import/test/system ${D}${PTEST_PATH}/test
127
128 # Some compatibility links for the Makefile assumptions.
129 install -d ${D}${PTEST_PATH}/bin
130 ln -s ${bindir}/podman ${D}${PTEST_PATH}/bin/podman
131 ln -s ${bindir}/podman-remote ${D}${PTEST_PATH}/bin/podman-remote
132}
133
134FILES:${PN} += " \ 130FILES:${PN} += " \
135 ${systemd_unitdir}/system/* \ 131 ${systemd_unitdir}/system/* \
136 ${nonarch_libdir}/systemd/* \ 132 ${nonarch_libdir}/systemd/* \
@@ -149,8 +145,8 @@ VIRTUAL-RUNTIME_base-utils-nsenter ?= "util-linux-nsenter"
149COMPATIBLE_HOST = "^(?!mips).*" 145COMPATIBLE_HOST = "^(?!mips).*"
150 146
151RDEPENDS:${PN} += "\ 147RDEPENDS:${PN} += "\
152 conmon ${VIRTUAL-RUNTIME_container_runtime} iptables ${VIRTUAL-RUNTIME_container_networking} skopeo ${VIRTUAL-RUNTIME_base-utils-nsenter} \ 148 catatonit conmon ${VIRTUAL-RUNTIME_container_runtime} iptables libdevmapper \
153 ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'fuse-overlayfs slirp4netns', '', d)} \ 149 ${VIRTUAL-RUNTIME_container_dns} ${VIRTUAL-RUNTIME_container_networking} ${VIRTUAL-RUNTIME_base-utils-nsenter} \
154" 150"
155RRECOMMENDS:${PN} += "slirp4netns \ 151RRECOMMENDS:${PN} += "slirp4netns \
156 kernel-module-xt-masquerade \ 152 kernel-module-xt-masquerade \
@@ -161,16 +157,3 @@ RRECOMMENDS:${PN} += "slirp4netns \
161 kernel-module-xt-tcpudp \ 157 kernel-module-xt-tcpudp \
162 " 158 "
163RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" 159RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}"
164
165RDEPENDS:${PN}-ptest += " \
166 bash \
167 bats \
168 buildah \
169 catatonit \
170 coreutils \
171 file \
172 gnupg \
173 jq \
174 make \
175 tar \
176"