All of lore.kernel.org
 help / color / mirror / Atom feed
* Building crun does not feth everything in do_fetch #meta-virtualization
@ 2021-10-13 14:18 Marc Wiz
  2021-10-13 14:35 ` [meta-virtualization] " Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Wiz @ 2021-10-13 14:18 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

I recently discovered a couple of issues with building crun.

The first issue is when using a proxy to download source.   crun depends on libocispec which is a git sub-module.  The proxy environment variables are apparently not passed or recognized by the git sub-module code .  The fix is to add the proxy configuration into the git configuration.

The real issue IMHO is that crun depends on libocispec which depends on yajl.  Yajl is not downloaded until the compile task for crun is executed.  This breaks offline builds.

So I am wondering what the best way is to address this?  It seems to me that the Makefiles for libocispec and yajl would need to be modified and the recipe for crun would need to be modified to fetch the dependencies.

Thanks,
Marc

[-- Attachment #2: Type: text/html, Size: 841 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-virtualization] Building crun does not feth everything in do_fetch #meta-virtualization
  2021-10-13 14:18 Building crun does not feth everything in do_fetch #meta-virtualization Marc Wiz
@ 2021-10-13 14:35 ` Bruce Ashfield
  2021-10-18 12:59   ` kovac167
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Ashfield @ 2021-10-13 14:35 UTC (permalink / raw)
  To: Marc Wiz; +Cc: meta-virtualization

On Wed, Oct 13, 2021 at 10:18 AM Marc Wiz <mwyocto@wiz.com> wrote:
>
> I recently discovered a couple of issues with building crun.
>
> The first issue is when using a proxy to download source.   crun depends on libocispec which is a git sub-module.  The proxy environment variables are apparently not passed or recognized by the git sub-module code .  The fix is to add the proxy configuration into the git configuration.
>
> The real issue IMHO is that crun depends on libocispec which depends on yajl.  Yajl is not downloaded until the compile task for crun is executed.  This breaks offline builds.
>
> So I am wondering what the best way is to address this?  It seems to me that the Makefiles for libocispec and yajl would need to be modified and the recipe for crun would need to be modified to fetch the dependencies.
>

All of those dependencies are already specified in the recipe, and in
any integration/build testing that I've done, they are all picked up
properly.

libocispec is directly specified in the SRC_URI and placed where crun
will look for it, so that happens in the fetch task.

yajl is specified in DEPENDS, so it will be in place in the recipe
sysroot before compilation starts.  You get a build error without
yajl, so it is properly in place for the builds that I'm doing.

Bruce

> Thanks,
> Marc
> 
>


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building crun does not feth everything in do_fetch #meta-virtualization
  2021-10-13 14:35 ` [meta-virtualization] " Bruce Ashfield
@ 2021-10-18 12:59   ` kovac167
  2021-10-18 16:16     ` [meta-virtualization] " Bruce Ashfield
  0 siblings, 1 reply; 4+ messages in thread
From: kovac167 @ 2021-10-18 12:59 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

Bruce,

Thank you for the response. I believe I am running into the same issue attempting to build podman with crun as the container runtime. These are the steps I have taken to reproduce the error:

- execute a build with podman & crun with networking enabled on the VM
- delete the tmp, cache, & sstate-cache directories from the build
- save the downloads directory (for offline builds)
- set the bb_no_network to 1
- disable networking on the VM
- execute the build again offline

It looks like the build is attempting to reach & out download yajl, even when the bb_no_network flag is set. When I remove the crun setting from podman, the build completes successfully.

*Logs:*

DEBUG: crun-0.18+gitf302dd8c02c6fddd2c50d1685d82b7a19aae8afe-r0 do_configure: Executing shell function do_configure

Submodule 'libocispec' (https://github.com/containers/libocispec.git) registered for path 'libocispec'
Submodule path 'libocispec': checked out 'fa3e8338c62ae482e509884ee2edaefc8e00499e'
Submodule 'image-spec' (https://github.com/opencontainers/image-spec) registered for path 'libocispec/image-spec'
Submodule 'runtime-spec' (https://github.com/opencontainers/runtime-spec) registered for path 'libocispec/runtime-spec'
Submodule 'yajl' (https://github.com/containers/yajl.git) registered for path 'libocispec/yajl'

Cloning into '/opt/roast/bitbake/build/tmp/work/corei7-64-gmit-linux/crun/0.18+gitf302dd8c02c6fddd2c50d1685d82b7a19aae8afe-r0/git/libocispec/yajl'...
fatal: unable to access 'https://github.com/containers/yajl.git/': Failed to connect to github.com port 443: Connection refused
fatal: clone of 'https://github.com/containers/yajl.git' into submodule path '/opt/roast/bitbake/build/tmp/work/corei7-64-gmit-linux/crun/0.18+gitf302dd8c02c6fddd2c50d1685d82b7a19aae8afe-r0/git/libocispec/yajl' failed

Failed to clone 'yajl' a second time, aborting

[-- Attachment #2: Type: text/html, Size: 2346 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-virtualization] Building crun does not feth everything in do_fetch #meta-virtualization
  2021-10-18 12:59   ` kovac167
@ 2021-10-18 16:16     ` Bruce Ashfield
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Ashfield @ 2021-10-18 16:16 UTC (permalink / raw)
  To: kovac167; +Cc: meta-virtualization

On Mon, Oct 18, 2021 at 8:59 AM <kovac167@gmail.com> wrote:
>
> Bruce,
>
> Thank you for the response. I believe I am running into the same issue attempting to build podman with crun as the container runtime. These are the steps I have taken to reproduce the error:
>
> - execute a build with podman & crun with networking enabled on the VM
> - delete the tmp, cache, & sstate-cache directories from the build
> - save the downloads directory (for offline builds)
> - set the bb_no_network to 1
> - disable networking on the VM
> - execute the build again offline
>
> It looks like the build is attempting to reach & out download yajl, even when the bb_no_network flag is set. When I remove the crun setting from podman, the build completes successfully.

Ah yes, they've committed crimes in autogen.sh, that I hadn't noticed
creeping in.

I've bumped crun to the latest, and will confirm no network access
before pushing.

Bruce

>
>
> Logs:
>
> DEBUG: crun-0.18+gitf302dd8c02c6fddd2c50d1685d82b7a19aae8afe-r0 do_configure: Executing shell function do_configure
>
> Submodule 'libocispec' (https://github.com/containers/libocispec.git) registered for path 'libocispec'
> Submodule path 'libocispec': checked out 'fa3e8338c62ae482e509884ee2edaefc8e00499e'
> Submodule 'image-spec' (https://github.com/opencontainers/image-spec) registered for path 'libocispec/image-spec'
> Submodule 'runtime-spec' (https://github.com/opencontainers/runtime-spec) registered for path 'libocispec/runtime-spec'
> Submodule 'yajl' (https://github.com/containers/yajl.git) registered for path 'libocispec/yajl'
>
> Cloning into '/opt/roast/bitbake/build/tmp/work/corei7-64-gmit-linux/crun/0.18+gitf302dd8c02c6fddd2c50d1685d82b7a19aae8afe-r0/git/libocispec/yajl'...
> fatal: unable to access 'https://github.com/containers/yajl.git/': Failed to connect to github.com port 443: Connection refused
> fatal: clone of 'https://github.com/containers/yajl.git' into submodule path '/opt/roast/bitbake/build/tmp/work/corei7-64-gmit-linux/crun/0.18+gitf302dd8c02c6fddd2c50d1685d82b7a19aae8afe-r0/git/libocispec/yajl' failed
>
> Failed to clone 'yajl' a second time, aborting
>
>
> 
>


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-18 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 14:18 Building crun does not feth everything in do_fetch #meta-virtualization Marc Wiz
2021-10-13 14:35 ` [meta-virtualization] " Bruce Ashfield
2021-10-18 12:59   ` kovac167
2021-10-18 16:16     ` [meta-virtualization] " Bruce Ashfield

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.