mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 20:59:41 +02:00
netavark: Rewrite the recipe
The previous version of the recipe was generated by cargo-bitbake, which expects that future updates to the recipe will also be done by cargo-bitbake and therefore formats it to accomodate this. Since we have now switched to the more commonly used (and supported) cargo-update-recipe-crates bbclass for updating the crate URIs, the recipe can be rewritten to better conform to common recipe standards. This also folds netavark.inc into it as there is no longer any need to keep it separate. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
d903219b9e
commit
8c599baea9
|
@ -1,49 +0,0 @@
|
|||
inherit ptest
|
||||
|
||||
PACKAGECONFIG ?= "aardvark-dns"
|
||||
|
||||
# From the documentation of netavark
|
||||
# https://github.com/containers/netavark/blob/v1.1.0/DISTRO_PACKAGE.md#dependency-on-aardvark-dns
|
||||
# The aardvark-dns will be installed by default with netavark, but
|
||||
# netavark will be functional without it.
|
||||
PACKAGECONFIG[aardvark-dns]= " , , , aardvark-dns"
|
||||
|
||||
# Rdepends on aardvark-dns which rdepends on slirp4netns
|
||||
inherit features_check
|
||||
REQUIRED_DISTRO_FEATURES ?= "seccomp"
|
||||
|
||||
SRC_URI += " \
|
||||
file://run-ptest \
|
||||
file://tests.patch \
|
||||
"
|
||||
|
||||
# Cargo installs the binary to bin so move it to where podman expects it
|
||||
do_install:append() {
|
||||
install -d ${D}${libexecdir}/podman/
|
||||
mv ${D}${bindir}/* ${D}${libexecdir}/podman/
|
||||
rm -rf ${D}${bindir}/
|
||||
}
|
||||
|
||||
|
||||
do_install_ptest () {
|
||||
cp -r ${S}/test ${D}${PTEST_PATH}
|
||||
}
|
||||
|
||||
RDEPENDS:${PN}-ptest += " \
|
||||
bats \
|
||||
bash \
|
||||
coreutils \
|
||||
jq \
|
||||
iproute2 \
|
||||
dbus-daemon-proxy \
|
||||
util-linux-unshare \
|
||||
nmap \
|
||||
procps-ps \
|
||||
util-linux-nsenter \
|
||||
bind-utils \
|
||||
"
|
||||
|
||||
|
||||
# bind-utils is used to install dig
|
||||
# procps is necessary because the ps from busybox is
|
||||
# not having the same behavior
|
|
@ -1,30 +1,56 @@
|
|||
# Auto-Generated by cargo-bitbake 0.3.16
|
||||
#
|
||||
inherit cargo cargo-update-recipe-crates
|
||||
|
||||
# If this is git based prefer versioned ones if they exist
|
||||
# DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
# how to get netavark could be as easy as but default to a git checkout:
|
||||
# SRC_URI += "crate://crates.io/netavark/1.2.0"
|
||||
SRC_URI += "git://github.com/containers/netavark.git;protocol=https;nobranch=1"
|
||||
require ${BPN}-crates.inc
|
||||
|
||||
SRCREV = "90cccc1c21f26fbc473a201ce3b30d77667c7635"
|
||||
S = "${WORKDIR}/git"
|
||||
CARGO_SRC_DIR = ""
|
||||
|
||||
# FIXME: update generateme with the real MD5 of the license file
|
||||
LIC_FILES_CHKSUM = " \
|
||||
file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
|
||||
"
|
||||
|
||||
SUMMARY = "A container network stack"
|
||||
HOMEPAGE = "https://github.com/containers/netavark"
|
||||
LICENSE = "Apache-2.0"
|
||||
|
||||
# includes this file if it exists but does not fail
|
||||
# this is useful for anything you may want to override from
|
||||
# what cargo-bitbake generates.
|
||||
include netavark-${PV}.inc
|
||||
include netavark.inc
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
SRCREV = "90cccc1c21f26fbc473a201ce3b30d77667c7635"
|
||||
|
||||
# It is possible to fetch the source using the crate fetcher instead:
|
||||
#SRC_URI = "crate://crates.io/${BPN}/${PV}"
|
||||
SRC_URI = "git://github.com/containers/netavark.git;protocol=https;nobranch=1 \
|
||||
file://tests.patch \
|
||||
file://run-ptest"
|
||||
require ${BPN}-crates.inc
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
PACKAGECONFIG ?= "aardvark-dns"
|
||||
|
||||
# From the documentation of netavark
|
||||
# https://github.com/containers/netavark/blob/v1.1.0/DISTRO_PACKAGE.md#dependency-on-aardvark-dns
|
||||
# The aardvark-dns will be installed by default with netavark, but
|
||||
# netavark will be functional without it.
|
||||
PACKAGECONFIG[aardvark-dns]= ",,, aardvark-dns"
|
||||
|
||||
inherit cargo cargo-update-recipe-crates features_check ptest
|
||||
|
||||
# Cargo installs the binary to bin so move it to where podman expects it
|
||||
do_install:append() {
|
||||
install -d ${D}${libexecdir}
|
||||
mv ${D}${bindir} ${D}${libexecdir}/podman
|
||||
}
|
||||
|
||||
do_install_ptest() {
|
||||
cp -r ${S}/test ${D}${PTEST_PATH}
|
||||
}
|
||||
|
||||
# rdepends on aardvark-dns which rdepends on slirp4netns
|
||||
REQUIRED_DISTRO_FEATURES ?= "seccomp"
|
||||
|
||||
# bind-utils is used to install dig
|
||||
# procps-ps is necessary because the ps from busybox is
|
||||
# not having the same behavior
|
||||
RDEPENDS:${PN}-ptest += " \
|
||||
bash \
|
||||
bats \
|
||||
bind-utils \
|
||||
coreutils \
|
||||
dbus-daemon-proxy \
|
||||
iproute2 \
|
||||
jq \
|
||||
nmap \
|
||||
procps-ps \
|
||||
util-linux-nsenter \
|
||||
util-linux-unshare \
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue
Block a user