Separate task(s) for build-deps pre-fetching#58
Separate task(s) for build-deps pre-fetching#58praiskup wants to merge 1 commit intokonflux-ci:mainfrom
Conversation
f8a68b0 to
c6494d6
Compare
| test -f "$lockfile" || exit 0 | ||
| mock-hermetic-repo \ | ||
| --lockfile /var/workdir/lockfile/buildroot_lock.json \ | ||
| --output-repo "$outputdir" |
There was a problem hiding this comment.
Hmm, we can't download podman image in Pod:
subprocess.CalledProcessError: Command '['podman', 'pull', '--arch', 'amd64', 'registry.fedoraproject.org/fedora:rawhide@sha256:899da242bd0ae24e94b190de9a19b970af572136801c5a64010e6242cf27933e']' returned non-zero exit status 125.
There was a problem hiding this comment.
Yes, pretty much no podman commands will work inside a pod, that's the current nature of unprivileged nested containerization, you might have a better luck if you select buildah for the base image of the task, don't know exactly why but the implementation is different and so is more isolated, I'm definitely not an expert on what happens underneath, I'm just providing my recent experience.
This logically separates the part that should be implemented in cachi2 in the future, per: https://rpm-software-management.github.io/mock/feature-hermetic-builds Fixes: konflux-ci#48
c6494d6 to
9393268
Compare
|
@eskultety we have a lockfile that refers to a container image that needs to be prefetched (as tarball so we can upload it to an MPC worker). What can we do to let cachi2 fetch it? |
@praiskup oh, tarballs are easy, you use our generic backend (aka glorified curl): https://hermetoproject.github.io/hermeto/generic/#specifying-artifacts-to-fetch, TL;DR you adopt a new
|
@praiskup I take it back, sorry! I misread your message - there currently isn't a way how you could point hermeto to a container registry and expect a fetched tarball on the output. |
There's also a konflux-ci build of it: https://github.com/konflux-ci/oras-container |
|
I think I can fetch images with oras. But can I then extract the directory tree out of it? Like here? |
Good question. Looks like that's not possible, I just tried to copy a random image from dockerhub, but I only got a bunch of layers, so yeah, not trivially mounted. |
|
Somewhat related: |
This logically separates the part that should be implemented in cachi2 in the future, per:
https://rpm-software-management.github.io/mock/feature-hermetic-builds
Fixe: #48