diff options
Diffstat (limited to 'recipes-containers/podman')
-rw-r--r-- | recipes-containers/podman/podman/run-ptest | 13 | ||||
-rw-r--r-- | recipes-containers/podman/podman_git.bb | 61 |
2 files changed, 22 insertions, 52 deletions
diff --git a/recipes-containers/podman/podman/run-ptest b/recipes-containers/podman/podman/run-ptest deleted file mode 100644 index 108ff451..00000000 --- a/recipes-containers/podman/podman/run-ptest +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # SPDX-FileCopyrightText: Huawei Inc. | ||
4 | # | ||
5 | # SPDX-License-Identifier: MIT | ||
6 | |||
7 | # | ||
8 | # Podman system tests | ||
9 | # | ||
10 | |||
11 | # The system tests don't need any go related variables. Dummy-define them to | ||
12 | # avoid useless warnings/errors. | ||
13 | GOOS=undefined GO=true BUILDTAGS= make localsystem | ||
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 | |||
10 | REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6" | 10 | REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6" |
11 | 11 | ||
12 | DEPENDS = " \ | 12 | DEPENDS = " \ |
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 | ||
20 | SRCREV = "bb81e85a430fa95d23a15b77c717fd68bf06ebf2" | 19 | SRCREV = "227df90eb7c021097c9ba5f8000c83648a598028" |
21 | SRC_URI = " \ | 20 | SRC_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 | ||
27 | LICENSE = "Apache-2.0" | 25 | LICENSE = "Apache-2.0" |
@@ -31,7 +29,7 @@ GO_IMPORT = "import" | |||
31 | 29 | ||
32 | S = "${WORKDIR}/git" | 30 | S = "${WORKDIR}/git" |
33 | 31 | ||
34 | PV = "5.0.1+git" | 32 | PV = "v5.4.1" |
35 | 33 | ||
36 | CVE_STATUS[CVE-2022-2989] = "fixed-version: fixed since v4.3.0" | 34 | CVE_STATUS[CVE-2022-2989] = "fixed-version: fixed since v4.3.0" |
37 | CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0" | 35 | CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0" |
@@ -46,16 +44,17 @@ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ | |||
46 | exclude_graphdriver_btrfs exclude_graphdriver_devicemapper ${BUILDTAGS_EXTRA}" | 44 | exclude_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 |
49 | export LDFLAGS="" | 47 | export LDFLAGS = "" |
50 | 48 | ||
51 | # https://github.com/llvm/llvm-project/issues/53999 | 49 | # https://github.com/llvm/llvm-project/issues/53999 |
52 | TOOLCHAIN = "gcc" | 50 | TOOLCHAIN = "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 |
55 | export BUILDFLAGS="${GOBUILDFLAGS}" | 53 | export BUILDFLAGS = "${GOBUILDFLAGS}" |
56 | 54 | ||
57 | inherit go goarch | 55 | inherit go goarch |
58 | inherit systemd pkgconfig ptest | 56 | inherit container-host |
57 | inherit systemd pkgconfig | ||
59 | 58 | ||
60 | do_configure[noexec] = "1" | 59 | do_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. |
71 | PACKAGECONFIG ?= "docker" | 70 | PODMAN_FEATURES ?= "docker" |
71 | |||
72 | PACKAGECONFIG ?= "" | ||
73 | PACKAGECONFIG[rootless] = ",,,fuse-overlayfs slirp4netns,," | ||
72 | 74 | ||
73 | do_compile() { | 75 | do_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 | ||
123 | do_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 | |||
134 | FILES:${PN} += " \ | 130 | FILES:${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" | |||
149 | COMPATIBLE_HOST = "^(?!mips).*" | 145 | COMPATIBLE_HOST = "^(?!mips).*" |
150 | 146 | ||
151 | RDEPENDS:${PN} += "\ | 147 | RDEPENDS:${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 | " |
155 | RRECOMMENDS:${PN} += "slirp4netns \ | 151 | RRECOMMENDS:${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 | " |
163 | RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" | 159 | RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" |
164 | |||
165 | RDEPENDS:${PN}-ptest += " \ | ||
166 | bash \ | ||
167 | bats \ | ||
168 | buildah \ | ||
169 | catatonit \ | ||
170 | coreutils \ | ||
171 | file \ | ||
172 | gnupg \ | ||
173 | jq \ | ||
174 | make \ | ||
175 | tar \ | ||
176 | " | ||