All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: "meta-virtualization@lists.yoctoproject.org"
	<meta-virtualization@lists.yoctoproject.org>
Subject: Re: [meta-virtualization] [PATCH 7/8] netavark: Rewrite the recipe
Date: Tue, 2 May 2023 17:06:24 -0400	[thread overview]
Message-ID: <CADkTA4PtdsGVsmhUPBu-mHUTi2J=TaBpqwvdqjNsP6=7kk88Cw@mail.gmail.com> (raw)
In-Reply-To: <DB5PR02MB102132A833BE12DA41DB92550EF6F9@DB5PR02MB10213.eurprd02.prod.outlook.com>

On Tue, May 2, 2023 at 4:56 PM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> > -----Original Message-----
> > From: Bruce Ashfield <bruce.ashfield@gmail.com>
> > Sent: den 2 maj 2023 22:43
> > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > Cc: meta-virtualization@lists.yoctoproject.org
> > Subject: Re: [meta-virtualization] [PATCH 7/8] netavark: Rewrite the
> > recipe
> >
> > On Tue, May 2, 2023 at 4:26 PM Peter Kjellerstedt
> > <peter.kjellerstedt@axis.com> wrote:
> > >
> > > Since the recipe is no longer expected to be updated using
> >
> > The wording on this (and the other commits) isn't correct.
> >
> > There is no compulsion to use any particular set of tools to update
> > and maintain recipes.
>
> No, of course, but the comments left in the recipe by cargo-bitbake,
> "Auto-Generated by cargo-bitbake 0.3.16" at the top and
> "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." at the end, at least to me indicated
> that there previously was an expectation to use cargo-bitbake to
> update the recipe.

Agreed.

I just meant to say that the commit message could say something
along the lines of:

"Rather than generating the crates via cargo-bitbake, we switch to the more
commonly used (and supported) cargo-update-recipe-crates."

Versus the old phrasing which read (to me) that the switch was mandatory
as opposed to something we are choosing.

Bruce


>
> >
> > Perhaps just say "Switching to cargo-update-recipe-crates format, for the
> > following reasons ..."
> >
> > Bruce
> >
> > > 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 <peter.kjellerstedt@axis.com>
> > > ---
> > >  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 \
> > > +"
>
> //Peter
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


  reply	other threads:[~2023-05-02 21:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 20:26 [PATCH 1/8] aardvark-dns: Move the crate URIs to a separate .inc file Peter Kjellerstedt
2023-05-02 20:26 ` [PATCH 2/8] aardvark-dns: Add checksums for the crate URIs Peter Kjellerstedt
2023-05-02 20:26 ` [PATCH 3/8] aardvark-dns: Rewrite the recipe Peter Kjellerstedt
2023-05-02 20:26 ` [PATCH 4/8] aardvark-dns: Fetch the crate instead of the Git repository Peter Kjellerstedt
2023-05-02 20:41   ` [meta-virtualization] " Bruce Ashfield
2023-05-02 20:48     ` Peter Kjellerstedt
2023-05-02 20:55       ` Bruce Ashfield
2023-05-02 20:26 ` [PATCH 5/8] netavark: Move the crate URIs to a separate .inc file Peter Kjellerstedt
2023-05-02 20:26 ` [PATCH 6/8] netavark: Add checksums for the crate URIs Peter Kjellerstedt
2023-05-02 20:26 ` [PATCH 7/8] netavark: Rewrite the recipe Peter Kjellerstedt
2023-05-02 20:43   ` [meta-virtualization] " Bruce Ashfield
2023-05-02 20:55     ` Peter Kjellerstedt
2023-05-02 21:06       ` Bruce Ashfield [this message]
2023-05-02 20:26 ` [PATCH 8/8] netavark: Fetch the crate instead of the Git repository Peter Kjellerstedt
2023-05-02 20:43   ` [meta-virtualization] " Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADkTA4PtdsGVsmhUPBu-mHUTi2J=TaBpqwvdqjNsP6=7kk88Cw@mail.gmail.com' \
    --to=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=peter.kjellerstedt@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.