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 aardvark-dns.inc into it as there is no longer any need
to keep it separate.

Signed-off-by: Peter Kjellerstedt <[email protected]>
---
 .../aardvark-dns/aardvark-dns.inc             | 34 -----------
 .../aardvark-dns/aardvark-dns_1.2.0.bb        | 57 ++++++++++++-------
 2 files changed, 35 insertions(+), 56 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..4e21d9a 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"
 
-# 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"
+SRCREV = "cb1a462dd8427e33355f6907394a0646f5a26bf2"
+
+# 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/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 \
+"
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8037): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8037
Mute This Topic: https://lists.yoctoproject.org/mt/98648851/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to