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 78387C7EE21 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.1435.1683059205491430132 for ; Tue, 02 May 2023 13:26:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@axis.com header.s=axis-central1 header.b=hkoNBt6z; 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=1683059205; x=1714595205; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=4zXXrpFhwWNj6quQJxVVOjH0DJMb7WAU6qob09H3xag=; b=hkoNBt6zMuWib6qolxGwXECK2j7bCjxWGOpJ98Pc+nXByLNHJnvB7Oj4 aXb7tDqoAmB3SP4nqSrrfqH2SJb8Bqi8czo/Ya5LbunlmobhGyhBcr5vx 2b8t3jL1CWCmm9j05oyj9vQGWo45GzfD7z8DGqrlBrOZH/Bu0U9bR6Cl5 YBf7vRPPR24XWNqqNGAuhS/CfeGn3aVwsM8WtG7VMBYSU2N2AO6XBhwKn tWzwBIjsigmMxjQIr7O9T2WarywVWigrYbMphG2w0mQxAM3Xr+ckIwnlZ fZ6I0bn+LZ8d178L/v47TzSGqR7wOBIdzXtRMAJ5qkjGprauIpF1oH3u4 Q==; From: Peter Kjellerstedt To: Subject: [PATCH 3/8] aardvark-dns: Rewrite the recipe Date: Tue, 2 May 2023 22:26:26 +0200 Message-ID: <20230502202631.2102074-3-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/8020 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 aardvark-dns.inc into it as there is no longer any need to keep it separate from the main recipe. Signed-off-by: Peter Kjellerstedt --- .../aardvark-dns/aardvark-dns.inc | 34 ------------ .../aardvark-dns/aardvark-dns_1.2.0.bb | 53 ++++++++++++------- 2 files changed, 33 insertions(+), 54 deletions(-) delete mode 100644 recipes-containers/aardvark-dns/aardvark-dns.inc diff --git a/recipes-containers/aardvark-dns/aardvark-dns.inc b/recipes-containers/aardvark-dns/aardvark-dns.inc deleted file mode 100644 index 8c74439..0000000 --- a/recipes-containers/aardvark-dns/aardvark-dns.inc +++ /dev/null @@ -1,34 +0,0 @@ -inherit ptest - -SRC_URI += " \ - file://run-ptest \ -" - -# 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 on slirp4netns -inherit features_check -REQUIRED_DISTRO_FEATURES ?= "seccomp" - -RDEPENDS:${PN}-ptest += " \ - bats \ - bash \ - coreutils \ - jq \ - iproute2 \ - slirp4netns \ - dbus-daemon-proxy \ - util-linux-unshare \ - bind-utils \ - ipcalc \ -" diff --git a/recipes-containers/aardvark-dns/aardvark-dns_1.2.0.bb b/recipes-containers/aardvark-dns/aardvark-dns_1.2.0.bb index a379301..10901eb 100644 --- a/recipes-containers/aardvark-dns/aardvark-dns_1.2.0.bb +++ b/recipes-containers/aardvark-dns/aardvark-dns_1.2.0.bb @@ -1,30 +1,43 @@ -# Auto-Generated by cargo-bitbake 0.3.16 -# -inherit cargo cargo-update-recipe-crates +SUMMARY = "A container-focused DNS server" +HOMEPAGE = "https://github.com/containers/aardvark-dns" -# If this is git based prefer versioned ones if they exist -# DEFAULT_PREFERENCE = "-1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRCREV = "cb1a462dd8427e33355f6907394a0646f5a26bf2" # how to get aardvark-dns could be as easy as but default to a git checkout: # SRC_URI += "crate://crates.io/aardvark-dns/1.2.0" -SRC_URI += "git://github.com/containers/aardvark-dns;protocol=https;nobranch=1" +SRC_URI = "git://github.com/containers/aardvark-dns;protocol=https;nobranch=1 \ + file://run-ptest" require ${BPN}-crates.inc -SRCREV = "cb1a462dd8427e33355f6907394a0646f5a26bf2" S = "${WORKDIR}/git" -CARGO_SRC_DIR = "" -# FIXME: update generateme with the real MD5 of the license file -LIC_FILES_CHKSUM = " \ - file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \ -" +inherit cargo cargo-update-recipe-crates features_check ptest -SUMMARY = "A container-focused DNS server" -HOMEPAGE = "https://github.com/containers/aardvark-dns" -LICENSE = "Apache-2.0" +# 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 aardvark-dns-${PV}.inc -include aardvark-dns.inc +do_install_ptest() { + cp -r ${S}/test ${D}${PTEST_PATH} +} + +# rdepends on slirp4netns +REQUIRED_DISTRO_FEATURES ?= "seccomp" + +RDEPENDS:${PN}-ptest += " \ + bash \ + bats \ + bind-utils \ + coreutils \ + dbus-daemon-proxy \ + ipcalc \ + iproute2 \ + jq \ + slirp4netns \ + util-linux-unshare \ +"