Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8249FC77B78 for ; Tue, 2 May 2023 20:26:55 +0000 (UTC) Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by mx.groups.io with SMTP id smtpd.web10.1431.1683059200075980734 for ; Tue, 02 May 2023 13:26:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@axis.com header.s=axis-central1 header.b=XR4fDBTA; spf=pass (domain: axis.com, ip: 195.60.68.18, mailfrom: peter.kjellerstedt@axis.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1683059206; x=1714595206; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=oRItnboDr8+mJOGbxef2b6e6FfFMdVVo1khk3jnMvQc=; b=XR4fDBTAgvR/NEEjqBKqmOYxCJyQF3rA8H/hosAWCfIpdJ4W6ZYi3qCy cpb2AtTVIyl6PBxNQKXguMLmTgwzOgFY1lcszdQUpPu7MPrtgENuv9VSp Gh4C8W9Q0FNkE6ErqNkxB8FOsZ2gPYaixCjZXXRcbJRp2YlIaq63a+563 FIwXViiP+lIOFHXUvqW5/BKgGOfbHCfwnCKievTCJyvWPDJ93eQTbLD8F U2EQm4vZK0ew55getz4/YY1WprLrPFR8zsHBW1kkoeGFxi6vEt7vTfyL7 Hw6ipKa096WBr0WeKziUIv6mxwOKkCnqzN7BEq9vg/no54Ai6r1UIMowx A==; From: Peter Kjellerstedt To: Subject: [PATCH 7/8] netavark: Rewrite the recipe Date: Tue, 2 May 2023 22:26:30 +0200 Message-ID: <20230502202631.2102074-7-pkj@axis.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502202631.2102074-1-pkj@axis.com> References: <20230502202631.2102074-1-pkj@axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 May 2023 20:26:55 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-virtualization/message/8023 Since the recipe is no longer expected to be updated using cargo-bitbake after switching to using cargo-update-recipe-crates to update the crate URIs, rewrite it to better conform to common recipe standards. Also fold netavark.inc into it as there is no longer any need to keep it separate from the main recipe. Signed-off-by: Peter Kjellerstedt --- recipes-containers/netavark/netavark.inc | 49 -------------- recipes-containers/netavark/netavark_1.2.0.bb | 66 +++++++++++++------ 2 files changed, 46 insertions(+), 69 deletions(-) delete mode 100644 recipes-containers/netavark/netavark.inc diff --git a/recipes-containers/netavark/netavark.inc b/recipes-containers/netavark/netavark.inc deleted file mode 100644 index c15bbea..0000000 --- a/recipes-containers/netavark/netavark.inc +++ /dev/null @@ -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 diff --git a/recipes-containers/netavark/netavark_1.2.0.bb b/recipes-containers/netavark/netavark_1.2.0.bb index a3af083..be7cff5 100644 --- a/recipes-containers/netavark/netavark_1.2.0.bb +++ b/recipes-containers/netavark/netavark_1.2.0.bb @@ -1,30 +1,56 @@ -# Auto-Generated by cargo-bitbake 0.3.16 -# -inherit cargo cargo-update-recipe-crates +SUMMARY = "A container network stack" +HOMEPAGE = "https://github.com/containers/netavark" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" -# If this is git based prefer versioned ones if they exist -# DEFAULT_PREFERENCE = "-1" +SRCREV = "90cccc1c21f26fbc473a201ce3b30d77667c7635" # 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" +SRC_URI = "git://github.com/containers/netavark.git;protocol=https;nobranch=1 \ + file://tests.patch \ + file://run-ptest" 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 \ -" +PACKAGECONFIG ?= "aardvark-dns" -SUMMARY = "A container network stack" -HOMEPAGE = "https://github.com/containers/netavark" -LICENSE = "Apache-2.0" +# 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 +} -# 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 +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 \ +"