packagegroups and unnecessary builds/fetches


Renato Caldas
 

Hello,

I'm adding "packagegroup-k8s-host" to my image, and noticed the "k3s" package also being built.

Investigating further, it seems that by bundling kubernetes and k3s in the same .bb file causes both packages to be built. The same probably applies to the "packagegroups" in packagegroup-container.bb, all get built.

In both cases, the norm I guess is for people to just want one of the alternatives (kubernetes vs k3s; lxc vs podman vs docker).

Would it make sense to split the packagegroups into individual recipes? I'd be happy to submit a patch.

Cheers,
Renato


Bruce Ashfield
 

On Thu, Nov 10, 2022 at 2:25 PM Renato Caldas via
lists.yoctoproject.org <ml=calgera.com@...> wrote:

Hello,

I'm adding "packagegroup-k8s-host" to my image, and noticed the "k3s"
package also being built.

Investigating further, it seems that by bundling kubernetes and k3s in
the same .bb file causes both packages to be built. The same probably
applies to the "packagegroups" in packagegroup-container.bb, all get built.

In both cases, the norm I guess is for people to just want one of the
alternatives (kubernetes vs k3s; lxc vs podman vs docker).

Would it make sense to split the packagegroups into individual recipes?
I'd be happy to submit a patch.
The grouping is intentional, and yes, so is the extra building. The
individual package groups in that .bb are just packages, and when you
bitbake a recipe, all of the packages are built whether they are
installed or not.

That packagegroup has primarily been used to drive the build testing
and package repository construction steps of sanity testing.

They could be split more, but at that point, we aren't much ahead of
just the individual recipes with their inherent depends/rdepends.

I have some pending work to split things up more in the container
definitions cri, cni, etc, etc, but I haven't had enough time to
complete that yet.

Bruce


Cheers,
Renato



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


Renato Caldas
 

On 10/11/22 21:42, Bruce Ashfield wrote:
On Thu, Nov 10, 2022 at 2:25 PM Renato Caldas via
lists.yoctoproject.org <ml=calgera.com@...> wrote:

Hello,

I'm adding "packagegroup-k8s-host" to my image, and noticed the "k3s"
package also being built.

Investigating further, it seems that by bundling kubernetes and k3s in
the same .bb file causes both packages to be built. The same probably
applies to the "packagegroups" in packagegroup-container.bb, all get built.

In both cases, the norm I guess is for people to just want one of the
alternatives (kubernetes vs k3s; lxc vs podman vs docker).

Would it make sense to split the packagegroups into individual recipes?
I'd be happy to submit a patch.
The grouping is intentional, and yes, so is the extra building. The
individual package groups in that .bb are just packages, and when you
bitbake a recipe, all of the packages are built whether they are
installed or not.
That packagegroup has primarily been used to drive the build testing
and package repository construction steps of sanity testing.
I see, thanks.

They could be split more, but at that point, we aren't much ahead of
just the individual recipes with their inherent depends/rdepends.
No argument there in what concerns lxc, podman, docker, or containerd.

In the kubernetes case, however, perhaps splitting out packagegroup-oci would be useful. It's a non-trivial list of packages that could be useful for an end-user.

Given what you said above, I would just replace packagegroup-k8s-host with packagegroup-oci + containerd + kubernetes.

I have some pending work to split things up more in the container
definitions cri, cni, etc, etc, but I haven't had enough time to
complete that yet.
Sure, no worries. And thank you for the explanation.

Cheers,
Renato

Bruce


Cheers,
Renato