summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-05-02 23:18:09 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-05-08 18:42:14 -0400
commit508517af3ed8b56231373332b2006f0836b16919 (patch)
tree1eb8e932289f4dbc80ae6fe68171f23b876fd4df
parent57704b2216ad19fe996b4421e52ca804e2713193 (diff)
downloadmeta-virtualization-508517af3ed8b56231373332b2006f0836b16919.tar.gz
aardvark-dns: 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 aardvark-dns.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>
-rw-r--r--recipes-containers/aardvark-dns/aardvark-dns.inc34
-rw-r--r--recipes-containers/aardvark-dns/aardvark-dns_1.2.0.bb57
2 files changed, 35 insertions, 56 deletions
diff --git a/recipes-containers/aardvark-dns/aardvark-dns.inc b/recipes-containers/aardvark-dns/aardvark-dns.inc
deleted file mode 100644
index 8c744398..00000000
--- a/recipes-containers/aardvark-dns/aardvark-dns.inc
+++ /dev/null
@@ -1,34 +0,0 @@
1inherit ptest
2
3SRC_URI += " \
4 file://run-ptest \
5"
6
7# Cargo installs the binary to bin so move it to where podman expects it
8do_install:append() {
9 install -d ${D}${libexecdir}/podman/
10 mv ${D}${bindir}/* ${D}${libexecdir}/podman/
11 rm -rf ${D}${bindir}/
12}
13
14
15do_install_ptest () {
16 cp -r ${S}/test ${D}${PTEST_PATH}
17}
18
19# Rdepends on slirp4netns
20inherit features_check
21REQUIRED_DISTRO_FEATURES ?= "seccomp"
22
23RDEPENDS:${PN}-ptest += " \
24 bats \
25 bash \
26 coreutils \
27 jq \
28 iproute2 \
29 slirp4netns \
30 dbus-daemon-proxy \
31 util-linux-unshare \
32 bind-utils \
33 ipcalc \
34"
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 a3793018..4e21d9a2 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 @@
1# Auto-Generated by cargo-bitbake 0.3.16 1SUMMARY = "A container-focused DNS server"
2# 2HOMEPAGE = "https://github.com/containers/aardvark-dns"
3inherit cargo cargo-update-recipe-crates
4 3
5# If this is git based prefer versioned ones if they exist 4LICENSE = "Apache-2.0"
6# DEFAULT_PREFERENCE = "-1" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
7 6
8# how to get aardvark-dns could be as easy as but default to a git checkout: 7SRCREV = "cb1a462dd8427e33355f6907394a0646f5a26bf2"
9# SRC_URI += "crate://crates.io/aardvark-dns/1.2.0" 8
10SRC_URI += "git://github.com/containers/aardvark-dns;protocol=https;nobranch=1" 9# It is possible to fetch the source using the crate fetcher instead:
10#SRC_URI = "crate://crates.io/${BPN}/${PV}"
11SRC_URI = "git://github.com/containers/aardvark-dns;protocol=https;nobranch=1 \
12 file://run-ptest"
11require ${BPN}-crates.inc 13require ${BPN}-crates.inc
12 14
13SRCREV = "cb1a462dd8427e33355f6907394a0646f5a26bf2"
14S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
15CARGO_SRC_DIR = ""
16 16
17# FIXME: update generateme with the real MD5 of the license file 17inherit cargo cargo-update-recipe-crates features_check ptest
18LIC_FILES_CHKSUM = " \
19 file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
20"
21 18
22SUMMARY = "A container-focused DNS server" 19# Cargo installs the binary to bin so move it to where podman expects it
23HOMEPAGE = "https://github.com/containers/aardvark-dns" 20do_install:append() {
24LICENSE = "Apache-2.0" 21 install -d ${D}${libexecdir}
22 mv ${D}${bindir} ${D}${libexecdir}/podman
23}
25 24
26# includes this file if it exists but does not fail 25do_install_ptest() {
27# this is useful for anything you may want to override from 26 cp -r ${S}/test ${D}${PTEST_PATH}
28# what cargo-bitbake generates. 27}
29include aardvark-dns-${PV}.inc 28
30include aardvark-dns.inc 29# rdepends on slirp4netns
30REQUIRED_DISTRO_FEATURES ?= "seccomp"
31
32RDEPENDS:${PN}-ptest += " \
33 bash \
34 bats \
35 bind-utils \
36 coreutils \
37 dbus-daemon-proxy \
38 ipcalc \
39 iproute2 \
40 jq \
41 slirp4netns \
42 util-linux-unshare \
43"